Public | Automated Build

Last pushed: 9 months ago
Short Description
Home Automation Bridge (Philips Hue Emulator)
Full Description

Home Automation Bridge

Use Amazon Echo to voice control your home automation devices through http commands sent to your home automation controller or built-in direct control of the Harmony Hub and Nest.

This is a docker container for bwssystems' ha-bridge - https://github.com/bwssytems/ha-bridge

Install On unRaid:

On unRaid, install from the Community Applications and enter the app folder location, server IP and the port for the webUI Under advanced view. Note: If you change the port, you also have to change the WEBUI address in the "Additional Fields" at the bottom.

After install, open the WebUI to add your Vera, Harmony and Nest settings.

Install On Other Platforms (like Ubuntu or Synology 5.2 DSM, etc.):

On other platforms, you can run this docker with the following command:

docker run -d --name="Home-Automation-Bridge" --net="host" -e SERVERIP="192.168.X.X" -e SERVERPORT="XXXX" -v /path/to/config/:/config:rw -v /etc/localtime:/etc/localtime:ro aptalca/home-automation-bridge

  • Replace the SERVERIP variable (192.168.X.X) with your server's IP
  • Replace the SERVERPORT variable (XXXX) with whichever port you choose for the web gui.
  • Replace the "/path/to/config" with your choice of location
  • If the -v /etc/localtime:/etc/localtime:ro mapping causes issues, you can try -e TZ="<timezone>" with the timezone in the format of "America/New_York" instead
Optional Variables for the run command
  • By default, this will install the latest version on bwssystems github repo, and will auto update itself to the latest version on each container start, but if you want to run a different version (to go back to the previous version perhaps), include the following environment variable in your docker run command -e VERSION="X.X.X"
  • Once installed, open the WebUI at http://SERVERIP:SERVERPORT/ and enter your Vera, Harmony and Nest info.

Changelog:

  • 2016-11-11 - Change java app to run as root for port 80 binding
  • 2016-05-05 - Auto updates on restart (unless manual version is input)
  • 2016-05-04 - Update to ver 2.0.4
  • 2016-05-01 - Update to ver 2.0.3
  • 2016-04-28 - Update to ver 2.0.1
  • 2016-03-29 - Update to ver 1.4.3
  • 2016-03-26 - Update to ver 1.4.2
  • 2016-03-19 - Update to ver 1.4.1 - Vera, Harmony and Nest settings are now managed through the WebUI
  • 2016-02-03 - Update to ver 1.3.7 - Support for Nest added as well as support for multiple Veras and Harmonys
  • 2015-12-16 - Update to ver 1.2.3
  • 2015-12-07 - Update to ver 1.2.2
  • 2015-12-04 - Update to ver 1.2.1
  • 2015-11-19 - Update to ver 1.1.0
  • 2015-11-13 - Update to ver 1.0.8
  • 2015-11-04 - Update to ver 1.0.7 / Environment variables updated to include support for Harmony
  • 2015-10-25 - Update to ver 0.4.10
  • 2015-09-15 - Update to ver 0.4.4 / Update variables for Harmony compatibility
  • 2015-09-01 - Update to ver 0.4.0
  • 2015-08-28 - Initial Release
Docker Pull Command
Owner
aptalca
Source Repository

Comments (8)
gwichman
7 months ago

In case it helps anyone, I got it working on my Synology via containerstation..

QNAP TVS-671
QTS 4.2.3

basic steps:

  1. install containerstation through the app center
  2. open containerstation, create container
  3. search for and install home-automation-bridge
  4. click create
  5. click advanced settings (in the container create dialog)
  6. click environment (in advanced settings dialog)
  7. add SERVERIP and SERVERPORT env variables. Set to whatever your qnap IP is and whatever port you want it to listen on (i used 8008).
  8. click on network (in advanced settings dialog)
  9. change network mode from NAT to Host
  10. click "create" to create the container
  11. navigate to http://SERVERIP:SERVERPORT/
cabldawg
8 months ago

Current default time zone: 'America/New_York'
Local time is now: Tue Dec 27 17:54:25 EST 2016.
Universal Time is now: Tue Dec 27 22:54:25 UTC 2016.

Latest version on bwssystems github repo is 3.5.1

Using existing version '3.5.1'

