homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 241 forks source link

Home devices do not respond, need to restart homebridge #492

Closed lugaetsch closed 1 year ago

lugaetsch commented 1 year ago

Current Situation

Hi folks, I am running hombridge as docker container on my Synology NAS. Container network is host, sitting behind Synology's reverse proxy. I am using Synology Firewall and opened up several ports (src ip /24 home-network) as described on the wiki-page (8581 and 5353, also port declared in the config.json-file).

Issue I am facing recurring issued with "device is not responding" on Home devices coming from my homebridge. I didn't change any configuration on my NAS, did not reset it at all or changed configuration in the container. I had this problems many times ago where it turned out, that homebridge changed a port configuration after updating the container via watchtower.

Reproducing the failure Restarting homebridge solves the problem for a dynamic time slot (2-4 hours).

What I already did

next steps

I know there were some issues with "bad coded plugins", but I didn't change any plugins and all ran fine for months!

Host Operating System

Synology DSM 7

Host Architecture

x86_64 / amd64

lugaetsch commented 1 year ago

step 1 turned synology firewall to off - problem occured after 1-2 hours.

lugaetsch commented 1 year ago

step 2 turned synology firewall to on and opened up DNSoverTLS port on external firewall since it was blocked from Home Hub to Internet - homebridge devices came up after some time (like 1hour or so?), for now feels OK.

lugaetsch commented 1 year ago

step 3 restarted synology docker package, restarted all containers - no change on issue

step 4 restarting home hubs: restarted HomePod-mini - no change restarted Apple TV - no change

step 5 deactivated homebridge-hue plugin and restarted homebridge - after a while homebridge-fritzbox appear "not responding" again

step 6 asked Apple Support for help - they wanted me to disable content block in safari and delete my vpn connections on iPhone (like WTF?) to fix problems with presence for home automations I do have - yet no fix for not responding homebridge-devices

step 7 brought HomePod-minis completely offline - waiting now ...

lugaetsch commented 1 year ago

step 7 Bringing down the HomePods didn't help!

Found out that Apple Home defined my "Private" Home location 500m away from my actual home. So I decided to completely wipe my Home configuration and start from scratch! I used Apple's "secret" wipe profile for iOS. Before that I tried to downgrade to old architecture of Home!

step 8 See if starting from scratch solve problems, good luck I do have an excel-file with all my home automations as a cheatsheet.

lugaetsch commented 1 year ago

step 8 feedback Unfortunately problem came back this morning - homebridge devices reporting "no response" for a while and came back without restarting the homebridge!

step 9 turned on debug logs on homebridge and will observe netstat when problem reoccures

lugaetsch commented 1 year ago

step 10 turned off Advanced Data Protection for iCloud-account caused 1 HPmini to appear "not responding", reset this guy and its OK for now. homebridge-devices still up and running!

lugaetsch commented 1 year ago

step 7.1 I completely wiped the HomePod minis over direct attached USB-C cable via iTunes and restore-file. After that i removed the HPm from my home and also from my iCloud. I waited over 24h without bringing the devices back online or even connect them with my iCloud. Since I had no problem with "not responding" accessories coming from homebridge by having only ATV as home hub online, I decided to bring one of the HPm back online into my home. So far no problems with setting up the HPM from scratch, configuring it and having it as active home hub in my setup. I also had issues with the new activated sensors before, but for now everything is pretty smooth! Let's wait for the second HPm to come online and check the behaviour afterwards ;)

lugaetsch commented 1 year ago

Experience Turns out there are issues with the connection between HPminis and homebridge at some time, since problems with "no response" did not happen yesterday with ATV as default home hub. Today I am working on site and experienced "no response" for like 20-30 minutes. During that time I netstat connections thru the homebridge CLI. Following entry does not appear while the connection is bricked for whatever reason:

tcp6 0 0 **homebridge-ip**:51094 **HomePod-IP**:49222 ESTABLISHED

BTW: I am running 16.3.1 on ATV and HPminis! Still same issues with "no response" from HPm itself sometimes or offline sensors of the HPm - feels we still have a Apple Home issue here.

Still strange for me, why Home stops showing homebridge devices but lights coming from huebridge still appear online???

lugaetsch commented 1 year ago

Step 8 changed to HAP Bonjour advertiser for a moment

DolmensDude commented 1 year ago

I see parallels to this running on Container Station on a QNAP. All networking on my side is Unifi switches, access points, and gateway/router.

Some of what I'm seeing does change as unifi changes their firmware, so it might not just be Homebridge, or this Homebridge plugin in a docker, but... am seeing this. I restart the container in Container Station and all is well again, similar to you.

Not sure what it is, and as I have my network "properly" segmented across VLANs, and thus dependent on mDNS implementation from unifi... am a bit out of spec (folks say flat network only), I've not chimed in about this, but wanted to second that what you're seeing might be happening here to some degree.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.