bwssytems / ha-bridge

Home automation bridge that emulates a Philips Hue light system and can control other systems such as a Vera, Harmony Hub, Nest, MiLight bulbs or any other system that has an http/https/tcp/udp interface. This is a compact impl to run on small format computers. This is impl started from this project https://github.com/armzilla/amazon-echo-ha-bridge.
Apache License 2.0
1.45k stars 199 forks source link

Alexa device discovery now broke #1243

Closed smartypantsuk closed 3 years ago

smartypantsuk commented 4 years ago

Hi,

I have been using v5.3.1RC1 for a while, everything has worked well and the 'new device overwrites old device' bug has been fixed. Sadly, and strangely, all my Alexa devices will no longer discover new bridge devices. After much diagnosing I have determined it to be a compatibility issue, possibly caused by an Amazon device update?

Testing: Any v5.x.x version of the bridge does not allow for discovery. The logs show search and response between Alexa device and bridge but nothing is ever found on the Alexa device.

For reference I'm using ha-bridge on Windows 10.

Thanks

luciano968 commented 4 years ago

I think the issue resides with Amazon pushing some sort of update.

smartypantsuk commented 4 years ago

I think the issue resides with Amazon pushing some sort of update.

Yeah. I don't mind re-creating my devices in v4.x.x but when I use v4 I get the bug whereby I can't add new devices as it overides the older devices

Juppers commented 4 years ago

I just tried using 4.5.6 and devices were still not discovered.

ggodart commented 4 years ago

I have same problem with a completely new installation 5.3.0 and 5.3.1rc1 - never used HA-Bridge before. I thought it may be an echo problem so reset it to factory defaults before testing but devices that are correctly defined in HA-Bridge are not discovered by Alexa app. UPnP trace shows comms between Echo and HA-Bridge and sending templates 1, 2 and 3 but Alexa App just reports No Devices found. The guys in Misterhouse have the same problem and suspect a change at Amazon and spoke of something to do with long responses and gzip (beyond my comprehension)

smartypantsuk commented 4 years ago

I just tried using 4.5.6 and devices were still not discovered.

V4.x.x always worked well for me. Just had too many other bugs. Maybe it's some other issue for you. Firewall? Different subnet, port?

ggodart commented 4 years ago

Echo and HA-Bridge connected to same router/subnet, and I can see udp traffic between them so unlikely to be firewall.

smartypantsuk commented 4 years ago

I have same problem with a completely new installation 5.3.0 and 5.3.1rc1 - never used HA-Bridge before. I thought it may be an echo problem so reset it to factory defaults before testing but devices that are correctly defined in HA-Bridge are not discovered by Alexa app. UPnP trace shows comms between Echo and HA-Bridge and sending templates 1, 2 and 3 but Alexa App just reports No Devices found. The guys in Misterhouse have the same problem and suspect a change at Amazon and spoke of something to do with long responses and gzip (beyond my comprehension)

Did they find a fix, is there a link? There is an option to increase a timeout but perhaps not the correct thing. We could try increasing the timeout to 2000 or 3000

ggodart commented 4 years ago

No sign of a fix yet sadly

smartypantsuk commented 4 years ago

No sign of a fix yet sadly

Still, v4 works for me. How odd

phyllox commented 4 years ago

Hello For me, no device can be added/updated since one week. I changed nothing between the time it was working and the time it started not working. Probably an Alexa update. Called them, but they even don'y understand my questions. Here is what I tried, but nothing worked :

ggodart commented 4 years ago

I also tried HA-Bridge 4.5.6 with a clean install, created a device but still discovery didn't work. Tried with 2 versions of echo dot and a full sized echo. I'm pretty sure Amazon has changed the interface/protocol and nixed all third party Hue emulations.

roadsnail commented 4 years ago

Also seeing the same issue (adding new devices) with 5.3.1RC1

Foolishly deleted all my HA-Bridge devices from amazon smart home devices, thinking they'd all return. But nothing detected.

Tried re-installing Gen2 Dot, Gen 3 Dot and Show 8 then re-discovering. No luck.

Then I saw this post regarding V4.x.x, so installed V4.5.6 deleted all in ha-bridge/data directory, added a few dimmable lights but was still unable to add new devices. That was last night. Just for the hell of it ran another discover earlier today, and 3 lights are detected and controllable okay, and one was detected but duplicated. I think one of the duplicates might have been working but I managed to delete the wrong duplicate! Doh! Tried to add the deleted duplicate to no avail.

