Sonos Group Speakers Confused

I have two Sonos speakers one called: kitchen and the other: dining room

I Know I know you need to configure a rule to get them to group then use that group in items and call that group.However after looking at all the form posts on here about bindings I’m still confused and can not get it to work. I have looked at all the results for this google search Here.

Can someone please explain how I group 2 Sonos Play:3’s with example Items,Rules and Sitemaps. In a simple and easier beginner friendly way

Also I would upload my items and sitemap but there is commented code all over the place as I have been testing all those results, However I can upload them if needed. Also for refrence I’m runing Openhabian 2.5.0-1 on a Raspberry Pi 3B +

Thank You,

What are you trying to do with your Sonos speakers?

So with Sonos you can link two speakers so they play the same music so instead of having 2 speakers you have one group or stereo pair.

I guess the question was what are you trying to do with the Sonos players via openHAB ( I.e. do you do intend to duplucate the complete Sonos App?).

I use the following to group two Sonos speakers.

Items:

Switch Sonos_LR_Add_ST      "Add ST to LR Group"        
String Sonos_LR_Add         "Add ZP to LR"           {channel="sonos:BEAM:lr:add"}

Rule:

rule "Add Sonos Playroom to Beam group"
when    
    Item Sonos_LR_Add_ST received update
then
    Sonos_LR_Add.sendCommand("st")
end

"st" is the name of the speaker defined in my Things file.

No not quite just be able to change the volume, skip pause/play and see the current playing song

And that doesn’t sound as if you would need the functionality to group/ungroup players!

Alright that makes sense but how do I use the now grouped speakers to control channels such as volume

Surely it would as both speakers are one so play/pause both at the same time and both will be playing the same song maybe not for volume as that can be adjusted individually and as a gorup…

For stop, pause, play etc you send the command to the zoneplayer. Volume you can still control via the individual channels.

1 Like

So is zoneplayer the name of the grouped speakers in the Sonos app.

Can you give me an example item?

Thanks

Hi Ben,
I suggest you read up a bit on the Sonos binding in the docs and experiment. Then post your configs when necessary. Also search the forum as all of your questions have been asked before in one way or another.

1 Like

Hi Maurits,
i have some problem by adding as speaker to a group. Can you post your Things-File for your example? I think “st” ist your room? This doesn’t work for me.
Here is my Things-File an my Rules-File.

Thing sonos:PLAY1:Kueche [udn=“RINCON_xxxxxxxxxxxxxxx”, refresh=60]
Thing sonos:CONNECTAMP:Bad [udn=“RINCON_xxxxxxxxxxxxxxx”, refresh=60]

if (Sonos_Kueche_State.state == “PLAYING”) {Sonos_Kueche_Add.sendCommand(“sonos:CONNECTAMP:Bad”)}

I tryed all: “RICON_ID”, “CONNECTAMP:Bad”, “Bad” and doesn’t work.

Greetings
Marko

Hi Cyrill,
First of all, welcome to the community. Enjoy openHAB!

To answer your question, this is my things file:

Thing sonos:PLAY1:st [udn="RINCON_B8x", refresh=60, notificationVolume=25]
Thing sonos:PLAY1:br [udn="RINCON_B8x", refresh=60, notificationVolume=25]
Thing sonos:Beam:lr [udn="RINCON_34x", refresh=60, notificationVolume=35]

Your rule doesn’t seem to be complete…
An example rule:

rule "Add Sonos Playroom to Beam group"
when    
    Item Sonos_LR_Add_ST received update
then
    Sonos_LR_Add.sendCommand("st")
end

Two general points:

  1. use code fences when posting code, it makes it easier for others to read your question
  2. check how in general rules are created.

Good luck!

1 Like

Hi Maurits,

thanks for your welcome greetings an your help!
Now it works fine. I’ve tryed the name “Bad”, but it was a copy-error in the Items-File :flushed: After your confirmation i found the error.
And here is a test for the fences from the events-Log.

2019-12-29 09:40:32.961 [ome.event.ItemCommandEvent] - Item 'Sonos_Kueche_Add' received command Bad
2019-12-29 09:40:32.962 [nt.ItemStatePredictedEvent] - Sonos_Kueche_Add predicted to become Bad
2 Likes