Sonos issues with .64

Hi all,
Opening port 1400 for incoming connections everything is back to work for me.

That incoming port you mentioned; is it for HA or sonos?

The Sonos speaker must be able to connect to Home Assistant on TCP port 1400.

This is because information is now pushed from speakers so HA updates immediately.

Hi
I opened port 1400 on machine where is installed Home Assistant.

Thank you for the tip; but that does not do the trick for me.

Can you try the most recent dev version? Copy this file to config/custom_components/media_player/sonos.py and restart HA. Thanks!

That still did not work for me

Okay, in that case it is time that you describe in more than a single sentence the problem that you experience.

According to your previous post; I had placed the sonos.py in /home/homeassistant/.homeassistant/custom_components/media_player/sonos.py, then i configured my configurantion.yaml based on the config example above. the only thing i had chanf=ged is the player name.
After rebooting HA, i’ve got this error
“File “/home/homeassistant/.homeassistant/custom_components/media_player/sonos.py”, line 182, in setup_platform
hass.data[DATA_SONOS].devices = [SonosDevice§ for p in players]
File “/home/homeassistant/.homeassistant/custom_components/media_player/sonos.py”, line 182, in
hass.data[DATA_SONOS].devices = [SonosDevice§ for p in players]
File “/home/homeassistant/.homeassistant/custom_components/media_player/sonos.py”, line 361, in init
self._set_basic_information()
File “/home/homeassistant/.homeassistant/custom_components/media_player/sonos.py”, line 430, in _set_basic_information
self._favorites = self.soco.music_library.get_sonos_favorites()
AttributeError: ‘MusicLibrary’ object has no attribute ‘get_sonos_favorites’”

This seems like your soco library is not version 0.14.

I’m seeing similar behaviour in my setup: the speakers are available within the UI, but don’t receive any updates from the speakers.

After doing some digging I think it is because I’m running Hass within a Docker container. This means the soco library will run the event_listener on a subnet that cannot be reached by the Sonos speakers (in my case a 10.42.x.x subnet, whereas the Sonos speakers are on a 192.168.x.x subnet).

I’ve also tried setting the value for config.EVENT_LISTENER_IP, but as this IP address is normally not available from within the docker container it cannot bind to that address.

For now I’ve worked around it by running the Docker container in --net=host mode, but I’m hoping this can be fixed somehow.

Your diagnosis seems correct but I don’t know of any cure.

I think it can only be fixed when the soco library will be changed to allow overruling the advertising IP address again. I saw in their git repo that it was possible in the past, but they removed that functionality :frowning: