I recently added a Sonos Connect called "SC" to my Sonos system and I'd like to make it so that when I include that player in a group and use it to play music, I want my AV system to do the right thing. My AV system is connected to a Harmony hub, so I'm using Harmony plugin to control. So I want to detect when SC goes from an idle state to playing (any source, either as leader or as a member of a group) and in that case, I'll use Harmony plugin to select the "sonos" harmony activity that I've setup to select appropriate input, volume, audio settings, etc.
I observed the detailed state info for my zone players in Indigo as they changed with various actions - starting, stopping, etc. I noted that ZP_STATE seemed to change when unit was playing. As a simple experiment, the first thing I tried was having a trigger in Indigo for when state becomes "PLAYING". This did not seem to work, so I presume that either ZP_STATE visible in Indigo is not the same as the "State" that I can choose from the menu of states I see in setting up a device-state-changed trigger OR that matching it with a simple becomes-equal-to test of a simple string "PLAYING" is not the right way to detect the change I'm looking for. So my first question: what is the right kind of trigger to use for detecting when a zone player starts playing?
As an aside, I see that there is a different type of trigger available, seemingly specific to Sonos that is "Zoneplayer Available" or "Zoneplayer Unvailable" that offer no configuration and seem not to be specific to a Sonos device, so they don't look like they would be applicable. However, I'm curious - what do these trigger conditions represent and how are they used?
Finally, are there any online docs for Sonos plugin?