Custom device image stuck in Indigo touch

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo
Forum rules
This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo
scotsman
Posts: 66
Joined: Sat Aug 14, 2010 7:24 am
Location: Austin, Texas

Custom device image stuck in Indigo touch

Post by scotsman »

I am trying to use a graphic to represent zone status using JC's Elk M1 plug-in. Each zone is a custom device.

- The states show up correctly in Indigo 6 (Normal, Trouble, Violated etc.)
- The 'Remote Display' checkbox is grayed out.
- The devices do not show in the devices tab in Indigo touch

The only success I have is in the browser control page:
"Zone is violated (true or false)" switching to" true" causes device.png to be replaced with device+on.png in the devices folder. device+true.png or device+Normal.png do not work.

In Indigo touch the image doesn't change. When represented as text, the device state updates correctly.

I presume the problem lies in the device definition in devices.xml file inside the plug in, but not sure where. The definition is below. Any suggestions?

Thanks!

Code: Select all

<Device type="custom" id="alarmZone">
		<Name>Alarm Zone</Name>
		<ConfigUI>
			<Field id="zonelabel" type="label">
				<Label>This device type is auto created by the plugin. One device per zone configured on the alarm panel will be created. You should not create devices of this type manually.</Label>
			</Field>
			<Field id="zonelabel1" type="label">
				<Label>If you've added new zones to your alarm system use the menu item "Rescan alarm zones" to create devices for the new zones.</Label>
			</Field>
			<Field id="address" type="textfield" hidden="true">
				<Label/>
			</Field>
			<Field id="type" type="textfield" hidden="true">
				<Label/>
			</Field>
		</ConfigUI>
		<States>
			<State id="status" readOnly="YES">
				<ValueType>
					<List>
						<Option value="Normal">Normal</Option>
						<Option value="Trouble">Trouble</Option>
						<Option value="Violated">Violated</Option>
						<Option value="Unknown">Unknown</Option>
					</List>
				</ValueType>
				<TriggerLabel>Zone status changed</TriggerLabel>
				<TriggerLabelPrefix>Zone became</TriggerLabelPrefix>
				<ControlPageLabel>Zone status</ControlPageLabel>
				<ControlPageLabelPrefix>Zone is</ControlPageLabelPrefix>
			</State>
		</States>
		<UiDisplayStateId>status</UiDisplayStateId>
	</Device>
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Custom device image stuck in Indigo touch

Post by matt (support) »

For Indigo to use the custom image lookup heuristics the base image name needs to have a + character. That tells the Indigo clients to use the more complex lookup technique. So try images named like:

Code: Select all

alarmstate+.png    (you probably just want a duplicate of the +Unknown file for this one)
alarmstate+Normal.png
alarmstate+Trouble.png
alarmstate+Violated.png
alarmstate+Unknown.png
Image
scotsman
Posts: 66
Joined: Sat Aug 14, 2010 7:24 am
Location: Austin, Texas

Re: Custom device image stuck in Indigo touch

Post by scotsman »

Ahhhh I see. I didn't get that you had to have a base image with the + character. I did read the documentation but didn't catch that. Works a treat - thanks for the quick response as always.
Locked

Return to “Extending Indigo with Plugins and Python”