Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

openhab (5) Versions 0.0.5

Installs+configures openhab

Berkshelf/Librarian
Policyfile
Knife
cookbook 'openhab', '~> 0.0.5'
cookbook 'openhab', '~> 0.0.5', :supermarket
knife cookbook site install openhab
knife cookbook site download openhab
README
Dependencies
Changelog
Quality 44%

DEPRECATION NOTICE

This should still work for some installs, but I'm no longer actively developing it - I've switched to Team Docker for my personal OpenHAB needs.

I'll still happily merge any PR's, but if anyone wants to take over maintainance of this, I'm happy to hand it over!

openhab-cookbook

This installs openhab and selected plugins. You can either install via the debian packages, or from source.

NOTE: This is only for versions 1.x of openhab. When I move to OpenHAB 2, I'll start a openhab2 cookbook.

Dependencies

  • Cookbooks:
    • apt
    • java
  • On the system:
    • apt updated (including apt in the run-list will do this)
    • java 8 installed
    • this cookbook will install java for you by default - make sure to set the attributes for oracle v8

Supported Platforms

Tested succesful on:

  • Ubuntu 12.04
  • Ubuntu 14.04
  • Raspbian (source-only)

Recipies

  • openhab - Installs openhab
  • openhab::init_script - Installs openhab init.d script
  • openhab::my_openhab - Installs my.openhab addon .jar
  • openhab::habmin - Installs HABmin console

Attributes

Global

<table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>['openhab']['install_java']</tt></td> <td>Boolean</td> <td>Whether to install java via the java cookbook</td> <td><tt>true</tt></td> </tr> <tr> <td><tt>['openhab']['install_method']</tt></td> <td>String</td> <td>Whether to install openhab via the deb packages (default) or via 'source'</td> <td><tt>'package'</tt></td> </tr> <tr> <td><tt>['openhab']['version']</tt></td> <td>String</td> <td>What version of openhab to install</td> <td><tt>1.7.1</tt></td> </tr> <tr> <td><tt>['openhab']['plugins']</tt></td> <td>Array</td> <td>List of plugins to install</td> <td><tt>[]</tt></td> </tr> </table>

Init script install only

<table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>['openhab']['http_port']</tt></td> <td>String</td> <td>HTTP Port for the init script</td> <td><tt>8080</tt></td> </tr> <tr> <td><tt>['openhab']['https_port']</tt></td> <td>String</td> <td>HTTPS Port for the init script</td> <td><tt>8443</tt></td> </tr> </table>

Source install only

<table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>['openhab']['install_dir']</tt></td> <td>String</td> <td>Which directoy to install 'openhab' into</td> <td><tt>'/opt'</tt></td> </tr> <tr> <td><tt>['openhab']['user']</tt></td> <td>String</td> <td>What user to run install as</td> <td><tt>root</tt></td> </tr> <tr> <td><tt>['openhab']['group']</tt></td> <td>String</td> <td>What user to run install as</td> <td><tt>root</tt></td> </tr> </table>

my.openHAB plugin

<table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>['openhab']['my']['version']</tt></td> <td>String</td> <td>Which version of the my.openhab plugin to install</td> <td><tt>1.7.0</tt></td> </tr> </table>

habmin console

<table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>['openhab']['habmin']['install_dir']</tt></td> <td>String</td> <td>Where to install habmin</td> <td><tt>/opt/openhab/webapps/habmin</tt></td> </tr> <tr> <td><tt>['openhab']['habmin']['git_repository']</tt></td> <td>String</td> <td>Which repo to download habmin from</td> <td><tt>https://github.com/cdjackson/HABmin</tt></td> </tr> <tr> <td><tt>['openhab']['habmin']['git_revision']</tt></td> <td>String</td> <td>Which ref of habmin to use</td> <td><tt>e523d77c7a3d73d75ce050a582a3bfe8bc7a1324</tt></td> </tr> <tr> <td><tt>['openhab']['habmin']['user']</tt></td> <td>String</td> <td>What user to run install as</td> <td><tt>root</tt></td> </tr> <tr> <td><tt>['openhab']['habmin']['group']</tt></td> <td>String</td> <td>What group to run install as</td> <td><tt>root</tt></td> </tr> </table>

Usage

  • 1. Make sure you have Java setup:
{
  attributes: {
    java: {
      install_flavor: 'oracle',
      jdk_version: '8',
      oracle: {accept_oracle_download_terms: true}
    }
  }
}
  • 2. Pick some plugins:
{
  attributes: {
    openhab: {
      plugins: %w{binding-xbmc action-xbmc binding-twitter persistance-mysql}
    }
  }
}
  • 3. Include openhab in your node's run_list:
{
  "run_list": [
    "recipe[apt]",
    "recipe[openhab]"
  ]
}
  • 4. ???
  • 5. Profit!

You now have OpenHAB installed. If you did it from the packages, you have the init.d script set up and openhab running already.

Init script

If you want to install an init.d script for booting, use the openhab::init_script recipie. Currently only Raspbian is supported.

my.openhab plugin

If you want to install the myOpenHABplugin, run the openhab::my_openhab recipie - it will place the requested .jar in the addons dir.

You'll still need to set/get the uuid/secret registration yourself.

License and Authors

Author:: Justin Aiken

Dependent cookbooks

java >= 0.0.0
ark >= 0.0.0
apt >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

0.0.5

0.0.4

  • Add recipe to install HABmin

0.0.3

  • Support 1.7.x releases, now hosted on bintray
  • Support 1.7.x myopenhab releases, now hosted on bintray
  • [BUGFIX] Fix some directories being changed w/ ark by setting strip_components to 0
  • [BUGFIX] Fix a bad plugin regex

0.0.2

  • Add raspbian init.d script
  • Add myopenhab plugin

0.0.1

Initial release of openhab

Collaborator Number Metric
            

0.0.5 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.0.5 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.0.5 failed this metric

FC064: Ensure issues_url is set in metadata: openhab/metadata.rb:1
FC065: Ensure source_url is set in metadata: openhab/metadata.rb:1
FC066: Ensure chef_version is set in metadata: openhab/metadata.rb:1
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.0.5 passed this metric

No Binaries Metric
            

0.0.5 passed this metric

Publish Metric
            

0.0.5 passed this metric

Supported Platforms Metric
            

0.0.5 passed this metric

Testing File Metric
            

0.0.5 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.0.5 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number