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

Devices Disappearing #1363

Open lotusgary opened 2 years ago

lotusgary commented 2 years ago

All my HA-Bridge devices keep disappearing from Alexa. I've updated to V5.4.1 and got the 9 Octet setting on (and have re-numbered). Re-discovery works (after a few attempts) but then after 24 hours or so they all disappear again

lotusgary commented 2 years ago

This has happened again over the weekend (nearly) all my ha-bridge devices have just disappeared from the Alexa app. Interestingly a few seem to have stayed this time.

lotusgary commented 2 years ago

This happened again overnight. Yesterday everything was working fine. This morning all ha-bridge devices lost by alexa. Turned all bar one alexa off and did re-discovery and all came back.

Is alexa doing some sort of weekly re-discover?

SehlingS commented 2 years ago

The same for me, the devices will be forgotten from one to the other day. Everybody an idea? I can learn them again and everything is working fine for some days.

lotusgary commented 2 years ago

I'm getting it happening over every weekend - can't believe it is just is two!

Xeno22 commented 2 years ago

Same here. I only lost some of my devices, not all. Alexa App says: Server does not respond. Deleted the devices from Alexa and they reappeared, but still: Server does not respond. Renumbered them: not found anymore. Somehow this happened after I replaced one EchoG1 by an EchoG2. Coincidence?

AdamB2023 commented 1 year ago

Same issue here. The device usually disappears within 24 hours from Alexa app, but is still visible in HA Bridge, and need to be manually added again. It makes ha-bridge not useable. Is there any developer who could take a look?

Xeno22 commented 1 year ago

Same issue here. The device usually disappears within 24 hours from Alexa app, but is still visible in HA Bridge, and need to be manually added again. It makes ha-bridge not useable. Is there any developer who could take a look?

Each Echo seems to have its own „known device list“ cache - which is hard to reset - so it even depends on which Echo is currently on the LAN. Here everything started to fail after I removed my old Gen1 Echo which seems to had the most complete list of all my devices.

The solution for my issue was to remove all affected ha emulated devices from the Echos, enable 9 octets in ha bridge and renumber them. Then all devices should be found again by the Echos as new devices. This is still stable here since months.

lotusgary commented 1 year ago

The problem seems to be getting worse for me. My Ha-bridge devices have been disappearing from Alexa pretty much on a daily basis lately - yesterday it happened twice.

I've got 9 octets enabled and have removed all devices, power cycled etc but nothing seems to improve the situation

AdamB2023 commented 1 year ago

The problem seems to be getting worse for me. My Ha-bridge devices have been disappearing from Alexa pretty much on a daily basis lately - yesterday it happened twice.

I've got 9 octets enabled and have removed all devices, power cycled etc but nothing seems to improve the situation

I gave up on that and started using what is working without any issues. You can simply use native HA integration in configuration.yaml, example:

emulated_hue:
  host_ip: YOUR_HA_IP
  listen_port: 80
  expose_by_default: false
  exposed_domains: 
    – light
    - switch
  entities:
    switch.socket_airconditioner:
      name: "air"
      hidden: false

After added, just restart HA, and scan devices with Alexa.

lotusgary commented 1 year ago

Is that documented somewhere?

Does each device need to be added or is that the only entry required?

AdamB2023 commented 1 year ago

@lotusgary https://www.home-assistant.io/integrations/emulated_hue/ You can either expose_by_default: true, or false, and add devices which you need to be exposed.

lotusgary commented 1 year ago

thanks for the reply - so is this a replacement for HA-Bridge?

AdamB2023 commented 1 year ago

@lotusgary For me, it is, as it's working without issues, devices doesn't disappear, and doesn't require any other software/integrations.

lotusgary commented 1 year ago

so I just create that file in the habridge data directory and list every device?

AdamB2023 commented 1 year ago

@lotusgary Im using configuration.yaml + HA restart, then re-scan in Alexa, and that's it.

lotusgary commented 1 year ago

I know I'm asking a lot of questions - do you include each device in the configuration.yaml file or just the info for the bridge?

If I enter http://locahost:80/api/v2/lights I see a full list of my devices as it stands now

AdamB2023 commented 1 year ago

@lotusgary I included few devices which I need to expos only, on my example there's one device, and it's working correctly.

lotusgary commented 1 year ago

I tried to create the file with 1 device and all my devices disappeared from ha-bridge and alexa reported the devices as not responding. Removed the file and restored the DB and now back to working again

AdamB2023 commented 1 year ago

@lotusgary Disable the HA bridge at all, it's no longer needed with this implementation.

lotusgary commented 1 year ago

So in your example switch.socket_airconditioner: name: "air" hidden: false

what is telling alexa what to do when you say "Air on"?

AdamB2023 commented 1 year ago

@lotusgary I just say: "Alexa, turn on air". You can also make custom routine. Firstly make sure device is detected.

lotusgary commented 1 year ago

sorry if I'm being stupid but I need some of my devices to run scripts and all sorts so how does that work?

AdamB2023 commented 1 year ago

@lotusgary Not sure what exactly you want to do, but Alexa will see switches as lights, so you can only on / off. The automation you can do directly in HA.

lotusgary commented 1 year ago

but when I add that file I lose all the devices from ha-bridge so I can't tell it what to do anymore for anything that would be anything other than a simple on/off.

For example I have easybulbs which need special commands to turn on and off etc

lotusgary commented 1 year ago

I think we are talking at cross purposes here. Looking at the link you posted to "Emulated Hue", that is completely different software that only support Philips Hue equipment with a hardware bridge. I don't have Philips equipment or a hardware bridge. I'm looking to emulate other devices as Philips Hue.

So I still have the original problem of the devices dis-appearing every day or so

AdamB2023 commented 1 year ago

@lotusgary I can use any device from HA, to be exposed this way to Alexa, ex. smart sockets, other companies lights. The ha-bridge is also used as emulation of Hue, that's how it "hacks" the ability.

lotusgary commented 1 year ago

This problem is still driving me crazy...everything works fine for a while then all ha-bridge devices dis-appear and I have to do a manual re-discovery. I'd say it happens at least once a week, probably every 3 days and sometimes more than once in a day

Epik77 commented 1 year ago

I too encounter the same problem. After about 24 hours the devices are removed and I'm forced to scan again to have them reviewed. Has anyone managed to fix this problem?