Volume tracking [Solved]

Posted on
Fri Feb 20, 2015 12:56 pm
colinpartridge offline
Posts: 373
Joined: Jan 13, 2014
Location: London, UK

Volume tracking [Solved]

Is there a way I can track the volume of one Sonos device with another? I have a ZP80 the volume of which I want to control relative to a Playbar, similar to what you can do with the Sonos App.

cheers

Colin
Last edited by colinpartridge on Sun Feb 22, 2015 3:45 am, edited 1 time in total.

Posted on
Fri Feb 20, 2015 12:58 pm
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Volume tracking

Could you create a trigger that adjust the volume of the ZP80 whenever a volume change occurs on the Playbar?

colinpartridge wrote:
Is there a way I can track the volume of one Sonos device with another? I have a ZP80 the volume of which I want to control relative to a Playbar, similar to what you can do with the Sonos App.

cheers

Colin

Posted on
Fri Feb 20, 2015 1:04 pm
colinpartridge offline
Posts: 373
Joined: Jan 13, 2014
Location: London, UK

Re: Volume tracking

I've created a trigger which puts the volume custom state into a variable but how do I get that variable into the Sonos:volume field for the ZP80?

Posted on
Fri Feb 20, 2015 1:08 pm
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Volume tracking

Do you want to actually set the volume of the ZP80 to that of the Playbar? This can be done via a python script in the trigger.

Posted on
Fri Feb 20, 2015 1:12 pm
colinpartridge offline
Posts: 373
Joined: Jan 13, 2014
Location: London, UK

Re: Volume tracking

nlagaros wrote:
Do you want to actually set the volume of the ZP80 to that of the Playbar? This can be done via a python script in the trigger.


That sounds exactly what I need/would like, otherwise I'm going to have to go back to using my av reciever, which defeats the object of getting the playbar in the first place.

Colin

Posted on
Fri Feb 20, 2015 1:23 pm
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Volume tracking

Try this:

Setup the trigger to file with any change of the Volume state and use this code in the action:

Code: Select all
SonosPlugin = indigo.server.getPlugin("com.ssi.indigoplugin.Sonos")
if SonosPlugin.isEnabled():
   SonosPlugin.executeAction("actionVolume", deviceId=indigo.devices['Office'].id, props={'setting':indigo.devices['Cave'].states["ZP_VOLUME"]})


In my case, 'Cave' is the Playbar ZonePlayer and' Office' is the ZP80.

Posted on
Fri Feb 20, 2015 1:47 pm
colinpartridge offline
Posts: 373
Joined: Jan 13, 2014
Location: London, UK

Re: Volume tracking

Thats great , thanks very much, does exactly what I need.
Cheers
Colin

Posted on
Sat Feb 21, 2015 10:58 am
colinpartridge offline
Posts: 373
Joined: Jan 13, 2014
Location: London, UK

Re: Volume tracking

Could I use the same approach to offset the volume? replacing the playbar ZP_volume with a variable. or would it require a separate approach?

Colin

Posted on
Sun Feb 22, 2015 3:43 am
colinpartridge offline
Posts: 373
Joined: Jan 13, 2014
Location: London, UK

Re: Volume tracking

Answering my own question, yes I just replaced
Code: Select all
props={'setting':indigo.devices['Cave'].states["ZP_VOLUME"]})


with

Code: Select all
 props={'setting':indigo.variables[OffsetVolumeVariable].value})



Cheers

Colin

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests