Min & Max Icons

Having read the page on icon use ([url=http://wiki.mios.com/index.php/Luup_plugin_icons]http://wiki.mios.com/index.php/Luup_plugin_icons[/url]) and looked at some plugin json I thought that the Vera would allow a string to control UI icons but can’t make it work for the life of me.

Can anyone spot what I’m doing wrong or has the functionality changed?

[b]MinValue[/b] The value that this variable has when it is considered "off" or at "0%". This can even be a string, if the variable is a string that takes two values. [b]MaxValue[/b] The value that this variable has when it is considered "on" or at "100%". This can even be a string, if the variable is a string that takes two values.

"flashicon": "icons\/Door_Lock.swf", "imgIconBody": "", "imgIconDimmable": "", "imgIconTurnable": "", "imgIconMin": "", "imgIconMax": "", "halloIconsDir": "pics\/hallo", "DisplayStatus": { "Service": "urn:micasaverde-com:serviceId:AlarmPartition1", "Variable": "ArmMode", "MinValue": "Disarmed", "MaxValue": "Armed" },

Where ArmMode is:

<stateVariable sendEvents="yes"> <name>ArmMode</name> <dataType>string</dataType> <shortCode>armmode</shortCode> <defaultValue>Disarmed</defaultValue> <allowedValueList> <allowedValue>Disarmed</allowedValue> <allowedValue>Armed</allowedValue> </allowedValueList> </stateVariable>

The result is that the base Door_Lock icons is always shown.

I’ve verified that the Door_Lock_0 and Door_Lock_100 icons exist as expected.

The Google Chrome console reports that the UI is looking for [url=http://192.168.xxx.xxx/cmh/skins/default/icons/Door_Lock_NaN.png]http://192.168.xxx.xxx/cmh/skins/default/icons/Door_Lock_NaN.png[/url] (where I’m guessing NaN is Not a Number) suggesting using strings no longer works. I’ve tried explicitly defining imgIconMin & imgIconMax file names to no avail.

The Vera log file shows the ArmMode variable is being correctly toggled between “Armed” and “Disarmed”.

This has been lifted directly out of other alarm plugins and (I think) follows the standard for alarm plugins so I’m surprised I can’t make it work.

Any thoughts appreciated.

It actually only accepts numerical values, not domain values. The stuff I have in the Alarm code will never show the lock status correctly. Some of the other lock impls create a derived, numerical only, value to trigger this to display correctly.

Okay, at least its not something I was doing.

I added the SecuritySensor service to my device and set the Armed property to 0 or 1 and it works like a charm. It will also allow me to show the device as Tripped when its in the Alarm state as well which probably works in better with other Vera security devices.

Thanks for the help.