Sonos leaving group as trigger for Scene

Hello,

I was wondering if there is a way to program into the Sonos device triggers the ability to use leaving a group as a trigger for a scene? Currently there are only play states available. I have a pretty complicated setup I’m trying to accomplish and it would help having the ability to set a virtual switch based on if a Sonos device leaves a group. Unfortunately I’m pretty new to Luup to figure this out on my own (if it’s even possible).

Thanks.

I do something similar - I use a wall scene controller to group zones - and have vera watch for changes.

PLEG is what makes this possible for me. The basics are:

Topography -

pick one of your songs devices and consider it the main player. Do all grouping to it. Even if it is in a zone you do not want to hear - you can mute it. You will lose the ability to play a different stream in that zone while grouping is being used, but this is a small compromise.

Pleg -

create a device property for the designated main controller.
use this property:
pControllerGroup - ZonePlayerUUIDsInGroup[urn:upnp-org:serviceId:ZoneGroupTopology]

In my case - this is the device property
RINCON_000E58FFE20401400,RINCON_000E5859BF7A01400,RINCON_B8E93739636201400,RINCON_000E58210B9A01400

It is a list of my grouped devices separated by a comma.

In pleg - I create a set of conditions (upstairs, downstairs,outside…) Each looks for the substring of the players that make the condition true.

example (lower level grouped):
Pleg Condition [cLL_Grouped] = pControllerGroup =~ “RINCON_000E58210B9A01400” AND pControllerGroup =~ “RINCON_000E5859BF7A01400” AND pControllerGroup =~ “RINCON_000E58FFE20401400”

Next you make an action against that condition that performs what you want to happen.

Fo my setup - I use a schedule to set the main controller stream at various times of the day. I use a 5 button zwave wall controller to launch scenes that group players, and initialize the volume levels. I almost never open the songs app. I now have siri performing the commands by voice control - it is almost they way you would want it to run :slight_smile: