When I run the sample switch app against the SES and tell it to turn on and monitor the callbacks, I am getting correct power readings for the air conditioner.
Basically I am sending the setSwitchOn(True) command and then getDeviceName, getLastNotificationIndexName, getLastNotificationIndexValue
Device Created Callback: House
Index: STATE, Value: true
Device Created Callback: House
Index: STATE, Value: false
Device Created Callback: House
Index: STATE, Value: true
Device Created Callback: House
Index: STATE, Value: false
Device Created Callback: Stereo Lamp
Index: SWITCH BINARY, Value: false
Device Created Callback: Stereo Lamp
Index: SWITCH MULTILEVEL, Value: 0
Device Created Callback: Stereo Lamp
Index: SWITCH MULTILEVEL, Value: 255
Device Created Callback: TV Lamp
Index: SWITCH BINARY, Value: false
Device Created Callback: Air Conditioner
Index: POWER, Value: 81.982W
Device Created Callback: Air Conditioner
Index: POWER, Value: 544.327W
Device Created Callback: Air Conditioner
Index: POWER, Value: 81.587W
The first few entries are me switching lights on or off, the Power/Air Conditioner entries show accurate power readings. These readings do show up in the IOS and Android App properly.
So it looks like the SES just needs a little wake up (send it some command) and it will report back current usage.
Since we only care about power usage when it's already on, a simple script that sends a setSwitchOn(True) is enough to get a response from the SES with an updated power reading. This is very easily programmed for whatever interval you want. The app would be a minor tweak to the improved sample switch app and would go something like this.
./almond/powermonitor (device id) (interval in seconds)
And powermonitor.cpp would compile to powermonitor executable and simple send an ON command to the SES every X seconds.
I'll create a new thread with the c++ files needed.