SONOS Integration Attempting to Connect to Samsung TV Integration?

Hi everyone,

I’ve been trying to troubleshoot some of the quirks in my setup before I finalize my transition from SmartThings. Ever since I installed the SONOS integration, I’ve noticed it only intermittently performs a proper install on startup. Every once in a while the integration will not load every speaker, or sometimes none at all. I am running a Unifi network setup. My Home Assistant instance is located on a Synology Docker Container on the primary network. All SONOS speakers are located on a different vlan. My first thought was it must be a firewall issue. But I’m very satisfied at this point that is unlikely the problem. For instance, if my firewall rules were setup incorrectly, I would expect the result to be much more predictable. In my case, the SONOS integration does load correctly most of the time in Home Assistant. All of my SONOS speakers have a static IP address, as do all of my devices. The speakers are using the SONOS (S1) software and the SONOS integration is hard-coded into my configuration.yaml with each speaker’s IP Address. I have triple checked, and those hard-coded IP Address are correct and consistent with what is shown on my unifi network.

I’ve been reviewing my error logs in the docker container, and I believe these errors may reveal the culprit to this problem:

2022-01-18 08:37:21 WARNING (SyncWorker_16) [homeassistant.components.sonos] Failed to connect to configured player '192.168.30.83': HTTPConnectionPool(host='192.168.30.83', port=1400): Max retries exceeded with url: /xml/ZoneGroupTopology1.xml (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb4b47db760>: Failed to establish a new connection: [Errno 111] Connection refused'))

2022-01-18 05:59:29 WARNING (SyncWorker_3) [homeassistant.components.sonos] Failed to connect to configured player '192.168.30.24': HTTPConnectionPool(host='192.168.30.24', port=1400): Max retries exceeded with url: /xml/ZoneGroupTopology1.xml (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8e8d053580>: Failed to establish a new connection: [Errno 113] Host is unreachable'))

It turns out that the two IP address that routinely show up in these sonos integration error logs, 192.168.30.24 & 192.168.30.83, are assigned to two different Samsung TVs. So I check to see if these TV’s are connected to the network and how that relates to the integration. After doing several tests, it seems that the the SONOS integration only loads properly when those tv’s are connected to the network. Bizarre !

So, every time I restart home assistant, I am currently checking to make sure those tv’s are turned on, and connected to the network. Those tv’s are located on the same vlan as the sonos speakers.

The only reference to those IP Addresses in my home assistant configuration relates to the Samsung Smart TV integration. So I disable those two entities from that integration.

VOILA ! Everything works fine?

All of the sonos speakers work perfectly fine, but now I’m curious how I should go about getting my tv’s to work? Does anyone have any suggestions as to what might be going on here? Or should I treat it like a doctors recommendation when I say it hurts when I do this, and he says, then don’t do that anymore? But doctor, I still want to do this, otherwise, it just isn’t right. lol