python-vesync
python-vesync copied to clipboard
Energy Usage?
Possible for your script to be expanded to include the energy monitoring stats that these outlets collect?
@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.
convert the 1eb031:200254 to hex (A:B)... Add A+B/8192 in this case: 501 voltage works out to be 119
@jlboygenius wow, how did you figure that out? What's the underlying logic to that?
I wish I was the genius who figured it out, I found it in some other code. No idea why they do that.