I then restored V5.3.1RC1 using the /data db and config files as created by 4.5.6, and my 3 working lights are controllable by Alexa. I then tried adding my previously duplicated light, (still with V5.3.1RC1) but it is still not discovered. Currently sticking with my 3 working lights until Amazon resolves this issue whenever that happens to be.

So I can confirm for the sake of smartypantsuk sanity that V4.5.6 sort of worked for me but only after leaving things for about 12 hours before performing a re-discovery. (Some sort of caching thing at the Amazon Alexa device back-end?)

smartypantsuk commented 4 years ago

Also seeing the same issue (adding new devices) with 5.3.1RC1

Foolishly deleted all my HA-Bridge devices from amazon smart home devices, thinking they'd all return. But nothing detected.

Tried re-installing Gen2 Dot, Gen 3 Dot and Show 8 then re-discovering. No luck.

Then I saw this post regarding V4.x.x, so installed V4.5.6 deleted all in ha-bridge/data directory, added a few dimmable lights but was still unable to add new devices. That was last night. Just for the hell of it ran another discover earlier today, and 3 lights are detected and controllable okay, and one was detected but duplicated. I think one of the duplicates might have been working but I managed to delete the wrong duplicate! Doh! Tried to add the deleted duplicate to no avail.

I then restored V5.3.1RC1 using the /data db and config files as created by 4.5.6, and my 3 working lights are controllable by Alexa. I then tried adding my previously duplicated light, (still with V5.3.1RC1) but it is still not discovered. Currently sticking with my 3 working lights until Amazon resolves this issue whenever that happens to be.

So I can confirm for the sake of smartypantsuk sanity that V4.5.6 sort of worked for me but only after leaving things for about 12 hours before performing a re-discovery. (Some sort of caching thing at the Amazon Alexa device back-end?)

The funny thing was i tried v5.3.1.RC1 again last night and it found 2 new devices. Then it wouldn't find anything else after that.

However, you could be right about the caching issue because one of the devices that it found did not exist in the HA-bridge database. It was a test device that I created but then deleted probably a few hours previous. So where did this ghost device come from if not some cache.

roadsnail commented 4 years ago

@smartypantsuk - Re. caching... With regard to my duplicate light I mentioned above, I'm guessing one of them was discovered earlier (under 4.5.6) the other (which did not work from Alexa voice or the Alexa Android App) must be lurking in the cloud somewhere. I definitely reset all of my devices, which presumably clears any on-device stuff? Who knows?

It's interesting that Alexa discover via 5.3.1RC1 managed to pick up any devices. I have had zero success.

ggodart commented 4 years ago

The guys over at Misterhouse think Amazon have changed the protocol to not use gzip in the header requests during discovery. They are going to do some more testing. It seems devices already discovered may continue to work, but once deleted you can only discover them again if they are in a cache somewhere. I think this is going to need someone from HA-Bridge to snoop the network with a real Hue device to see what should be going on and then patch HA-Bridge accordingly, I don't see Amazon helping here unless they cannot discover real Hue devices themselves now.

smartypantsuk commented 4 years ago

Seems very odd. I have some hue stuff here and a signed sniffer but I've decommissioned everything at present. Really like the hue lights but not zigbee in general. It's a shame they didn't go zwave with the hue system.

I digress. Is ha-bridge even developed anymore?

ggodart commented 4 years ago

most recent release was 26 Mar

smartypantsuk commented 4 years ago

@bwssytems Is this still developed?

Perforex commented 4 years ago

I have the same problem with 5.3.0 - Added a new device yesterday and when it wasn't discovered I foolishly removed all devices in the hope that would clear the problem. Alas it only made it worse, now Alexa refuses to find any of my devices that are defined in HA-Bridge.

After several discoveries, similar to someone else who commented, one of my devices re-appeared but nothing in it's definition is in anyway unique . Here's hoping for a solution.

smartypantsuk commented 4 years ago

Okay I've edited the title to better reflect the problem. After further testing it appears that No versions are working with respect to discovery. I tried tonight again with v4 and v5 I now have no devices in Alexa actually responding and discovery doesn't work at all.

jens7841 commented 4 years ago

