This is the code behind the volume up icon:
- Code: Select all
zone = indigo.variables['iPad_AudioZone'].value
dev = indigo.devices[zone]
russoundId = "com.jottoawa.indigoplugin.russound"
russoundPlugin = indigo.server.getPlugin(russoundId)
if russoundPlugin.isEnabled():
russoundPlugin.executeAction("actionKeypad", deviceId=dev.id, props={'setting':'7F'})
The way I have the page set up, I populate a variable when a Zone Name or power button for a zone is pressed. Then I call a plugin action directly. For volume, the setting is the numeric id of the keypress on a Russound keypad.
The setting codes are in the plugin source, but here is a quick start for you:
'67' = track back
'68' = track forward
'69' = +
'6A' = -
'6D' = stop
'6E' = pause
'73' = play
'7F' = volume up
'80' = volume down
This should keep you busy for a while. I'm glad you are enjoying the plugins and great to find another Russound/Sonos/Indigo user. When you are done with your control page, I will give you Indigo triggers to update your in-wall keypads with Sonos track/artist information. This assumes you have in-wall keypads with a display.
lraesly wrote:An example of source would be great. That would give me an idea of where to get started.
Thanks.