Can't get Lutron Pico buttons working correctly with Sonos

I've got 2 Lutron bridges (Pro and non-Pro) with 9 pico audio remotes and a sonos system (new Gen 2). I started with the non-pro Lutron bridge by accident not knowing you needed the Pro for Hubitat integration so I'm in the process of moving pico remotes over to the Pro Lutron bridge and starting with the first one to get it dialed in.

The pico remotes work fine with sonos on the standard Lutron bridge. I just wanted the ability to program the round middle button because by default it launches a favorite using Sonos Radio and I only use Spotify. So I'm setting that button to just set the volume to 50% instead using HE.

And the 2nd thing I want to reprogram it for is the button #1. I stream music either from Spotify and the normal button works fine to mute. But I also stream video from an Xbox at other times and the mute button doesn't work when streaming from the Xbox. So I want to call an HE routine that will both do a Stop and a Mute since that will cover both Spotify and Xbox. The other buttons (volume up/down, next track) I want to work the same.

I put the first pico audio on the Pro Lutron bridge, and removed it from the standard Lutron Bridge. Then I unchecked it from the Sonos device on the Pro Lutron so the commands will only come from the HE.

Button 1: I'm working on a function to check the Play state and then stop if its playing or play if its stopped. And then looks like I can add a toggle mute command.

Button 2: When I select the Sonos device and call Volume Up. In action it always takes the volume to a single preset state and doesn't increment it. I get the same behavior clicking the Volume Up button on the HE device screen.

Button 3: I made a virtual switch to set the volume to 50% and this works fine, this is the only button I've gotten to work via HE.

Button 4: Same thing as button 2. The Volume Down sets the volume to a single setting and won't decrement. Same behavior clicking the Sonos device Volume down button.

Button 5: I want the same behavior as the default Lutron pico where it makes Spotify play the next track. This works fine on all the pico remotes that are tied to the Lutron bridges. But calling the Next Track function on the Sonos Device in HE or clicking the Next Track in the HE device screen doesn't do anything.

I also tried leaving the Pico remote tied to the device within the Lutron bridge so I could let it manage buttons 2,4,5 which worked fine and use HE for buttons 1 and 3 but the problem there is both systems activate that button. So for button 3 for example it does set my volume to 50 via the HE rule but it also switches from Spotify to Sonos Radio and I can't disable the Sonos Radio feature in the Sonos app.

How do you get these pico audio remotes working?

I could write my own volume up/down routine to get the current volume and increment/decrement by 10 easy enough. But its button #5 to play the next track that I'm stuck on.

I just tested volume up/down as well as next and previous tracks on a sonos play1, Ikea SYMFONISK, a five a one and a connect, next and previous were using a tidal play list, all worked as expected.
What sonos device is this you're using?

1 Like

Its on a new Sonos Arc soundbar that has 2 Sonos SL's and a Sonos Amp tied to it. I don't think the extras attached to it matter, its running on the Arc in the Sonos App.

I'm making some headway. I was able to resolve the button #3 launching Sonos Radio by turning the privacy feature on in the Sonos app that cleared out all the past history. And then readded the pico to the Sonos Arc in the Lutron Pro bridge.

So I can use the next track, volume up, volume down via the Lutron bridge and the HE is controlling button 1 and 3.

I've got button 3 working how I want where it sets volume to 50% and doesn't take me out of Spotify anymore.

Still working on how to mute/stop on Xbox vs Spotify though. I have an HE routine that toggles stopping/playing based on if its playing or not. And that makes it work to pause/restart Spotify streaming.

But so far not working when the streaming is coming from the Xbox. As there I have to do a mute/unmute. The Stop/Play doesn't have any effect on the xbox audio. But if I manually click mute/unmute buttons in the HE's sonos device screen it does mute/unmute. I just haven't figured out how to get it to toggle yet.

Is there a way to check the mute/unmute state so I can write a conditional? Or put that state into a variable I can check?

I did try calling the HE toggle mute operation but that didn't do anything.

well yeah, its all in the current states section of the device details.
obviously the volume level commands are a no op on a player where the output levels have been set to fixed....
If the mute attribute is blank or doesn't contain muted or unmuted then the toggle mute command isn't going to work since we have no idea of the current mute state...

I'm not seeing where there is a muted state. I see level and volume is all.
If I click the mute and unmute buttons it does mute and unmute the Sonos Arc. I just can't figure out how to toggle it because I don't know what the current state is when I want to call it in a rule.

Not sure what you mean by fixed volume levels either. There are no fixed volume settings that I can find anywhere in the Sonos App. All I have is the max volume limited to 30% but the apps and remotes control the volumes.

There's a bunch of attribute data missing, it should look similar to this:

If you click refresh and these don't populate then the speaker object you have selected in the sonos integration isn't compatable with our integration...

Did you select the group object representing the ARC along with it's children?
Our integration currently doesn't support sonos grouped devices.

Good question. I think the Sonos integration was a bit confusing. The TV Room sonos device is the name of the main Arc. But when it did the discovery it listed "TV Room" 3 times and I just picked the first one. Maybe it setup one of the surround sound speakers? There is no way to determine which one is the main one from the discovery list of sonos devices found.

I kind of worked around it for now. To redo the sonos discovery and work through the 3 possible choices and having to switch the Sonos device in all my rules would take a lot more work since I'm using that sonos device in a lot of rules.

I was able to add a virtual button and added that to my routine for the pico button #1 that triggers a node red flow that toggles the mute button on the tv via the harmony hub and that gets my mute working when the xbox is streaming to the sonos.

I found the issue. In the Sonos integration it shows the surround sound speakers and the Arc all with the same name so instead of adding them all as devices I just picked the first one on the list that matched the name of the Sonos Arc in my Sonos app. But turned out it was one of the surround speakers. I went back into the sonos integration and added the others and found the one that is the main Arc and it has all the attributes. It has been working though up till now when I happened to need one of those mute states. All my HE rules have just been setting the mute/unmute/volume/stop/play on the surround sound speaker and that's been working.