-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
Sonos integration fails upon HA restart, if any device is powered off #90226
Comments
Hey there @cgtobi, @jjlawren, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) sonos documentation |
I just fixed a different issue in this section of code. And would be glad to look at this one also. That is unless you want to fix it. Lmk. |
@PeteRager I won't have time to sit down and take a look for a couple more days. Please feel free to submit a fix. 👍 |
Sounds good, Ive looked at the code and know what to fix and will get something together next few days. |
@JCPvanHooren I'm unable to reproduce this on my Sonos system, not sure why. I've tried starting HASS with all 3 devices off, and it does log errors but not the ones you are getting and the integration does not fail to setup. Then when I turn the devices on they become available in HASS. I also tried it with one off and 2 on which resulted in a different error (and a stack dump) but the setup did succeed and when i turned the device it then became available in HASS. In general I seem to get "Host is unreachable" error while your log has a "Timeout" error. Anything else special on your network? Based on your error log, I can fix this issue. But may need you to test it, in order to verify that it recovers properly. |
Well, I use a reverse proxy server to connect with my HA instance and have AdGuard as DNS server, but then I feel like I'm reaching for things that shouldn't be related.
I'm happy to test, if you're ok to provide a little guidance. I'm OK to fiddle around with the system, but not a pro either. |
Thanks, that's very similar to my setup. One test I'd like you to run when you have time is this: a) start HASS when all the Sonos devices are turned off Do you still get the setup error? |
This is the error that I get when I restart with all Sonos' powered off / disconnected from power:
|
As well as this:
|
That latest issue has been fixed here #88554 |
That's what I thought; just wasn't sure and not sure when it'd reach me trough a release/update. |
I was able to recreate your issue in my setup. I have fixed that issue and other that I found through extensive testing of plugging and unplugging speakers in different scenarios. Unplugged at startup, unplugged latter, all unplugged, some unplugged. I also created extensive unit tests for these scenarios so we can guarantee they continue to work into the future. Next step is to get the code review completed. Need some help from @epenet, @jjlawren or @cgtobi on that step. |
Thank you Pete. Much appreciated. |
Not sure, put a bunch of effort putting together a proposed fix, not seeing much uptake on getting this change reviewed and approved so we can resolve this issue we both have. |
The change has been approved! Got some really good help getting the unit tests improved. I don't know if it will make the cutoff for 2023.6.0; or if will be in 2023.7.0 |
The problem
While I only have to restart my Home Assistant occasionally, every time I do, I need to make sure all my Sonos devices are turned on / have power, to avoid the integration from failing to setup and all Sonos devices being unavailable.
My Sonos Roam is not always on.
Both my Sonos Beam and Play5 are behind a smart plug that switches off e.g. during the night.
Environment:
What version of Home Assistant Core has the issue?
core-2023.3.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Sonos
Link to integration documentation on our website
https://www.home-assistant.io/integrations/sonos/
Diagnostics information
config_entry-sonos-2a2fb28b09fe9fbc04d5d8322c2ac283.json.txt
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: