I'm not expressing myself very clearly - apologies. I'll try again.
The ultimate problem I'm trying to solve is knowing when my automower has got stuck somewhere so I can go and rescue it. I'm doing this by monitoring the power consumption of its docking station, which jumps to ~30W (from 2-4W) when the mower docks and starts charging. If this hasn't happened for a while, I know the mower has likely got stuck somewhere and it's time for me to take a walk. It's doesn't need to be terribly accurate, or especially fast; a few minutes delay, and a few watts out on power consumption don't matter.
The power consumption figure comes from a TK68E Z-Wave socket, which I have successfully paired with my VeraEdge. The "instantaneous" power consumption is reported correctly & reliably in Vera - it's this figure I'm trying to get at so I can provide the necessary alerts.
In the indigo devices list, I can see the socket device, and I can see that it's connected via the Vera Bridge protocol.
The device details at the bottom of the screen show "On State", and "Total Usage", but there's no current energy level reported (at least not that I can find).
Similarly, if I try to form a "Device State Changed" trigger, the only states available to me are "On/Off State", "Total Usage (kWh)" and "Duration Since Energy Reset (seconds)". Again, no current energy level.
The current energy level is definitely making it through to the plugin - in the following from the debug log, I can see u'watts': u'2.3', as well as u'kwh': u'0.0600'
- Code: Select all
Vera Bridge Debug vera thread: _update: url: http://192.168.1.218:3480//data_request?id=lu_sdata&output_format=json&loadtime=1504565644&dataversion=565645540
Vera Bridge Debug vera thread: _update: ending at 09:18:39
Vera Bridge Debug vera thread: _update: starting at 09:18:42
Vera Bridge Debug vera thread: _update: url: http://192.168.1.218:3480//data_request?id=lu_sdata&output_format=json&loadtime=1504565644&dataversion=565645540
Vera Bridge Debug vera thread: _update: partial deviceInfo: {u'status': u'1', u'comment': u'', u'watts': u'2.4', u'room': u'1', u'parent': u'1', u'altid': u'2', u'kwh': u'0.0600', u'state': u'-1', u'id': u'3', u'subcategory': u'0'}
Vera Bridge Debug vera thread: _update: ending at 09:18:42
Vera Bridge Debug runConcurrentThread: processing update: {'device': {u'status': u'1', u'comment': u'', u'watts': u'2.4', u'room': u'1', u'parent': u'1', u'altid': u'2', u'kwh': u'0.0600', u'state': u'-1', u'id': u'3', u'subcategory': u'0'}, 'updateType': 'updateDevice'}
Vera Bridge Debug processUpdate called
Vera Bridge Debug processUpdate start: found device (TK68E skt w energy) updating: {u'status': u'1', u'comment': u'', u'watts': u'2.4', u'room': u'1', u'parent': u'1', u'altid': u'2', u'kwh': u'0.0600', u'state': u'-1', u'id': u'3', u'subcategory': u'0'}
Error device "TK68E skt w energy" state key curEnergyLevel not defined (ignoring update request)
Error device "TK68E skt w energy" state key curEnergyLevel not defined (ignoring update request)
Vera Bridge Debug processUpdate Finished: for device (TK68E skt w energy) : {u'status': u'1', u'comment': u'', u'watts': u'2.4', u'room': u'1', u'parent': u'1', u'altid': u'2', u'kwh': u'0.0600', u'state': u'-1', u'id': u'3', u'subcategory': u'0'}
Vera Bridge Debug vera thread: _update: starting at 09:18:45
I had thought about using changes in the Total Usage, but at 30W consumption when charging, the changes are of the order of ~0.002kWh over a 5 minute period, which is close to the resolution limits of the displayed figure. Not sure this is going to be reliable enough, especially given the unpredictable update intervals.
Hope that helps! And thank-you for taking the time to tackle this - I hugely appreciate it.