Can you tell me how to use parameters when using a .command? For example I am trying to engage the Sonos line in command with my bedroom tv.
I have the same question. Can you publish a list of what the format for the .commands are for example to choose an album to start playing, a playlist, or a pandora station?
If you see the words “Parameter 1” or “Parameter 2” in a command, generally the value of that is whatever the native value is for the device. For some commands, most notably any Volume command, Insteon or Lutron commands, iTunes commands like AIRPLAY SET and PLAYLIST ITEM SET, and many more, they take friendly names instead. For instance you could set Airplay to an Apple TV by entering “Office Apple TV” as Parameter 1.
In most cases, we have renamed “Parameter X” to the friendly name when we translate to native formats automatically. For instance, any receiver we support will have its volume translated from Roomie’s universal volume values to whatever the native receiver format is behind the scenes.
In cases that we have not referenced or documented and where you see the words “Parameter 1” when adding a command, it means that command requires the native format as we have not translated it for you from the command editor. In many cases, it may be difficult for you to get correct values for that depending on what you want to do/what command you want to send. Basically, we don’t “publish” that information because all of the commands we support entering custom parameters are already user-friendly at the interface level per above. If you find a command that takes a native parameter, it means that command is possible for you to use, but you need to determine what the native format is for that (which we can usually help you with in support).
One of the reasons Roomie translates many commands for you as we do for instance with iTunes and Airplay is that the native format is often some kind of funky ID number or hash or UUID, something you will never be able to determine and that may change each time you use it. That is in fact exactly how Airplay works, and so we do all that translation behind the scenes for you.
To take the specific example in the OP of setting a Line In on a Sonos device, that is something we can actually determine for you in support and tell you what command to send, and it will not vary over time so it should be safe. It may however be specific to your box.
While basically everything is settable now in commands for Sonos, the formats are all native so it will vary how easy they are to extract. Clearly we will reformat the commands in the future to take simplest form like iTunes.
Can you perhaps post a sonos example of how to pick a pandora station or perhaps play a current album or artist? I think with an example or two most of us can figure the rest out, but without having any example (at least myself) doesn’t know where to start.
I just wanted to set the linein to on and change the volume? How would that be achieved?
There is a new .LINEIN SET command since 1.7 in the Sonos set. To use that properly, it must be followed by a PLAY command. So you just have the sequence:
No parameters are needed for those. Volume is just .VOLUME SET with standard Sonos volume 0-100.