Sonos Devices are Unavailable

Hello,

I use HA to group/ungroup and play music with my Sonos devices and recently HA shows them as unavailable at random times so my scripts don’t execute properly. If I go into the Sonos app on my phone and “wake up” a device by selecting it then everything seems to work again.

Has Sonos made a change recently that puts the speakers to sleep? Is anyone else experiencing this issue?

All my Sonos devices are configured manually via IP and I can confirm that they aren’t falling off the network and that this isn’t a network issue. These problems started a few weeks ago and I am running the latest version of HA.

How are your Sonos connected? I had some issue with WiFi. As soon I changed all of them to LAN everything works fine

A few of the speakers are hard wired to the switch and the other devices connect through SonosNet - everything shows up on the network with a local IP that is in the same subnet (255.255.255.0) as HA.

I just tried removing the manual Sonos config in HA and using the discovery but I now get the message “no Sonos devices are found” with the HA integration. So something is up, just not sure what.

I’ve been working on debugging this issue, such as running SoCo directly (the project that powers the HA Sonos component) and I can’t find anything wrong with my setup. I can reproduce the problem in SoCo which leads me to think this isn’t a bug with HA.

My current hunch is that ungrouping of all my speakers via HA causes them to become unavailable to SoCo/HA. A few months ago, I changed the default master to be my ethernet connected Sonos Playbar (which we use for the family room TV) - that meant every time we turned on the TV we ungrouped all the speakers in the house.

I went back to having the office Play:1 being the default master and everything seems to be working for the last few hours.

I’ll give it a few days to see if this is the fix.

Here is some more information on my troubleshooting and my solution: