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!
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.
- 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
Tested succesful on:
- Ubuntu 12.04
- Ubuntu 14.04
- Raspbian (source-only)
openhab
- Installs openhabopenhab::init_script
- Installs openhab init.d scriptopenhab::my_openhab
- Installs my.openhab addon .jaropenhab::habmin
- Installs HABmin console
Key | Type | Description | Default |
---|---|---|---|
['openhab']['install_java'] | Boolean | Whether to install java via the java cookbook | true |
['openhab']['install_method'] | String | Whether to install openhab via the deb packages (default) or via 'source' | 'package' |
['openhab']['version'] | String | What version of openhab to install | 1.7.1 |
['openhab']['plugins'] | Array | List of plugins to install | [] |
Key | Type | Description | Default |
---|---|---|---|
['openhab']['http_port'] | String | HTTP Port for the init script | 8080 |
['openhab']['https_port'] | String | HTTPS Port for the init script | 8443 |
Key | Type | Description | Default |
---|---|---|---|
['openhab']['install_dir'] | String | Which directoy to install 'openhab' into | '/opt' |
['openhab']['user'] | String | What user to run install as | root |
['openhab']['group'] | String | What user to run install as | root |
Key | Type | Description | Default |
---|---|---|---|
['openhab']['my']['version'] | String | Which version of the my.openhab plugin to install | 1.7.0 |
Key | Type | Description | Default |
---|---|---|---|
['openhab']['habmin']['install_dir'] | String | Where to install habmin | /opt/openhab/webapps/habmin |
['openhab']['habmin']['git_repository'] | String | Which repo to download habmin from | https://github.com/cdjackson/HABmin |
['openhab']['habmin']['git_revision'] | String | Which ref of habmin to use | e523d77c7a3d73d75ce050a582a3bfe8bc7a1324 |
['openhab']['habmin']['user'] | String | What user to run install as | root |
['openhab']['habmin']['group'] | String | What group to run install as | root |
-
- Make sure you have Java setup:
{
attributes: {
java: {
install_flavor: 'oracle',
jdk_version: '8',
oracle: {accept_oracle_download_terms: true}
}
}
}
-
- Pick some plugins:
{
attributes: {
openhab: {
plugins: %w{binding-xbmc action-xbmc binding-twitter persistance-mysql}
}
}
}
-
- Include
openhab
in your node's run_list:
- Include
{
"run_list": [
"recipe[apt]",
"recipe[openhab]"
]
}
-
- ???
-
- 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.
If you want to install an init.d script for booting, use the openhab::init_script
recipie. Currently only Raspbian is supported.
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.
Author:: Justin Aiken