python-vesync icon indicating copy to clipboard operation
python-vesync copied to clipboard

Energy Usage?

Open MACscr opened this issue 7 years ago • 4 comments
trafficstars

Possible for your script to be expanded to include the energy monitoring stats that these outlets collect?

MACscr avatar Feb 06 '18 10:02 MACscr

@MACscr Check out the data from BASE_URL + '/v1/device/' + id + '/detail'

should get something like: { "deviceStatus": "on", "deviceImg": "", "activeTime": 10, "energy": 0.31, "power": "1eb031:200254", "voltage": "781c2:77283" }

I'm having a hard time deciphering the power/voltage readouts into matching values in the app.

mttkllr avatar Nov 15 '18 19:11 mttkllr

convert the 1eb031:200254 to hex (A:B)... Add A+B/8192 in this case: 501 voltage works out to be 119

jlboygenius avatar Feb 12 '19 23:02 jlboygenius

@jlboygenius wow, how did you figure that out? What's the underlying logic to that?

jimbocoder avatar Feb 16 '19 00:02 jimbocoder

I wish I was the genius who figured it out, I found it in some other code. No idea why they do that.

jlboygenius avatar Feb 16 '19 00:02 jlboygenius