armzilla / amazon-echo-ha-bridge

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

bridge emulator stops being able to connect to devices #7

Open terryhonn opened 9 years ago

terryhonn commented 9 years ago

Hi, hoping you can help. I'm using your emulator and loving the potential, but my issue is that having started the emulator, adding devices, etc., everything seems to work very well for a few commands, then the Echo begins to report that it can't connect to the specific device or group named 'whatever'. Once this happens, all future attempts to control devices results in the same error. Once I restart the app and try again, it works for a random number of times (sometimes 1, sometimes as many as a dozen or so), then stops working. I can provide logs if it would help. I should mention that I'm not using this to connect to a Vera, but to a Smartthings endpoint via the urls.

Thanks very much for this code, and any help you can provide!

armzilla commented 9 years ago

curious to see what the bridge is responding back when you are seeing failure. After you are seeing failures can you do a GET on the following resources:

terryhonn commented 9 years ago

I'm currently unable to duplicate the issue, Arm. I almost hate it more when stuff starts working for no apparent reason than when it quits working for no apparent reason :)

Eric2XU commented 9 years ago

I am having the issue as well. I ran wireshark while asking Echo to turn something on and I noticed no packets coming from the Echo. Also when I went into the Amazon Settings for Connected Home everything was showing offline. Restarting the bridge didn't resolve anything. The only thing that made it start working was clearing everything and re-running discovery.

I don't think the issue is on the bridge side unless its related to some sort of ping / check-in with the echo that is being missed?

Eric2XU commented 9 years ago

I have an update to this, so this morning Echo wasnt working with the bridge, I noticed again no packets coming from the Echo. I restarted only the Echo and things started working again. This tells me there is a bug in the echo OR some sort of keepalive communications is missing from the emulator. and the echo finally stops talking to the unit.

Eric2XU commented 9 years ago

Yet another update, its looking like a Echo issue not a bridge issue. Turns out the only thing that can fix this for me now isnt power cycling but actually re-registering the wifi of the unit. Once done it starts talking on the network once more.

okachobi commented 9 years ago

What brand of wireless access point do you use?

Eric2XU commented 9 years ago

EnGenius EAP600, All other functions of the echo work perfectly fine (music streaming, asking questions, etc...)

Eric2XU commented 9 years ago

Hopefully a final update to this issue (at least for me). Turns out Echo remembers more then one WiFi SSID. I had a second SSID that was internet-only, so when Echo stopped talking to the network it was because at least in my case it was on a different network. Hope it helps others.

armzilla commented 9 years ago

is this still an issue?

tomdotorg commented 8 years ago

I just had the problem for the first time. I am running it in a Docker container if that makes a difference. I am happy to wait until I am having the issue and then run whatever diagnostics make sense.. It took a week or so for it to crop up.

I was able to see that the echobridge config/test web page was up and running correctly. So I could turn on and off any device from there OK. But when I initiated it from the echo, she reported that she didn't know what the problem is.

A little more on what I did, because it seems like my issue might be different..

I tried removing all devices from the Echo and re-discovering. No change. I could see that the echo was talking to the bridge, or at least that some seemingly-relevant log messages are there. It took restarting the bridge to fix it.

Happy to do whatever I can to help, and thanks for making this awesome software available.