I created a device type LinkPlay and the devices.xml starts as follows:
It displays fine and I am able to input both an 'address' and a 'concertozone'. But I cannot figure out how to reference the concertozone in my plugin.py code.
- Code: Select all
<Devices>
<Device type="custom" id="LinkPlay">
<Name> LinkPlay Player </Name>
<ConfigUI>
<Field id="address" type="textfield">
<Label>IP Address:</Label>
</Field>
<Field id="concertozone" type="menu" defaultValue="1">
<Label>Concerto Input</Label>
<List>
<Option value="1">Input:1</Option>
<Option value="2">Input:2</Option>
<Option value="3">Input:3</Option>
<Option value="4">Input:4</Option>
<Option value="5">Input:5</Option>
<Option value="6">Input:6</Option>
</List>
</Field>
<Field type="separator" id="sepL" />
<Field type="textfield" id="Button1" defaultValue="">
<Label>Preset #1:</Label>
</Field>
</ConfigUI>
<States>
<State id="playerid">
<ValueType>String</ValueType>
<TriggerLabel>Player Id</TriggerLabel>
<ControlPageLabel> Player Id </ControlPageLabel>
</State>
</States>
</Device>
</Devices>
My code is (in the startup):
- Code: Select all
for musicProperties in indigo.devices.iter("com.perrygershon.indigoplugin.LinkPlay"):
lpPlayers.append(musicProperties.address)
b=musicProperties.pluginProps["concertozone"]
deviceList[b-1]=musicProperties.id
a=a
Any ideas?
It feels like I should be doing something else to define concertozone but I am stumped