armzilla / amazon-echo-ha-bridge

emulates philips hue api to other home automation gateways
Apache License 2.0
730 stars 168 forks source link

release 0.4.0 doesnt discover devices through Alexa "Smart Home" app but 0.2.1 does #93

Open Kevinmmi opened 7 years ago

Kevinmmi commented 7 years ago

Hi,

Been playing with using this bridge between Alex and OpenHAB v1.8.3 running on a RPi 3. Following the guide http://tinsley.io/2015/06/control-your-items-using-the-amazon-echo-openhab/ I originally downloaded the latest version of the bridge which is 0.4.0 and configured/tested devices using the bridge without any issues, using the following param's running from the same RPi 3.

/usr/jdk/latest/bin/java -jar amazon-echo-bridge-0.4.0.jar --server.port=9090 --upnp.config.address=xx.xx.xx.xx

However when I run the device discovery from the Alexa App it doesn't find any devices, if I then use the previous version it works but I'm wondering what affect that will have going forward and why 0.4.0 doesnt work?

/usr/jdk/latest/bin/java -jar amazon-echo-bridge-0.2.1.jar --server.port=9090 --upnp.config.address=xx.xx.xx.xx

Regards

Kevin

bertvandoninck commented 7 years ago

+1 same issue Ran version 0.4.0 on ubuntu 14 LTS as well as on macOS Sierra. No discovery of devices by the alexa app and website. When downgrading to 0.2.1 discovery worked fine on ubuntu 14 (didn't try again on my mac).

staehler commented 7 years ago

Thanks for your hint. I had the same problem, downgrade to 0.2.1 fixed my problem.

jimkernsjr commented 7 years ago

Hi All... Here are my discoveries: -I seem to have the same experience as you all. So I moved it to a separate Linux installation, and let it start on 8080. Discovered fine. -Removed devices from Amazon, changed the start port to 8083, so it would pick 8081+8082+8083, and discovery no longer works. -Reverted to 2.1, discovery works on 8081

So for me, you can use 0.4.0 if you are ok with the default ports. If not, back to 0.2.1 Hope it helps! BTW...letting it discover, then switching back to 0.4.0 using alternate ports does not work...I have to stay with 0.2.1 if using alternate ports...

fahim- commented 7 years ago

Same problem here with the same behaviour as @jimkernsjr - v0.4.0 runs fine on 8080 but not on any other port. Older versions are happy on any port. Not a massive problem for me as 8080 is fine, but worth noting in the documentation.

Awesome bit of work.

jimkernsjr commented 7 years ago

This code is terrific, and great work! Unfortunately, the author seems inactive or busy. I Wish he could fix it. I don't mind to give it a try and post it, but better someone with real Java experience do it. My experience is C, VB, Python, and I'm sure I could figure it out, but better and faster would be someone used to Java. I dont really have a need to have it fixed, it's just a "would be nice", I'm ok to run it on a seperate machine on 4.0. But for those with just a PI and everything set up in OpenHAB and not wanting to change the port, using 4 is out.
Anyone?

emiliosic commented 7 years ago

@jimkernsjr take a look at this fork: https://github.com/bwssytems/ha-bridge

gregreid commented 7 years ago

Another +1 to this problem. I just upgraded from 0.2.1 because I was hitting the 25 device limitation with 0.2.1, that is supposedly fixed by 0.4.0. But 0.4.0 is unable to discover even a single configured device. I'm using port 8089 because 8080 is already in use by my NAS (where I run the ha bridge emulator). And it seems difficult to change that. :-/

elijahnyp commented 6 years ago

For anybody who finds this, the solution is actually rather simple. Version 0.4.0 works perfectly on other ports BUT you have to add an additional command line argument. When armzilla reworked the code to support more than 25 devices this new code uses a different variable when binding the hue emulator - emulator.portbase. If you want to run version 0.4.0 on a different port, just add --emulator.portbase= AND --server.port= to the command line.