I can confirm that issue. I build my own Hue-Emulator for an Arduino/ESP-8266 and the Problem is the same. Alexa stoppt discovering the Bridge / the lights... Alexa still find it by UDP/SSDP and calls all URLs correctly but dont show Up the lights... I tried all i know but nothing worked ...

I can only guess, maybe Amazon wants to force us to write an Alexa Skill for that? Some official answers from Amazon would be nice... :D

audiofreak9 commented 4 years ago

I have never had discovery issues very long time user of HA-Bridge, even swapped out routers a year ago without issue (Verizon to Asus). I tried adding a new test device and my echos are able to discover the device. (Gen 1 Echo, multiple Gen 1 & 2 Dots, Gen 1 & 10.1" Premium Show, Gen 1 Spot)

However the alexa smart home page is surely going through changes, the page will change for me to one I've never seen before following these steps (but not every time):

Anyone else seeing this combined page?

smartypantsuk commented 4 years ago

I have never had discovery issues very long time user of HA-Bridge, even swapped out routers a year ago without issue (Verizon to Asus). I tried adding a new test device and my echos are able to discover the device. (Gen 1 Echo, multiple Gen 1 & 2 Dots, Gen 1 & 10.1" Premium Show, Gen 1 Spot)

However the alexa smart home page is surely going through changes, the page will change for me to one I've never seen before following these steps (but not every time):

  • bottom of the page click discovery
  • when discovery is complete refresh the page (F5 or click refresh on the browser)
  • the URL glitches and changes to #cards without content, just a "More" button
  • click Smart Home from the navigation, this displays the following all on one page: my Device Groups, my enabled Smart Home skills, a single box describing how many discovered smart devices I have currently (count is way off, says 196 I have 115) and includes a link to discovery, a box with a list of my devices, a box with a list of my scenes, then at the bottom a red link to delete all devices and groups.

Anyone else seeing this combined page?

Can you confirm the bridge version you are using and try creating a new test device to see if that discovers as of now?

smartypantsuk commented 4 years ago

On an associated note, these changes by Amazon may be related to a development brief I read a few months back. Specifically, that coming soon would be the ability to use some smart home skills offline! In other words, some skills for controlling your smart home will not require to be online. This would be useful and may allow a custom skill to work similar to ha-bridge.

But maybe not. Time will tell.

amyth1884 commented 4 years ago

After deleting devices from here https://www.amazon.in/hz/mycd/myx#/home/alexaPrivacy/deviceHistory, I was able to discover devices but with delays, patience needed, as highlighted somewhere in the thread it takes some time to clear cached devices, to be on safe side I did a 20 sec reboot for the Echo Plus.

phyllox commented 4 years ago

Hello Glad for people who can make it working. For me, whatever I try, still the same, no discovery after a lot of tries. Have to say that I have also a real Hue bridge, and that devices (mainly bulbs) on this Hue bridge are working as before. But devices on Ha-Bridge (power switchs, power plugs...) are not discovered. Real Hue bridge is on canal 20. Could this canal setting be a problem for HA bridge where I did not find a way to configure it ? I have several Zigbee gateways using a different canal (Hue, Xiaomi,, plus 2x Zigbee dongles). Also not clear for me if we are just discussing here between HA-Bridhe users, or if somebody in charge of HA-Bridge software is there - if the softwre is still maintained !? Can the people that have it working say ig they just have HA-Bridge or also a Hue bridge, and maybe send a screenshot of the HA-bridge config ? Thanks

sanderlv commented 4 years ago

Ok, so I added a new device in my habridge to day (5.3.0) and I stumbled on the fact it is not added (discovered) by alexa. "old/existing" devices do work but no new discovered. And then I stumbled on this topic... But I am not seeing a solution yet, correct?

ggodart commented 4 years ago

Correct, I've emailed support@bwssystems.com and info@bwssystems.com and got no reply. Its safe to say that there is no solution to this yet.

sanderlv commented 4 years ago

So this means this ENTIRE project is not functional anymore!? That would be the worst news before christmas after covid :-).

@bwssytems can you please advise?

sanderlv commented 4 years ago

Ok, an important update. I also have the emulated hue component in home assistant installed. I can add a device there and it is discovered!

amyth1884 commented 4 years ago

I don't have hassio, I have manually installed home assistant, could you please share the steps to emulate hue bridge in manually installed home assistant

On Wed 4 Nov, 2020, 9:19 PM sanderlv, notifications@github.com wrote:

Ok, an important update. I also have the emulated hue component in home assistant installed. I can add a device there and it is discovered!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bwssytems/ha-bridge/issues/1243#issuecomment-721811651, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJJZ6I6XXWANXRMSF6M4WTLSOFZW7ANCNFSM4THLD75Q .

sanderlv commented 4 years ago

No sure what you are asking from me...

but some info: https://www.home-assistant.io/integrations/emulated_hue/

Use like below. Because if you use the standard way everything is exposed by default. Took me a lot of time to find out on to how selectively present several devices:

disclaimer: this is the first and last post about this since this is the github for habridge. Please request information about home assistant on their forum.

host_ip: <ipofhass>
listen_port: 80
expose_by_default: false
exposed_domains:
 - light
 - media_player
 - scene
 - lock
 - switch
entities:
  light.name1:
    name: "lamp one"
    hidden: false
  media_player.radio:
    name: "Tuner"
    hidden: false
marcopollacci commented 4 years ago

Same issue here with 5.3.0 and 5.3.1RC1 :( (last week it worked perfectly)

smartypantsuk commented 4 years ago

So this means this ENTIRE project is not functional anymore!? That would be the worst news before christmas after covid :-).

@bwssytems can you please advise?

Worst news before covid. We'll have to give the developer some $$ donations

badgerstate commented 4 years ago

No sign of a fix yet sadly

Unfortunately not.

badgerstate commented 4 years ago

So this means this ENTIRE project is not functional anymore!? That would be the worst news before christmas after covid :-).

