-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lost connection after few hours of outage #163
Comments
Sorry, I added a comment, but probably failed to save it. #53 is a good reference, I don't think #68 is related. This has nothing to do with the duration of the outage; when the zone player reboots, it loses any subscriptions for notifications (second point in #53). Luckily the zone player reports You can probably still control the zone player after reboot from Homebridge ZP, but the current state won't be reflected in HomeKit, as the player no longer sends push notifications. Indeed, the workaround is to restart Homebridge. How are you powering down (and back up) the zone players? Manually or using some automation? In the latter case, you can restart Homebridge from the automation. In the first case: pending a structural solution, I could shutdown Homebridge when detecting that a zone player has rebooted. If you run Homebridge as a service, it should be restarted automatically. Would be a config.json option to enable this. |
Thanks for your answer. I do shut down my Sonos with an automation every evening after the last detected motion. It reboots in the morning with the first motion. So your first solution should work fine. It is running with hb-service. The dynamic accessory thing would fix this problem for good, right? And you are working on it for quite some time now? I'm Looking forward to the day on which you will get it to work. |
Afaik, a plugin cannot restart Homebridge from within Homebridge; it can only stop Homebridge and hope that something like
It should. Not so much the dynamic accessories (they already work), but the whole startup/restart logic (basically all open issues, except the sleep time logic). The challenge is that this involves a lot of asynchronous logic: subscribing to notifications for a specific endpoint on the zone player, waiting for the first notification from that endpoint, subscribing to the next endpoint, etc. Not something you fix quickly on a rainy Sunday afternoon. |
How could I execute a stop of Homebridge for my issue? Do I have to dig deep or is this fairly easy to implement? The dynamic accessory thing Sounds way to complicated for me. 🙈 I Hope you can get everything sorted out someday. |
If you run the automation from HomeKit, I would use one of those plugins that allow you to execute a command on the OS, like https://github.com/luisiam/homebridge-cmdswitch2, and make that restart Homebridge through |
I stand corrected. Looking at the code, Homebridge ZP tries to re-subscribe the current subscriptions. That will work on a quick reboot of the zone player, but not when the subscriptions have expired, and couldn't be renewed, because the zone player is powered off. |
Hm, you suggested I could control the zone players without mirroring of functionality in HomeKit. But no, it doesn't matter what I do. On the next Morning I can't control them anymore. I Can't control my Sonos players from HomeKit anymore. I have to restart Homebridge. |
I need to do some serious testing. The zone players are supposed to be powered on at all times, so I imagined this functionality would be needed only after a power outage, hence no priority. |
Ok, no worries. It's good enough to know the issue is known and you somehow working on it. We can close this issue. The problem as is, is known already and I will try it with the command line plugin. |
I am shutting down my Sonos system over night and if im not at Home. If I do so, every option to control my Sonos system (tv and speaker option) is disconnected after 6h, maybe less. The only way to get back the controls is to restart Homebridge. Is there a way to get the plug-in reconnect after a set amount of time or is this normally done automatically and I am experiencing a bug?
The log displays some text like "last seen 2000s ago, rebooting?!"
I appreciate any help.
Edit:
Is there a way to get around this behavior other than not to shut down the devices every night?
The text was updated successfully, but these errors were encountered: