Emulated Hue problems

I logged mine against ha-bridge but closed the ticket as I’ve made the assumption (unconfirmed) that Echosim.io does not expose your home automation devices to Alexa? As I’m in NZ, The Echo is not readily available so I’ve put everything on hold until my two new ‘Dot’s’ turn up mid Nov.

Is this just a matter on installing homebridge on the same Pi then installing the homebridge-harmonyhub plugin?

@jbardi just experimenting with both and I also get some unstable behavior with the emulated hue (actually HASS does sometimes does not want to start and throws error concerning the emulated hue, other times hass starts without a problem).

HA bridge seems stable.

However HA_bridge seems quit a lot of work to setup (I have about 70 lights/switches, 20 sensors etc,) and for every device an on & off. Is there an easy way to do this at scale?

@jbardi another Q: Could you also explain how you did the control of a climate component in HA_bridge?

Back to the install for a moment, I’ve installed the latest version 3.2.2 and I’m trying to execute it. according the the habridge log file, It tries to load the config file from the data directory, but can’t find it. It doesn’t seem to be to upset about that, but then gives the following error, that makes me think I may be missing something with the web server.

2016-11-13 09:13:04,128 [Thread-0] INFO  spark.webserver.JettySparkServer - == Spark has ignited ...
2016-11-13 09:13:04,136 [Thread-0] INFO  spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:80
2016-11-13 09:13:04.147:INFO:oejs.Server:Thread-0: jetty-9.3.z-SNAPSHOT
2016-11-13 09:13:04,457 [Thread-0] ERROR spark.webserver.JettySparkServer - ignite failed
java.net.SocketException: Permission denied
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)

Any thoughts?

I think I had similar errors after updating to 3.2.2. Previously working fine.

There is a read error on first boot that is normal, goes away on next launch.

It seemed permissions related so I changed the paths to absolute rather than relative. I had to do this in the actual habridge.config file itself, wouldn’t seem to stick via web interface. Perhaps check permissions while you are at it. On the Pi all in one install, instead of just “data/habridge.config” & “data/device.db” I used…

/home/pi/habridge/data/habridge.config

/home/pi/habridge/data/device.db

Perhaps we need a dedicated Ha-Bridge thread.

While we are here - does anyone know how to control media player volume via the dim command?

that may be part of the problem. I can’t find a habridge.config or device.db file anywhere?

How and what did you install it on?

If it’s Raspberry PI AIO it’s a directory or two above the home assistant folder.

/home/hass/.homeassistant

vs

/home/pi/habridge/

How do you access and edit the HASS config files?

I did this, https://github.com/bwssytems/ha-bridge and created the habridge under the /home/pi directory and did not run it from the virtual environment.

Should be in /home/pi/habridge/data then. Same as mine.

device.db might not be created until first run, but habridge.config is the bit that tells it where to live.

If you are able to load up the web interface try changing the locations under bridge control/setup - I think it is the second tab but don’t have it in front of me.

Secondly - the instructions on BWS needed a little tweaking for auto launching the AIO version - I’m not home so can’t check right now but I posted somewhere what the changes were, just not this thread - I’ll have a look and come back.

EDIT: Here

Basically… The instructions linked to an amazon-echo folder at one point but looks to have been fixed…

I’ve since started renaming the ha-bridge-3.2.x.jar to just ha-bridge.jar each time I upgrade so I don’t need to adjust it.

Thanks,
Now I’m not at home. I’ll give it a try when I get home after work.

I’m not sure if it makes a difference but I used the full version of Raspbian, not lite.

Here's a pic of the tab in web interface with settings

I’ll try it when I get home and respond.

Can’t get to the webserver. Tried running the jar file again and got several seemingly successful messages, then this.

2016-11-14 17:46:40,645 [Thread-0] INFO  spark.webserver.JettySparkServer - == Spark has ignited ...
2016-11-14 17:46:40,652 [Thread-0] INFO  spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:80
2016-11-14 17:46:40.664:INFO:oejs.Server:Thread-0: jetty-9.3.z-SNAPSHOT
2016-11-14 17:46:40,844 [Thread-0] ERROR spark.webserver.JettySparkServer - ignite failed

Where do I get the spark webserver?
Do I need it vs the one used by HA?
I’m guessing it should have gotten the web server from the non-existing ha-bridge.config file?

GOT IT. It was on port 80. I’ve moved it to 8080 now so it’s more standard. Once I ran the web interface, the config file showed up. The database still isn’t there, but it’s a step in the right direction.

TIL… what cool things were hiding in the options button.

At the bottom of a few of the tabs is a backup option too - backup devices, backup config. Puts the file in the same directory as the originals and names and dates it. You can also restore.

Very handy if you have a habit of breaking things with ill-thought ideas and changing a bunch of things at once.

Actually I was talking about the posting editor. I didn’t know about the “Hide Details” button until I saw your post. That’s going to come in handy.

Oh, that was me trying out a new button I found while trying to work out how to post a photo.

[details=Embarrassing Comprehension failure.]
Shamefully I just spent ten minutes trying to find this “Hide Details” button in Ha-Bridge before it clicked.[/details]

1 Like

You will want to do this

Hi
I am having a similar problem to turboc, I am trying to run HABridge on a Rasp Pi2 with latest version of full Raspbian installed via NOOBS. I have downloaded HA 3.5.1, renamed it and changed the service file, but I get the “SparkServer failed to ignite” issue.
I have checked the output when running the jar file and it shows “Listening on Port 80”.

How do I change the Spark Port to 8080?
I cannot find the Jetty folder
java -jar start.jar -Djettyport=8080 fails … “cannot find start.jar”
$JETTY_HOME does not appear to be defined, and so I am now at a loss

Thanks for a pointer
Octo

I’m not sure if this is exactly what you are asking but…

If you navigate to the …\habridge\data\habridge.config file and edit ..."serverport":80,"... to …"serverport":8080,"… you can change the habridge listening port if you are unable to get to the habridge webinterface to configure.