MikeBishop / MMM-Powerwall

MagicMirror2 module for Tesla Powerwall and TWCManager
MIT License
22 stars 4 forks source link

Power and Energy APIs can disagree #75

Closed MikeBishop closed 3 years ago

MikeBishop commented 3 years ago

With a large amount of usage around midnight, it appears that the kind=energy results indicate the usage having ended by midnight, while kind=power indicates it concluding shortly after midnight. This results in oddities like negative local usage for the present day.

Currently, we derive the total usage from the car by integrating over the power history; it's possible we could do the same thing for the rest of the power history as well and stop using the energy API entirely.

MikeBishop commented 3 years ago

The discrepancy appears to have been an API glitch, and integrating the power data is insufficient for sources which can be draw and supply power. Unfortunately, I think we just have to hope Tesla fixes their bug by the time DST comes around again.