Logic Machine Forum
Add sonos zone into playing source - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Add sonos zone into playing source (/showthread.php?tid=2769)



Add sonos zone into playing source - victor.back - 02.08.2020

Hi. 

I want to make a button in visu that triggers a specific zone to be included in the playing source. 
The exact same function that you get if you hold down the PLAY button on a sonos speaker. 

Is this possible to make from a groupadress?


RE: Add sonos zone into playing source - Erwin van der Zwart - 02.08.2020

Hi,

Should be possible, we can add a player to a coordinator, so we could check playing state and then add it.

But i wonder what the system does when you have 2 Sonos playing from a different source, where will the 3th player be added when press and hold the play button? Last activated playing source?

BR,

Erwin


RE: Add sonos zone into playing source - victor.back - 03.08.2020

I think in the Sonos system it steps between the different sources when you keep holding the play button.

How and where do I set this up?


RE: Add sonos zone into playing source - Erwin van der Zwart - 03.08.2020

Hi,

Try this as event based script on a bit object, true will add the specified player to the playing group, false will put it back as stand alone player.

.lua   Add remove player from current playing source by bit object (event based).lua (Size: 10.86 KB / Downloads: 28)

BR,

Erwin


RE: Add sonos zone into playing source - victor.back - 04.08.2020

Nice, thank you! Works perfect Smile


RE: Add sonos zone into playing source - Erwin van der Zwart - 04.08.2020

Hi,

Right now the script discovers devices before using them.

You could make it a bit faster by doing the discovery separately and store the results in storage and use it in this script, downside is that if a IP adress changes then you need to run the discovery again. You could also do a discovery scheduled every hour and when something changes (however this might be rare) it will be discovered within 1 hour.

BR,

Erwin