[Nearing Release] Sonos Advanced Controller

It should work without needing to delete things. I changed how favorites worked a lot since I found a way to access them and get notified of any changes made too. So now it works with a child device on on of the speakers. You only need to enable it on a single device. I put it on my Arc, since it's hard-wired and has a stronger CPU than some of my other speakers, but the extra load is really minimal so it doesn't particularly matter. So just pick a speaker and enable the favorites child device on it.

That child device is where it lists the favorites so you know which number to use, and it stores them as permanent states, so you won't need to click on "get favorites" each time you want to see them. And if you add/delete a favorite, it updates automatically now.

1 Like

Pandora favorite stations will play when using Load Favorite Full but none of my Amazon Music favorite stations will play. They will load and you can see album art and other track info. They just will not automatically play. You can select play and they will play. Not sure what is going on.

Question about this In concept. It’s always seemed to me when people talk about this, the use-case is that there is music or some long-running audio playing and then a TTS announcement collides with it. Which makes sense.

I have a similar but different use-case. What happens if TTS1 is still uttering when TTS2 is invoked. Does TTS2 get put in queue? Does TTS2 interrupt TTS1? What happens if TTS1 is a lot longer than TTS2? You get the idea.

I’ve never found a good way to resolve this. Thankfully it’s an edge case — doesn’t happen that often so I’ve mostly. Ignored it. Curious if others have a solution?

Sonos Advanced actually already handles this. It will queue up the second TTS until the first finishes.

1 Like

From a standpoint of the code in Sonos Advanced, those are all just "Sonos Favorites". My code doesn't really have any idea what service they're coming from. There's some options for "Load Favorite" regarding whether it clears/replaces the queue or appends, whether it auto-plays or not, and if you're telling it "replace queue, auto-play" and it's not... then that's either an issue on Amazon's side or Sonos'.

First time SAC user here. My use-case for now is limited to issuing and queuing TTS. I created the device and have tried a few different speak commands (playText, playHighPriorityTTS, etc.) from the device details screen and keep getting the same basic error in the logs, per below (and no TTS coming out of the speakers). Any idea what this could mean or how I can troubleshoot?

2024-04-07 12:37:26.962 PMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.String.call() is applicable for argument types: (com.hubitat.app.DeviceWrapper, java.math.BigDecimal) values: [Sonos Advanced - Christina Whole House, 40] Possible solutions: wait(), chars(), any(), trim(), size(), split() on line 3129 (method playHighPriorityTTS)

For context, I only have one Sonos device which is connected to a whole house audio matrix device (Monoprice 6) which distributes to speakers around the house. I therefore have not created a group device, which I'm assuming is optional.

@daniel.winks, pinging you again on the above message. Any ideas on how I can troubleshoot?

@daniel.winks I removed this app a few weeks ago since it wasn't playing well with my setup, Unifi & S1's. Made the Network changes to Unifi and installed it a couple of day ago and it seems to working, not getting the album covers from local music or Pandora but that not a huge deal. Thanks for putting this together. Much appreciated!

1 Like

I tried searching this thread, but I might have missed something.

How do you get rule 5.1 to group and ungroup my Sonos speakers?

I can’t seem yo find it anywhere within the rule 5.1 app???

There are a few ways to do it, none super pre-packaged or elegant (that I'm aware of).

I just use RM5. I create a virtual speaker device as the group device. And then I wrote rules that uses a change in that device as the trigger. The actions apply the event (e.g., increase in volume, change in input source, mute/unmute, etc.) to each of the individual devices. Below is one such rule -- this one manages volume for the group.

Also - if memory serves, @Cobra has written a device driver that did some of this. But he'd have to comment as I'm not sure I've got that right.

So if you created the sonos grouping with this integration, you can do something like this and pick the command you want:

e.g. I pick the joinPlayersToCoordinator for my scenario since it's usually me adding my outdoos speaker.

Here's what my full rule would look like with this integration. Very easy and straightforward;

Just added my sonos roam and unfortunately it does seem to work with this integration. I tried tts and play, neither of which work. Sonos roam is connected to same wifi are my other working sonos device and is mains powered and always on