Hi,
After searching for a while I couldn’t figure out an easier way of setting “repeat all” after starting a playlists in the Sonos queue. So I decided to make a custom component that exposes a service sonos_player_modes.set_mode to set any of the mode supported by the underlying SoCo library that’s already used by the main sonos integration.
It’s my first custom component (and maybe there was an easier way to do this), so please, any help/suggestions would be appreciated.
Source and instuctions are on GitHub
It can be installed with HACS, if you use that.
Hey, is this still working? Im having trouble getting it to work. Also dont see it in HACS.
Installed it manually. The service shows up but it wont work.
Either nothing happens on the front end, and I see no response in sonos, or Ill get the following error on the front end:
Failed to call service sonos_player_modes/set_mode. UPnP Error 712 received: Play mode not supported from xxx.xxx.x.xx
So I swithced it over from a custom component to a HACS install (not sure if this is the cause…or perhaps due to an update) but now I cant get it to work anymore
And it’s working correctly. I have the component installed via HACS. I’m on the latest Home Assistant (via Hass.io) and Sonos is updated to the latest software.
If you are having trouble maybe try removing the component and re-installing it?
I don’t know if that would make any difference.
Havent looked at this in a while due to lots of issues with my setup. Finally redid it and got it working fine via custom component.
Just fyi, the download on your zipfile has an issue I noticed. The directory is duplicated so its: custom_components/sonos_player_modes/sonos_player_modes/
Took me a minute to figure out why hass wouldnt recognize the component.
What is the zip file that is giving you this issue? The .zip files in the “releases” section are generated automatically by GitHub. I have tried downloading the latest one and inside I see only one folder custom_components that contains only one sonos_players_modes folder.
I haven’t had it listed yet in HACS, but you can add it to HACS as a custom repository (from the top right menu in HACS select “custom repository” and paste in the input field
https://github.com/giu1io/sonos-player-modes-HASS
Then select Integration and click Add. This way it should show up for you.