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

Select Status

RSS

openhab (5) Versions 0.0.2

Installs+configures openhab

Policyfile
Berkshelf
Knife
cookbook 'openhab', '= 0.0.2', :supermarket
cookbook 'openhab', '= 0.0.2'
knife supermarket install openhab
knife supermarket download openhab
README
Dependencies
Changelog
Quality 0%

openhab-cookbook

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

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

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.6.2</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.4.0</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

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

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

0.0.1

Initial release of openhab

Foodcritic Metric
            

0.0.2 failed this metric

FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_package.rb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:17
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:19
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:20
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:31
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:32
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:33
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:34
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:39
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:40
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:41
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:46
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:49
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:51
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:52
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/my_openhab.rb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/my_openhab.rb:12
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/my_openhab.rb:14
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/my_openhab.rb:15
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/attributes/default.rb:8
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/attributes/default.rb:9
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/attributes/default.rb:10
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/attributes/default.rb:11
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/attributes/default.rb:14
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/attributes/default.rb:15
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/attributes/default.rb:16
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/attributes/default.rb:19
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/attributes/default.rb:20
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/attributes/default.rb:23
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/default.rb:10
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/default.rb:12
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_package.rb:20
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:27
FC019: Access node attributes in a consistent manner: /tmp/cook/3487a0533e892e4858f0b5ac/openhab/recipes/install_from_source.rb:45