Setting correct permissions
Parameters used:
Server IP : 192.168.0.3
Server Port : 3080
Starting Home Automation Bridge
2016-12-27 17:54:36,887 [main] INFO com.bwssystems.HABridge.HABridge - HA Bridge (v3.5.1) starting....
2016-12-27 17:54:36,952 [main] INFO com.bwssystems.HABridge.BridgeSettings - reading from config file: data/habridge.config
2016-12-27 17:54:37,196 [main] WARN com.bwssystems.HABridge.BridgeSettings - The upnp config address, 192.168.0.3, does not match any known IP's on this host.
2016-12-27 17:54:37,197 [main] INFO com.bwssystems.HABridge.HABridge - HA Bridge initializing....
2016-12-27 17:54:37,248 [main] INFO com.bwssystems.HABridge.SystemControl - System control service started....
2016-12-27 17:54:37.495:INFO::Thread-0: Logging initialized @2827ms
2016-12-27 17:54:37,680 [Thread-0] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
2016-12-27 17:54:37,683 [Thread-0] INFO spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:3080
2016-12-27 17:54:37.687:INFO:oejs.Server:Thread-0: jetty-9.3.z-SNAPSHOT
2016-12-27 17:54:38.013:INFO:oejs.ServerConnector:Thread-0: Started ServerConnector@4c5a0b5{HTTP/1.1,[http/1.1]}{0.0.0.0:3080}
2016-12-27 17:54:38.015:INFO:oejs.Server:Thread-0: Started @3355ms
2016-12-27 17:54:38,176 [main] INFO com.bwssystems.harmony.HarmonyServer - setup initiated ....
2016-12-27 17:54:40,135 [main] INFO com.bwssystems.harmony.HarmonyServer - activity changed: [-1] PowerOff
2016-12-27 17:54:40,636 [main] INFO com.bwssystems.HABridge.devicemanagmeent.DeviceResource - HABridge device management service started....
2016-12-27 17:54:40,657 [main] INFO com.bwssystems.HABridge.upnp.UpnpSettingsResource - Hue description service started....
2016-12-27 17:54:40,661 [main] INFO com.bwssystems.util.UDPDatagramSender - Initializing UDP response Seocket...
2016-12-27 17:54:40,664 [main] INFO com.bwssystems.util.UDPDatagramSender - UDP response Seocket initialized to: 50000
2016-12-27 17:54:40,678 [main] INFO com.bwssystems.HABridge.hue.HueMulator - Hue emulator service started....
2016-12-27 17:54:40,694 [main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener starting....
2016-12-27 17:54:40,696 [main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener running and ready....
2016-12-27 19:28:14,436 [Smack Executor Service 0 (1)] INFO com.bwssystems.harmony.HarmonyServer - activity changed: [23232609] Watch Roku
* An error occurred. Aborting.

Shutting down /etc/my_init.d/firstrun.sh (PID 10)... Init system aborted.
Killing all processes... Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
* Running /etc/my_init.d/firstrun.sh...
setting the correct local time

Current default time zone: 'America/New_York'
Local time is now: Tue Dec 27 20:40:24 EST 2016.
Universal Time is now: Wed Dec 28 01:40:24 UTC 2016.

Latest version on bwssystems github repo is 3.5.1

Using existing version '3.5.1'

Setting correct permissions
Parameters used:
Server IP : 192.168.0.3
Server Port : 3080
Starting Home Automation Bridge
2016-12-27 20:40:28,943 [main] INFO com.bwssystems.HABridge.HABridge - HA Bridge (v3.5.1) starting....
2016-12-27 20:40:29,011 [main] INFO com.bwssystems.HABridge.BridgeSettings - reading from config file: data/habridge.config
2016-12-27 20:40:29,227 [main] WARN com.bwssystems.HABridge.BridgeSettings - The upnp config address, 192.168.0.3, does not match any known IP's on this host.
2016-12-27 20:40:29,227 [main] INFO com.bwssystems.HABridge.HABridge - HA Bridge initializing....
2016-12-27 20:40:29,249 [main] INFO com.bwssystems.HABridge.SystemControl - System control service started....
2016-12-27 20:40:29.424:INFO::Thread-0: Logging initialized @2454ms
2016-12-27 20:40:29,590 [Thread-0] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
2016-12-27 20:40:29,593 [Thread-0] INFO spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:3080
2016-12-27 20:40:29.600:INFO:oejs.Server:Thread-0: jetty-9.3.z-SNAPSHOT
2016-12-27 20:40:29.849:INFO:oejs.ServerConnector:Thread-0: Started ServerConnector@603fbc48{HTTP/1.1,[http/1.1]}{0.0.0.0:3080}
2016-12-27 20:40:29.849:INFO:oejs.Server:Thread-0: Started @2882ms
2016-12-27 20:40:30,078 [main] INFO com.bwssystems.harmony.HarmonyServer - setup initiated ....
2016-12-27 20:40:32,186 [main] INFO com.bwssystems.harmony.HarmonyServer - activity changed: [23232609] Watch Roku
2016-12-27 20:40:32,556 [main] INFO com.bwssystems.HABridge.devicemanagmeent.DeviceResource - HABridge device management service started....
2016-12-27 20:40:32,577 [main] INFO com.bwssystems.HABridge.upnp.UpnpSettingsResource - Hue description service started....
2016-12-27 20:40:32,581 [main] INFO com.bwssystems.util.UDPDatagramSender - Initializing UDP response Seocket...
2016-12-27 20:40:32,583 [main] INFO com.bwssystems.util.UDPDatagramSender - UDP response Seocket initialized to: 50000
2016-12-27 20:40:32,596 [main] INFO com.bwssystems.HABridge.hue.HueMulator - Hue emulator service started....
2016-12-27 20:40:32,611 [main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener starting....
2016-12-27 20:40:32,613 [main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener running and ready....
2016-12-27 21:36:27,862 [main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener - ended, restart found
2016-12-27 21:36:27,862 [main] INFO com.bwssystems.HABridge.HABridge - HA Bridge (v3.5.1) reinitialization requessted....
2016-12-27 21:36:27,868 [main] INFO spark.webserver.JettySparkServer - >>> Spark shutting down ...
2016-12-27 21:36:27.892:INFO:oejs.ServerConnector:main: Stopped ServerConnector@603fbc48{HTTP/1.1,[http/1.1]}{0.0.0.0:3080}
2016-12-27 21:36:27,899 [main] INFO spark.webserver.JettySparkServer - done
2016-12-27 21:36:27,901 [main] INFO com.bwssystems.HABridge.BridgeSettings - reading from config file: data/habridge.config
2016-12-27 21:36:27,905 [main] WARN com.bwssystems.HABridge.BridgeSettings - The upnp config address, 192.168.0.3, does not match any known IP's on this host.
2016-12-27 21:36:27,905 [main] INFO com.bwssystems.HABridge.HABridge - HA Bridge initializing....
2016-12-27 21:36:27,906 [main] INFO com.bwssystems.HABridge.SystemControl - System control service started....
2016-12-27 21:36:27,918 [Thread-15] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
2016-12-27 21:36:27,918 [Thread-15] INFO spark.webserver.JettySparkServer - >> Listening on 192.168.0.3:3080
2016-12-27 21:36:27,926 [main] INFO com.bwssystems.harmony.HarmonyServer - setup initiated ....
2016-12-27 21:36:27.927:INFO:oejs.Server:Thread-15: jetty-9.3.z-SNAPSHOT
2016-12-27 21:36:27,932 [Thread-15] ERROR spark.webserver.JettySparkServer - ignite failed

java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:326)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:244)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:384)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at spark.webserver.JettySparkServer.ignite(JettySparkServer.java:131)
at spark.SparkInstance.lambda$init$0(SparkInstance.java:341)
at java.lang.Thread.run(Thread.java:745)
Running /etc/rc.local... Booting runit daemon...
* Runit started as PID 82
Dec 27 21:36:28 b0459d8febb5 syslog-ng[89]: syslog-ng starting up; version='3.5.3'

Dec 27 22:17:01 b0459d8febb5 /USR/SBIN/CRON[95]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Shutting down runit daemon (PID 82)... Killing all processes...
Running /etc/my_init.d/00_regen_ssh_host_keys.sh... Running /etc/my_init.d/firstrun.sh...
setting the correct local time

Current default time zone: 'America/New_York'
Local time is now: Tue Dec 27 23:04:35 EST 2016.
Universal Time is now: Wed Dec 28 04:04:35 UTC 2016.

Latest version on bwssystems github repo is 3.5.1

Using existing version '3.5.1'

Setting correct permissions
Parameters used:
Server IP : 192.168.0.3
Server Port : 3080
Starting Home Automation Bridge
2016-12-27 23:04:43,935 [main] INFO com.bwssystems.HABridge.HABridge - HA Bridge (v3.5.1) starting....
2016-12-27 23:04:44,031 [main] INFO com.bwssystems.HABridge.BridgeSettings - reading from config file: data/habridge.config
2016-12-27 23:04:44,200 [main] WARN com.bwssystems.HABridge.BridgeSettings - The upnp config address, 192.168.0.3, does not match any known IP's on this host.
2016-12-27 23:04:44,201 [main] INFO com.bwssystems.HABridge.HABridge - HA Bridge initializing....
2016-12-27 23:04:44,229 [main] INFO com.bwssystems.HABridge.SystemControl - System control service started....
2016-12-27 23:04:44.431:INFO::Thread-0: Logging initialized @2339ms
2016-12-27 23:04:44,607 [Thread-0] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
2016-12-27 23:04:44,611 [Thread-0] INFO spark.webserver.JettySparkServer - >> Listening on 192.168.0.3:3080
2016-12-27 23:04:44.615:INFO:oejs.Server:Thread-0: jetty-9.3.z-SNAPSHOT
2016-12-27 23:04:44,919 [Thread-0] ERROR spark.webserver.JettySparkServer - ignite failed

java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:326)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:244)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:384)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at spark.webserver.JettySparkServer.ignite(JettySparkServer.java:131)
at spark.SparkInstance.lambda$init$0(SparkInstance.java:341)
at java.lang.Thread.run(Thread.java:745)
Running /etc/rc.local... Booting runit daemon...
* Runit started as PID 62
Dec 27 23:04:45 b0459d8febb5 syslog-ng[69]: syslog-ng starting up; version='3.5.3'

