cookbook 'openhab', '= 0.0.3'
openhab (5) Versions 0.0.3 Follow1
Installs+configures openhab
cookbook 'openhab', '= 0.0.3', :supermarket
knife supermarket install openhab
knife supermarket download openhab
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
- apt updated (including
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.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>
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.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
to0
- [BUGFIX] Fix a bad plugin regex
0.0.2
- Add raspbian init.d script
- Add myopenhab plugin
0.0.1
Initial release of openhab
Foodcritic Metric
0.0.3 failed this metric
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_package.rb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:12
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:15
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:20
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:24
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:25
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:26
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:37
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:38
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:39
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:40
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:45
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:46
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:47
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:52
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:55
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:57
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:58
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:19
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:26
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:28
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:29
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:8
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:9
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:10
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:11
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:14
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:15
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:16
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:19
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:20
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:23
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/default.rb:10
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/default.rb:12
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_package.rb:20
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:33
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:51
0.0.3 failed this metric
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:12
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:15
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:20
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:24
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:25
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:26
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:37
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:38
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:39
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:40
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:45
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:46
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:47
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:52
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:55
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:57
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:58
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:19
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:26
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:28
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/my_openhab.rb:29
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:8
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:9
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:10
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:11
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:14
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:15
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:16
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:19
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:20
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/attributes/default.rb:23
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/default.rb:10
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/default.rb:12
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_package.rb:20
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:33
FC019: Access node attributes in a consistent manner: /tmp/cook/eb4944fb08da828c7658f6c3/openhab/recipes/install_from_source.rb:51