How do I find the id for a favorite radio station?

Posted on
Sat Nov 03, 2018 6:02 pm
dssinger offline
Posts: 8
Joined: Aug 22, 2018

How do I find the id for a favorite radio station?

I'm trying to write a Python script as part of a trigger - I want it to play a particular radio station (one of my favorites).

It appears that I need code like this:

Code: Select all
d = indigo.devices['Sonos']
sp = indigo.server.getPlugin("com.ssi.indigoplugin.Sonos")
props = { 'mode':'Play Now',
            'setting':'FV:2/9',            # id of the favorite to play
}
sp.executeAction('actionZP_SonosFavorites', d.id, props)


When the plugin starts up, it calls its internal GetSonosFavorites routine and builds the Sonos_Favorites global list (containing, among other things, the name of the favorite and the id), but there doesn't seem to be a way for my trigger to convert from the favorite name to the id - I haven't found a way to get the ids from the plugin.

What am I missing?

Thanks.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests