[quote=“lolodomo, post:840, topic:169644”]
Folks wanting multiple Sonos units to play in unison, for long-term play, would [effectively] do something like the following snippet.
I’ve represented it textually, but I’m intending it to mean the Advanced Scene UI.
x.AVTransport.SetAVTransportURI("x-rincon:RINCON_000E5...Y..01400")
y.Sonos1.Play("SQ:Morning playlist")
It won’t be one step, but each component will have recognizable parameters, and parameter values.
In my opinion, it is not user friendly, too much difficult,
But we could add a new action:
Sonos1.GroupZones(groupDevices)
In this case, the scene would become more clear:
x.Sonos1.GroupZones("38,45")
y.Sonos1.Play("SQ:Morning playlist")
[/quote]
I did think about that, but here’s why I’d discarded it…
When Say, or your newly added Alert, is called we need to gather all of the parameters in order to be able to autonomously save-execute-and-restore across a set of Sonos units in unison.
To do this, I added a CSV of MiOS deviceId’s to use to contact the various devices. This programming model is consistent with what’s done elsewhere in MiOS… albeit a brittle and unfriendly model. In hindsight, I regret using MiOS deviceId’s as the keys, instead of a more native key (like SonosID’s)… but that’s another story.
In this case, all the parameters must be provided “up front”, and we don’t have a choice to composite the functionality.
In regular UPnP it’s common to make a set of discrete calls to establish context and cause actions to occur. Sometimes you’re lucky, and doing something simple, so you make one call. In other cases, you need to make a set of calls to establish the correct context.
The Sonos CP does this all day long, with various “UI” actions being bound to one-or-more UPnP calls behind the scenes in order to achieve the desired effect.
Where a reasonably simple “standard” option exists for doing something, I have a preference (bias?) towards doing it with the common building block pieces.
In the case of standard grouping, there are a series of calls that can be done that achieve that effect[sup]*[/sup]. Since these calls are standard, and can be made using the built in Advanced Scene editor (no Luup required). It also means that people can sequence them in any combination.
eg. start the music, then issue all the “join” commands, for an expedited startup.
[sup]*[/sup]The missing link?
The missing information here is the string to pass in. We cannot LoV within the Advanced Scene editor, so we’d just need to put something into the UI that showed the “x-rincon:” string, and it’s lineIn counterpart, so they’d know the formal name for their device.
Anyhow, my bias towards the standard stuff is that there is Documentation/Examples (etc) out there that use it. Esp on the Sonos site, which is where I first found out about a bunch of these options. The more standard items that are exposed/usable, the more examples people can get their hands on to do far more elaborate things (some with Advanced Scenes, some with Lua)
As a side-note, I don’t believe that the internal UI needs to replicate all of the Production Sonos UI. With MiOS as the framework that would be a loosing battle. In this case, I think the primary use-case is for scene creation, and anything we can do to assist that process (doc, screenshots, sonosId printouts etc) will be the best use for our end users.