anyone have control page/graphical zone groupings?

Posted on
Wed Apr 16, 2014 5:34 am
Seeker offline
Posts: 440
Joined: Aug 05, 2013

anyone have control page/graphical zone groupings?

I'm playing around with control pages for sonos. I'm trying to replicate zone grouping states similar to the sonos app.

The 'zone group name' is not specific enough. it says something like 'zp1 + 2 others'.

The 'group coordinator' is a true false of whether that zone is coordinator. And the 'zone group' seems to be a moving value that gets close to telling which zone a slave zone belongs to. however, the end part seems to increment/change depending on the groupings.

What i'd like is a graphical representation of the zone grouping states.

X-- for Z1 master, Z2, Z3 off
XY- for Z1 master, Z2 belongs to Z1, Z3 off
XYY for Z1 master, Z2 and Z3 belongs to Z1
and so on.

I played with some triggers and variables to accomplish this, but the 'moving' state of the 'zone group' makes this difficult with standard triggers.

Anyone doing anything like this?

Also, trivia that rincon was the original Sonos name!

Posted on
Thu Apr 17, 2014 5:44 pm
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: anyone have control page/graphical zone groupings?

Figured it out!

My first foray into anything python. I now have a variable that updates with an English name of the group each zone is associated with.

So fun!
Attachments
Screen Shot 2014-04-17 at 6.43.31 PM.png
Screen Shot 2014-04-17 at 6.43.31 PM.png (9.38 KiB) Viewed 2650 times

Posted on
Mon Apr 21, 2014 4:36 pm
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: anyone have control page/graphical zone groupings?

I finally got the sonos toggle buttons working almost the way I want. the leftmost button is a now playing indicator and is green if that zone is the master, red if not. the two right columns are toggle buttons that allow me to add a zone to a group or remove from a group. it works well. just needs some polish.
Attachments
Screen Shot 2014-04-21 at 5.33.46 PM.png
Screen Shot 2014-04-21 at 5.33.46 PM.png (17.86 KiB) Viewed 2607 times

Posted on
Mon Jun 01, 2015 5:43 am
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: anyone have control page/graphical zone groupings?

Hi Seeker,

This is an old post, but I'm also interested in toggling groups. Could you post your script?

Thanks

Posted on
Mon Jun 01, 2015 5:54 am
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: anyone have control page/graphical zone groupings?

I've reworked this since my original post using only built-in triggers and variables. Works the same, works great. I'll post some info later when I get back.
Attachments
Screen Shot 2015-06-01 at 6.44.47 AM.png
Screen Shot 2015-06-01 at 6.44.47 AM.png (53.63 KiB) Viewed 2292 times

Posted on
Mon Jun 01, 2015 3:08 pm
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: anyone have control page/graphical zone groupings?

Thanks - that would be great. What you've done looks really good.

Posted on
Tue Jun 02, 2015 5:27 am
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: anyone have control page/graphical zone groupings?

Here's the basic steps I used to track the 'member of' logic. I have 3 sonos zone players.

Sonos (and therefore the plugin) keeps up with:

group coordinator (true or false)
zonegroupUID — this has the unique identifier for the zone coordinator, but appends some numbers depending on the slave unit.

I used schedules to check the status of these two and set variable appropriately.

VARIABLES:

set up 7 variables for each sonos, all true/false:

var_sonos1_zonegroupid (so you can use the variable compare ‘contains’)
var_sonos1_memberof_sonos1
var_sonos1_memberof_sonos2
var_sonos1_memberof_sonos3
var_sonos_1_manual_change_1
var_sonos_1_manual_change_2
var_sonos_1_manual_change_3

create 7 more variables for each of the other 2 zone players.

SCHEDULES: (each runs every second)

1 INSERT ZONEGROUPID INTO VARIABLES:
action insert each zonegroupID into a variable var_sonos1_zonegroupid
add action for all players

2 CHECK IF PLAYER IS GROUP LEADER:
conditions (all): if device sonos1 group coordinator is true
actions: set
var_sonos1_memberof_sonos1 to true
var_sonos1_memberof_sonos2 to false
var_sonos1_memberof_sonos3 to false

3 IF NOT GROUP LEADER, SET ‘MEMBER OF 2’ VARIABLE:
conditions (all): if device sonos1 group coordinator is false
if device sonos2 group coordinator is true
if variable var_sonos2_zonegroupid contains variable var_sonos1_zonegroupid
actions: set variable var_sonos1_memberof_sonos1 to false
var_sonos1_memberof_sonos2 to true
var_sonos1_memberof_sonos3 to false

4 IF NOT GROUP LEADER, SET ‘MEMBER OF 3’ VARIABLE:
conditions (all): if device sonos1 group coordinator is false
if device sonos3 group coordinator is true
if variable var_sonos3_zonegroupid contains variable var_sonos1_zonegroupid
actions: set variable var_sonos1_memberof_sonos1 to false
var_sonos1_memberof_sonos2 to false
var_sonos1_memberof_sonos3 to true

duplicate 2-4 for each zone player.

if you have these set up properly, you should have variables that toggle with the current state (group leader, member of) for each sonos player.

My next step was to add actions for when I click the icons to manually change the ‘member of’ for each sonos. I’ll dig into this later if you need my steps. Let me know.

Posted on
Tue Jun 02, 2015 1:20 pm
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: anyone have control page/graphical zone groupings?

Many thanks - will do some thinking about how to integrate this into my setup! Will let you know if I need more, but this should give me a good start.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron