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)
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…
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.
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.
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.
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]
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
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.
Thanks for the clue, I could not find the habridge.config file (data dir is empty) but looking to see if I could create one, I found a command line option which I tried putting in the service file. THe web service is now running :-).
My Exec line now reads…
Arrgh,
Voice control has been working fine since previous post, but has now stopped…
I updated some of the devices’ names to make it easier to use, but Discovery did not update the names, and Alexa showed all the devices as “offline” - although they were still working.
I deleted all the devices on the Dot, but despite repeated Dicovery requests and rebooting Alexa and Pi, the devices listed in the Bridge are not being found.
Not knowingly changed anything else, is there anything else I should do to reenable it?
Hurrah. Finally spotted the problem… the upnp IP address in the Bridge Config had reverted to the default, presumably during a recent power outage. May be it does not get saved, any setting it back to the Pi address has fixed it.
Hi, HA Bridge is functional as is discoverable by the Echo. However, when I test the Bridge device to turn on my MiLight bulbs within Home Assistant, these are the errors I receive:
12-29-2016 23:37:27.833
WARN
Error calling out to HA gateway: IOException in log
com.bwssystems.HABridge.hue.HueMulator
12-29-2016 23:37:27.857
WARN
Error on calling url to change device state: https://MYIP:8123/api/services/homeassistant/turn_on
com.bwssystems.HABridge.hue.HueMulator
Thanks In Advance.