I'm playing with Indigo extensibility, and I've got Richard Perlman's Netatmo plugin as my playground. As agreed with Richard, I've published it here: https://github.com/orangy/indigo.netatmo
Here is what I find missing/problematic/unclear:
* Hidden fields needs some attention in docs. I've found them in some plugin, and some conventions around them are not clear from docs:
- Code: Select all
<Field type="checkbox" id="SupportsBatteryLevel" hidden="true" defaultValue="true"/>
<Field type="checkbox" id="SupportsSensorValue" hidden="true" defaultValue="true"/>
<Field type="checkbox" id="SupportsOnState" hidden="true" defaultValue="false"/>
Moreover, batteryLevel does work by convention, i.e. if I provide SupportsBatteryLevel and publish batteryLevel state, it shows in UI, even if device type is 'custom'. For sensorValue it doesn't work this way, requires 'sensor' device type.
* Some device data is not refreshed when reloading plugin, not yet sure which. When I update States list and reload plugin, it still won't accept these states in 'updateStateOnServer', I have to recreate devices and/or restart server.
* It would be nice to watch changes in plugin directory and reload plugin automatically, when Indigo client becomes active. Would save a lot of time debugging. Could be an option in Plugins page in preferences.
* How do you define custom multisensor? I have one for z-wave aeon multisensor and it has several pages in device settings. I would like to have similar thing in Netatmo plugin.
* Device Details could be configurable from States dictionary, by using 'uiValue' in 'updateStateOnServer', and providing control type in States like this:
- Code: Select all
<State id="Temperature">
<ValueType>Float</ValueType>
<ValueControl>Text</ValueControl> <!-- Display as simple text -->
<TriggerLabel>Temperature</TriggerLabel>
<ControlPageLabel>Temperature</ControlPageLabel>
</State>
Could have Text, On/Off (red/green circle), Percentage (like battery), Image Set (for enum values), etc. May also need <ValueLabel> field for text label in Device Details.
Will be much better than current "Custom States" list, which I found only accidentaly, cause it is hidden in default UI configuration.
* Device Controls could also be customisable from Devices.xml, so that I can add custom buttons and respond to custom actions in plugin.
* RESTful APIs are limited. I can't see folders there, don't see a way to get device current states.
Thank you for this wonderful playground for Home Automation, I have so much fun extending it Hope these issues can be solved/improved.