Re: Masquerade Plugin
Posted: Wed Dec 14, 2016 1:50 pm
Well, here's the problem:
The "setting" field isn't a simple text field. It's a popup menu. Which is populated by:
So the actual value that needs to be sent to the Russound is a hex value, not a decimal value. Like:
It looks like the popup for the set volume action will have values 0 to 100 by 2s, is that right? I'm looking at the code, but I have not installed the plugin to create any devices.
- Code: Select all
<Action id="actionSetZoneVolume" deviceFilter="self.russoundZone">
<Name>Set Zone Volume Level</Name>
<CallbackMethod>actionSetZoneVolume</CallbackMethod>
<ConfigUI>
<Field id="setting" type="menu">
<Label>Volume Level:</Label>
<List class="self" method="getVolumeList"/>
</Field>
</ConfigUI>
</Action>
The "setting" field isn't a simple text field. It's a popup menu. Which is populated by:
- Code: Select all
def getVolumeList(self):
array = []
for i in range(0, 51):
array.append((self.dec2hex(i), i * 2))
i =+ 1
return array
So the actual value that needs to be sent to the Russound is a hex value, not a decimal value. Like:
- Code: Select all
0 -> 00
1 -> 01
10 -> 0A
11 -> 0B
20 -> 14
32 -> 20
and so on
It looks like the popup for the set volume action will have values 0 to 100 by 2s, is that right? I'm looking at the code, but I have not installed the plugin to create any devices.