Sonos stream and playlist playback

I'm working on an App for Sonos speakers that supports playing "Sonos Favorites", and it's mostly "using the UI". You'll need to set up a (free) Sonos developer account to get a client secret and client key for it to work, since it uses the Sonos Cloud API for some things.

As for playing Favorites, there's a button "getFavorites() which displays all your current Sonos Favorites in the Current States area of the device. It has the name of the song/album/playlist and the album art. To play a Favorite, you just get the number of the favorite (listed right next to the name/album art) and put it in the "loadFavorite()" button field and click the button. In an automation, you'd select "custom action" and "loadFavorite()" and provide the number.

I've played around with the "Sonos Favorites" app before and found it excessively annoying to use due to the need to figure out which dang "x-ricon..." thing it needs, as the Sonos devices in Hubitat list like 5 different ones and only one of them is the one that works.

My app also has 100% non-interrupting TTS ability, by utilizing the (cloud-only) "loadAudioClip" API. See more here: [RELEASE] Sonos Cloud Controller

I'm still working on development on it, and eventually will have fully replace the built-in Sonos app, but for now, you'll want to run both side-by-side as mine doesn't provide "current state" for most things, such as volume level, play/paused/stopped status, etc.

2 Likes