Sonos speakers are not detected (Could not create Resource from Element: protocolInfo not found)

Hi, I just did a fresh install of Hass.io (0.69.1) on RPI2 and most seems to work well except Sonos. No auto detect and also not after specifying in configuration.yaml like below. Help and suggestions appreciated!

media_player:
 - platform: sonos
 hosts:
 #playbar
  - 192.168.1.10
  #play5's
  - 192.168.1.13
  - 192.168.1.15

Error while setting up platform sonos
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 129, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/media_player/sonos.py”, line 176, in setup_platform
add_devices(SonosDevice§ for p in players)
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 175, in _schedule_add_entities
self._async_schedule_add_entities, list(new_entities),
File “/usr/lib/python3.6/site-packages/homeassistant/components/media_player/sonos.py”, line 176, in
add_devices(SonosDevice§ for p in players)
File “/usr/lib/python3.6/site-packages/homeassistant/components/media_player/sonos.py”, line 360, in init
self._set_basic_information()
File “/usr/lib/python3.6/site-packages/homeassistant/components/media_player/sonos.py”, line 430, in _set_basic_information
for fav in self.soco.music_library.get_sonos_favorites():
File “/usr/lib/python3.6/site-packages/soco/music_library.py”, line 152, in get_sonos_favorites
return self.get_music_library_information(*args, **kwargs)
File “/usr/lib/python3.6/site-packages/soco/music_library.py”, line 303, in get_music_library_information
items = from_didl_string(response[‘Result’])
File “/usr/lib/python3.6/site-packages/soco/data_structures_entry.py”, line 52, in from_didl_string
item = cls.from_element(elt)
File “/usr/lib/python3.6/site-packages/soco/data_structures.py”, line 492, in from_element
DidlResource.from_element(res_elt))
File “/usr/lib/python3.6/site-packages/soco/data_structures.py”, line 172, in from_element
raise Exception('Could not create Resource from Element: ’
Exception: Could not create Resource from Element: protocolInfo not found (required).

have the same issue since couple of versions. Only helps is a reboot of the Sonos and suddenly the HA can find them again. After couple of days connection is lost again and only that works is reboot of Sonos.

Sonos is working fine from Browser, App and Controller software, so seems a HA issue!

By reboot you mean power on/off? Tried that but no difference.

Anyone else with the same issue or suggestions?

This is a bug. It fails because you have a stored favorite that is unsupported by HA. I think the only short-term solution is to delete that favorite (but I don’t know how to identify it).

Thanks! That gives me something to work with. I’m going to give it a try!

Well, I had my NAS added to my Sonos favorites and thought that would be an obvious one to try first. And I was right! After I removed it the speakers came back up in HA

Can you tell me how to do that so I can properly fix the problem?

You can add different music sources like Spotify and Deezer, but also locally stored folders, like on a NAS. I cannot access the Sonos app right now, but can give some more details if you need them later on.

Home Assistant 0.70.1 has a fix that should make it ignore the unsupported favorites rather than crashing.

However, I am unable to find the option that you mention so the fix is not verified.