I have been working on a plugin for some devices that can provide energy data (watts, amps, volts...) and show some of that in the Device Details pane. I looked through the online documentation and couldn't find anything, other than the mention of the
Device Base Class Properties which mentions
energyCurLevel,
energyAccumTotal,
energyAccumBaseTime &
energyAccumTimeDelta and a short discussion of
indigo.device.resetEnergyAccumTotal(). Then, in the Plugin SDK
Energy Meter Devices.xml I found this cryptic entry,,,
- Code: Select all
<!-- This hidden field forces property SupportsEnergyMeter to True
which enables the energy meter states and UI.
-->
<Field type="checkbox" id="SupportsEnergyMeter" defaultValue="true" hidden="true" />
<Field type="checkbox" id="SupportsEnergyMeterCurPower" defaultValue="true">
<Label>Supports power load:</Label>
<Description>Show current power load (Watts) in UI</Description>
</Field>
However, nowhere did I find any information on how to actually update the 4 energy properties that can be displayed in the Device Details. Finally, after looking through a couple of other plugins, I figured out there are four
magic states created, one for each energy property, and when these states are updated they actually update the 4 properties.
So, here is my question. Is this actually documented somewhere and I just missed it? Or, does it need to be added to the documentation?