cabldawg
8 months ago

Unraid 6.2.4

Updating the HA Bridge

Pulling image: aptalca/home-automation-bridge:latest
IMAGE ID [latest]: Pulling from aptalca/home-automation-bridge.
IMAGE ID [6ffe5d2d6a97]: Already exists.
IMAGE ID [f4e00f994fd4]: Already exists.
IMAGE ID [e99f3d1fc87b]: Already exists.
IMAGE ID [a3ed95caeb02]: Already exists.
IMAGE ID [ededd75b6753]: Already exists.
IMAGE ID [1ddde157dd31]: Already exists.
IMAGE ID [460fa214eca6]: Pulling fs layer. Downloading 100% of 376 MB. Verifying Checksum. Download complete. Extracting. Pull complete.
IMAGE ID [3e0cc22e1445]: Pulling fs layer. Downloading 100% of 768 B. Verifying Checksum. Download complete. Extracting. Pull complete.
IMAGE ID [1dc0051b5715]: Pulling fs layer. Downloading 100% of 767 B. Verifying Checksum. Download complete. Extracting. Pull complete.

TOTAL DATA PULLED: 376 MB

Error: layers from manifest don't match image configuration

aptalca
a year ago

Hi jakerio83,

The server ip and the port have to be passed as environment variables during container creation as shown in the example run command above. I'm not sure what the qnap's docker interface looks like but there has to be a way to add environment variables.

