Haiku Using Amazon Alexa devices (Echo, Dot, Tap, etc.) with HAI

I used the other HA-Bridge because I thought the interface was a little better and easier to use especially for dimming.
 
To add a new device you have to provide the link to the page we provided the code on your local server to call out to HaikuHelper.
 
So you put the one page we coded in this thread in your apache server.  I pass the ID (the UPB ID) in the URL so you can have one page to activate everything.
 
I appreciate your patience.  I'm such a novice at this and trying to learn as I go.  I've read through this topic several times and the readme for https://github.com/bwssytems/ha-bridge and I'm very lost.  I'll run through everything I've done so far so you can tell me the next step.
 
1. In the terminal screen on my Mac mini I made sure it was running JDK 1.8 by typing 'java -version'. I'm running 'build 1.8.0_111-b14'
 
2. In the terminal I typed 'sudo apachectl start' then entered my password. When I put http://localhost in my browser it comes back with the "It Works!" text.
 
3. In the terminal i typed java -jar ha-bridge-3.2.0.jar. Everything appears to have loaded correctly.  There is a long string but it did have one error:
ERROR spark.webserver.JettySparkServer - ignite failed java.net.SocketException: Permission denied
After it ran it returned to a command prompt
 
4. I located the Library/Webserver/Documents folder
 
That's all I've done so far. I still can't access the web browser.
 
I apologize for my ignorance. I haven't coded before, and trying to learn on the fly.  It would be great if you could provide detailed step by step instructions on what I may have missed, or what I need to do next.
 
FYI. My Mac mini is running os x el capitan version 10.11.6
 
Again, thank you so much for your help.
 
@dwpaddack #3 is not good. I would try running the command as root. Unless you background the bridge it should not be returning to the command prompt so that error needs to be corrected. Let us know if that helps, then we can move to the next step.
 
To run the command as root I need to type 'sudo  java -jar ha-bridge-3.2.0.jar' in the terminal?  I told you I'm a novice.  :wacko:
 
Alright, I did that and it came back with 
'ERROR spark.webserver.JettySparkServer - ignite failed java.net.BindException: Address already in use'
 
I believe that the bridge uses port 8080 by default. Do you have anything else on that Mini that might be using that port?
 
In that case, add the parameter

-Dserver.port=<port number> (with some port number that you are not using).
 
Not sure if that is the correct syntax for your version of the bridge but try it. If it does not like the parm, then send me the link for where you got the ha-bridge and I'll have a look.
 
Paddack-Mac-mini:downloads dwpaddack$ sudo java -jar ha-bridge-3.2.0.jar -Dserver.port=8081
Password:
2016-10-20 09:08:00,592 [main] INFO  com.bwssystems.HABridge.HABridge - HA Bridge (v3.2.0) starting....
2016-10-20 09:08:00,604 [main] INFO  com.bwssystems.HABridge.BridgeSettings - reading from system properties
2016-10-20 09:08:00,610 [main] INFO  com.bwssystems.HABridge.BridgeSettings - Adding 192.168.1.177 as our default upnp config address.
2016-10-20 09:08:00,610 [main] INFO  com.bwssystems.HABridge.HABridge - HA Bridge (v3.2.0) initializing....
2016-10-20 09:08:00,619 [main] INFO  com.bwssystems.HABridge.SystemControl - System control service started....
2016-10-20 09:08:00.719:INFO::Thread-0: Logging initialized @712ms
2016-10-20 09:08:00,763 [main] WARN  com.bwssystems.HABridge.dao.DeviceRepository - Error reading the file: data/device.db - Does not exist or is not readable. continuing...
2016-10-20 09:08:00,764 [main] INFO  com.bwssystems.HABridge.devicemanagmeent.DeviceResource - HABridge device management service started.... 
2016-10-20 09:08:00,779 [main] INFO  com.bwssystems.HABridge.upnp.UpnpSettingsResource - Hue description service started....
2016-10-20 09:08:00,782 [main] INFO  com.bwssystems.util.UDPDatagramSender - Initializing UDP response Seocket...
2016-10-20 09:08:00,786 [main] INFO  com.bwssystems.util.UDPDatagramSender - UDP response Seocket initialized to: 50000
2016-10-20 09:08:00,828 [Thread-0] INFO  spark.webserver.JettySparkServer - == Spark has ignited ...
2016-10-20 09:08:00,838 [Thread-0] INFO  spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:80
2016-10-20 09:08:00.848:INFO:eek:ejs.Server:Thread-0: jetty-9.3.z-SNAPSHOT
2016-10-20 09:08:00,925 [Thread-0] ERROR spark.webserver.JettySparkServer - ignite failed
java.net.BindException: Address already in use
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)
Paddack-Mac-mini:downloads dwpaddack$ 
 
Is it the correct port? I use the haconfig file. I'm not home on my phone so I don't know but look for that file.
 
Back
Top