ebaauw / homebridge-hue

Homebridge plugin for Philips Hue
Apache License 2.0
894 stars 91 forks source link

No response from all devices #1138

Closed schweppy closed 1 year ago

schweppy commented 1 year ago

Hello all

I have been using Conbee II stick with Deconz on my RPi4 and homebridge-hue for a few years now with no issues at all.

This week I added a new zigbee device as normal (Aqara E1 roller motor) which paired fine, however all devices are now in a permanent no response loop. They will work fine for a short period of time and then no response across all devices. Then they will be online again and repeat. I’m not sure if adding the E1 has caused this or not so I removed it but the problem still exists.

During the “no response” period, all my zigbee devices respond fine from Alexa and in the Phoscon app so it seems to be linked to homebridge plugin. I have reinstalled homebridge hue, rebooted the Pi a few times and have looked in the homebridge logs but nothing seems out of the norm??

Any help would be greatly appreciated.

Cheers

ebaauw commented 1 year ago

Typically, No Response is caused by connectivity issues between HomeKit and Homebridge, nothing to do with any plugin. Some pointers:

schweppy commented 1 year ago

Thank you for the quick reply.

It’s just strange that it’s only my Deconz accessories, all other homebrudge plug-ins accessories working fine.

If it makes any difference I am running Deconz on the same Pi as homebridge…

Sadly all devices are upgraded to the new HomeKit architecture so I’ve power cycled all Apple TVs but not sure what you mean about discovery app??

ebaauw commented 1 year ago

It’s just strange that it’s only my Deconz accessories, all other homebrudge plug-ins accessories working fine. If it makes any difference I am running Deconz on the same Pi as homebridge…

Are you running Homebridge Hue in a separate Homebridge instance or as a child bridge? Or in the main Homebridge instance with other plugins?

In the latter case, please capture and attach a debug log file, indicating when the accessories are showing No Response. Please also attach the debug dump file. See the FAQ how to obtain these files.

In the first case: are you sure you're using a unique username and port for the child bridge/Homebridge instance?

not sure what you mean about discovery app??

https://apps.apple.com/us/app/discovery-dns-sd-browser/id305441017 HomeKit accessories advertise under _hap._tcp.

Sadly all devices are upgraded to the new HomeKit architecture

In that case, HomeKit on iOS, iPadOS, macOS no longer connects directly to accessories, but through the home hub. You would only see an incoming connection from the home hub to Homebridge. It also means that only the home hub must be able to see the mDNS announcements.

Since upgrade to the new architecture, all my accessories (incl. native HomeKit accessories) are Updating... for 10 to 30s, ca. 5 s after opening/starting the Home app. As far as I can tell, the delay is between the HomeKit runtime on my device and the home hub (Apple TV).

schweppy commented 1 year ago

I have been migrating all plugins to child bridges and homebridge-hue was the last one as I was going to wait until I switch to homebridge-deconz. However, when I started getting this problem I switched it to a child bridge which made no difference. All child bridges have unique ID and port as per standard settings.

I get 2-3 second delay for all homebridge and native HomeKit accessories after loading home app. It is just the homebridge-hue accessories that are no response.

schweppy commented 1 year ago

homebridge-hue.json.gz

schweppy commented 1 year ago

The only think I can see in the logs regarding Deconz is this which repeats every 5 seconds.

No response occurred at this time.

[15/01/2023, 22:19:53] [DeCONZ] Phoscon-GW: request 2099: GET /sensors [15/01/2023, 22:19:53] [DeCONZ] Phoscon-GW: request 2099: 200 OK [15/01/2023, 22:19:53] [DeCONZ] Phoscon-GW: request 2100: GET /lights [15/01/2023, 22:19:53] [DeCONZ] Phoscon-GW: request 2100: 200 OK [15/01/2023, 22:19:58] [DeCONZ] Phoscon-GW: request 2101: GET /sensors [15/01/2023, 22:19:58] [DeCONZ] Phoscon-GW: request 2101: 200 OK [15/01/2023, 22:19:58] [DeCONZ] Phoscon-GW: request 2102: GET /lights [15/01/2023, 22:19:58] [DeCONZ] Phoscon-GW: request 2102: 200 OK

ebaauw commented 1 year ago

That's Homebridge Hue polling the deCONZ gateway, and the gateway responding with HTTP status 200 OK.

I don't see anything weird in the dump file, execept that the Tuya blinds don't seem to report battery. Is that why you excluded ZHABattery from being exposed?

I really need to see the full debug log file to check whether something funny is going on with Homebridge Hue.

Given that it runs in a separate child bridge, in my experience, it's far more likely that something funny is happening in HomeKit and/or the connection from HomeKit to the child bridge. Do you see an incoming TCP connection from the home hub to the child bridge? On the Pi, run sudo netstat -p and check for the local port (should match the child bridge port) and PID/Program name.

Running Homebridge with DEBUG=* will cause HAP-NodeJS to produce a ludicrous amount of logging, but it will show the calls HomeKit makes to Homebridge. In particular, it allows you to check whether Homebridge is "hanging", failing to give a promptly response, or whether the home hub is "hanging", not sending a next request to Homebridge. Unfortunately, I don't know how to monitor the traffic between your iDevice and the home hub.

schweppy commented 1 year ago

Yes for some reason battery doesn’t work on these motors so I excluded it.

So in regards to the issues I was having, I have updated to 16.3 across all Apple devices, I also rebooted all Apple TVs and finally I switched to using Avahi on my Pi4 homebridge setup after reading some other threads. These seem to have fixed my issues!!! No non responsive devices for the past week!