[RELEASE] Sonos Favorites Support

This is an integration for Hubitat hubs to enable playing of Sonos favorites via a Switch for automation purposes. This app only lets you play from favorites, but allows you to play radio stations, playlists from Apple Music or Spotify etc.

The built-in integration only works if you have the URI of the song you want to play, but does not work with URIs of playlists for example. Hence the need for this add-in - just add a song to your Sonos favorites in the Sonos app, and you can play that song/station/playlist anytime via a switch.

A side benefit is that this add in will also effectively made a Sonos a switch that can be turned on or off (to start or stop music) if a switch is more convenient in automations.

8 Likes

Nice! Without fully getting into it, does it allow you to pre-select speaker groups? I'm constantly changing groups based on whatever we might be doing at the time... Sometimes speakers inside the house, sometimes outside and various combinations of such... It would be cool to hit a button in HE that has all that pre-selected and starts the music right away....

Thanks so much!

Now I just need to figure out favorites from my Qnap. :roll_eyes:

So not hard at all. :upside_down_face:

On Android, hit the star thing to get to the App main page, then pick the folder (e.g. //QNAP/music/christmas), hit the 3dots top left, Add to My Sonos (even though it's already there? :man_shrugging:)

Then voila, have a device in HE ready to assign to a room and re-label as Christmas Music. :clap:

Configure/Edit Presets

2 Likes

This is fantastic, thank you for this.
Today I'm using RMs with URIs I've pulled from HE, but that makes it really hard to manage.

Really appreciate you building this app. Thank you!

That could be possible but would be a lot more work to enable - I am afraid I may not be able to dedicate the time to it.. Creating groups of speakers on the fly is a lot more complicated.

1 Like

Understood... Thanks for the reply and thanks for making this! :slight_smile:

Wow, this is a fantastic leap forward in enhancing Sonos integration on Hubitat! Thank you so much for your hard work and dedication. I have a quick question: Am I possibly overlooking something here? It seems like I can only select one speaker, and when I switch it on, the music plays only from that particular speaker, rather than the entire group it's in. Is there a workaround for this? Your assistance would be greatly appreciated!

Interesting.. I did not notice that on my own speakers, I need to look into this.. As for fixing it, that could be more complicated, as I did not write the original Hubitat Sonos driver, I have limitations on what I can do. Usually, Sonos plays the song on all group speakers if you play something on one, so I am surprised that this is happening. Either way, I will look into this, but it may take a while as this is a little messy to fix.

2 Likes

I took the Hubitat Package Manager option in installing the app. Though it is a "step above" the "Sonos Presets" (referred to as Presets going forward) via "Stephan Hackett", it has the same interface through mildly different. I mean, they almost look identical. What I like this one is that it can list contents from your Sonos to choose from which makes it easier than Presets. However, it does not give you a test feature like Presets. Definitely needed since the execution does not work at all.
I selected two speakers and 3 presets. One speaker was linked with two preset with them being SONOS Playlists. The third preset was another different playlist. When saved, it did not create anything. I went back and made no change and clicked done again to get the generated virtual switches. During execution, the first speaker with the two presets did not work at all. The other speaker with a different playlist as preset 3 played the first preset of the other speaker.
This would have been prefect for completing a few automations if they worked as expected. Any suggestions?

Hi @user6099

A few days I updated this app and it started to fail, not working as expected.

I have a C-5, and now with the update the button created by the app plays at minimum volume, not with the configured volume. Almost inaudible. Every time this is selected.

Is there a way to go back to previous version? or maybe see if there is a bug that doesn´t consider the volume configured on the app.

And now yesterday, when I select the Presets option, I get an error message:

Any clues on what is going on?

Thanks for you help.

Volume is a scale of 100 - not 10

I have tried both ways, and now I have configured it with 2 digits (40), but still wouldn´t work.

Now I´m stuck with the error message.

I´m getting a different one:

Edit: I just discovered one of my Sonos speakers was disconnected, and I think that was causing the error message. Unselected it from Section 1, Speakers, and the error is gone, but I just retried with values like 40, 60 or 70, and still play starts at a very low volume.

Edit 2: This failure started a couple of weeks ago when I updated the App code to a newer version.

Any updates on this issue?

I’ve erased the child lists and recreated them, but still no luck.

I have solved the problem with a rule, where when a list is turned on, volume adjustments are done.

I hope this fix is temporary.

Is there anything I can do to help fixing this?