If you continue having issues, please open a ticket on github that is linked under "Source Repository" on the right hand side of this page.

jakerio83
a year ago

Hi Guys,

I am having an issue with getting the IP address and port number. I am currently run this through Qnap container station and pulled the home-automation-bridge from here. Every time i start the image, everything seemed to run okay but in the field below are empty. I tried to modify in the network setting of the container station but seemed like it doesn't take input. And i also tired to integrated to the commands at the command field box after the /sbin/my_init with --server.port=8008 --upnp.config.address=192.168.1.241, but i don't think my syntax are correct. Any input would much appreciated . thx

Setting correct permissions
Parameters used:
Server IP :
Server Port :
Starting Home Automation Bridge

aptalca
a year ago

Seanford, I'm not sure how exactly docker is implemented in synology but if it's through command line, you would delete the existing container, do a docker pull to update the image and then do the same docker run command you did originally to create a new updated container. All your settings will be preserved as long as you use the same docker run command (settings are saved in the config folder you defined and are not deleted when the container is removed).

Here is a post detailing the steps: https://forum.synology.com/enu/viewtopic.php?t=107508

seanford
a year ago

What is the procedure for updating the bridge on a synology? I've got 1.4.3 running, but would like to upgrade to 2.0.3....just not sure what the official method for doing so is.

airedale
2 years ago

Your startup file is supposed to pull the jar file based on a version. 0.4.4 does not exist on your website. Please put that version up. I have corrected by setting a lower version to download the jar.