@bwssytems can you please advise?

I wonder if he is still supporting the project.

jens7841 commented 4 years ago

I am very interested in the Home-assistant solution. I will check it out. But i also dont think that can be resolved from our side. I think Amazon has broken the discovery without an Alexa Skill at all... I mean Alex finds the emulated bridges but, for whatever reason, dont Show it up... UDP discovery is working and HUE-API calls from Alexa are also working correctly as before... I checked HTTP and UDP calls and answers from Alexa and HA Bridge vs an original HUE bridge. I cant find any problems here. I think we can only try to get an answer from Amazon about this...

marcopollacci commented 4 years ago

I am very interested in the Home-assistant solution. I will check it out. But i also dont think that can be resolved from our side. I think Amazon has broken the discovery without an Alexa Skill at all... I mean Alex finds the emulated bridges but, for whatever reason, dont Show it up... UDP discovery is working and HUE-API calls from Alexa are also working correctly as before... I checked HTTP and UDP calls and answers from Alexa and HA Bridge vs an original HUE bridge. I cant find any problems here. I think we can only try to get an answer from Amazon about this...

I really hope not ;(

audiofreak9 commented 4 years ago

Can you confirm the bridge version you are using and try creating a new test device to see if that discovers as of now?

I am using 5.3.1 RC1

I have a few versions, so I played around and can discover devices without issue: 5.3.0 and a few others.

audiofreak9 commented 4 years ago

Have to say that I have also a real Hue bridge, and that devices (mainly bulbs) on this Hue bridge are working as before.

It has been reported that HA-Bridge discovery fails with a real Hue Bridge online. Have you tried discovery with the real Hue off?

audiofreak9 commented 4 years ago

Brad is still supporting the software, remember however it is as a hobby, not a paid type of thing. You will see rounds of replies when he finds the time, which in my opinion is very frequent for freeware. I've been around since the start, please be patient, things will get worked out.

Personally I believe it’s an Amazon thing. I’ll try to post my config which has existed since nearly day one.

Questions:

smartypantsuk commented 4 years ago

Can you confirm the bridge version you are using and try creating a new test device to see if that discovers as of now?

I am using 5.3.1 RC1

I have a few versions, so I played around and can discover devices without issue: 5.3.0 and a

Have to say that I have also a real Hue bridge, and that devices (mainly bulbs) on this Hue bridge are working as before.

It has been reported that HA-Bridge discovery fails with a real Hue Bridge online. Have you tried discovery with the real Hue off?

I havn't a physical hue hub, or at least one that is in service.

smartypantsuk commented 4 years ago

Brad is still supporting the software, remember however it is as a hobby, not a paid type of thing. You will see rounds of replies when he finds the time, which in my opinion is very frequent for freeware. I've been around since the start, please be patient, things will get worked out.

Personally I believe it’s an Amazon thing. I’ll try to post my config which has existed since nearly day one.

Questions:

  • Who does and doesn't have their device numbers 'locked'? Meaning you've clicked on the numbers from the list and they appear in BOLD. I always lock my device numbers, even the test devices while I’ve tried to replicate the issue.
  • Do you have a user set in security settings?
  • Have you tried clearing all the auto insert users from the Bridge Devices - Manage Links button?
  • What is entered in the settings for your UPNP IP Address field? Mine is the IP of my RPi.
  • What is your Emulated Hue Hub Version set to? Mine is 1939070020 try that, it tells devices what Hue Hub software the bridge is emulating.
  • What is your UPNP Send Delay setting? Mine is 650.

I haven't numbers locked, I didn't know you could lock them.

I have a user set up in security settings.

I've cleared the auto insert users multiple times.

UPNP IP address is the same as the server ha-brisge resides on. I have 'use UPNP address only' checked but have also tried without as that was a bug at some point stopping discovery working.

Emulated hue hub version is default which is all 99999999999. Can't remember how many 9.

650 send delay but have also played with this a lot. Tried 100, 200, 300, 750, 1000 and 1500.


I think this is nothing more than an Amazon update which has broken ha-bridge and the reason some people don't have to issue is that their Amazon devices havn't updated yet, for some reason. We should probably compare Alexa software versions, if that info is available through the app. I'll have a look

smartypantsuk commented 4 years ago

Clearly software versions will vary depending on the Alexa device and generation but let's try comparing software versions because I'm sure guys with working devices may have non-updated devices. Click on the device in the Alexa app then look under the about section for software version. Specify in your post the software version, device type and whether or not ha-bridge is working for you.

Here's mine, ha-bridge not working neither for discovery or control.

Echo Dot - Gen 3 (3 devices) 4262172036

Echo - Gen 2 (1 Device) 658656720

sanderlv commented 4 years ago

Personally I believe it’s an Amazon thing. I’ll try to post my config which has existed since nearly day one. Me too since day 1 the same (~2-3 years) Questions:

* Who does and doesn't have their device numbers 'locked'?  Meaning you've clicked on the numbers from the list and they appear in BOLD.  I always lock my device numbers, even the test devices while I’ve tried to replicate the issue.

I did not know this was possible up until 2 weeks ago when I had "the same sort of troubles. Since then I locked all (expect the newly tried to add one.

* Do you have a user set in security settings?

Not sure what you are asking here... I do no know know of anoption to add users in habridge.

* Have you tried clearing all the auto insert users from the Bridge Devices - Manage Links button?

Not now cause that gave me a headache 2 weeks ago. But Have don it before.

* What is entered in the settings for your UPNP IP Address field?  Mine is the IP of my RPi.

Outside IP address of server running habridge (as described in the document. In my case it's a VM running from the begin (the same VM).

* What is your Emulated Hue Hub Version set to?  Mine is 1939070020 try that, it tells devices what Hue Hub software the bridge is emulating.

From the begin: 9999999999

* What is your UPNP Send Delay setting?  Mine is 650.

For me also 650, from the begin.

sanderlv commented 4 years ago

Clearly software versions will vary depending on the Alexa device and generation but let's try comparing software versions because I'm sure guys with working devices may have non-updated devices. Click on the device in the Alexa app then look under the about section for software version. Specify in your post the software version, device type and whether or not ha-bridge is working for you.

Here's mine, ha-bridge not working neither for discovery or control.

Echo Dot - Gen 3 (4 devices) 4262172036

marcopollacci commented 4 years ago

Echo Dot - Gen 3 (4 devices) 4262172036

Same here

smartypantsuk commented 4 years ago

Can you confirm the bridge version you are using and try creating a new test device to see if that discovers as of now?

I am using 5.3.1 RC1

I have a few versions, so I played around and can discover devices without issue: 5.3.0 and a few others.

Can you get us your device type and software version for your Alexa devices as above? You're the only one with it working on the post. Cheers

sanderlv commented 4 years ago

What would happen if I change the 9999999999 to another number. Will alexa "loose" all? At this point I am not willing to change anything...

marcopollacci commented 4 years ago

What would happen if I change the 9999999999 to another number. Will alexa "loose" all? At this point I am not willing to change anything...

nothing changed to me... yesterday i did this, and tried to discover again...nothing :(