We have moved at community.getvera.com

Author Topic: Sonos leaving group as trigger for Scene  (Read 740 times)

Offline clovenguth

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Sonos leaving group as trigger for Scene
« on: August 25, 2016, 01:26:51 pm »
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.

Offline Cd12172

  • Sr. Newbie
  • *
  • Posts: 25
  • Karma: +0/-0
Re: Sonos leaving group as trigger for Scene
« Reply #1 on: August 31, 2016, 09:45:58 am »
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 :)