hjespers/teslams — pull request #38 by dirkhh (2013-09-04 03:02:48+00:00)
Title: Improve stats

The energy accounting was nice, but didn't match what's shown in the car after driving.
Two days of playing with it show that a ridiculous hack of "value I get from the streaming API - 0.25" appears to consistently give the correct values (I kept checking during the day from the car browser - super useful).
But obviously I'd love to know if this is true for others as well as it is such a random hack.
I also added some accounting of the vampire losses separately from the energy used driving - and came to the conclusion that with the streaming API I get nowhere NEAR the right data - so I broke down and implemented a way to get this from the chargeState calls instead. This will need to be tested with 5.0 (once we restrict these kinds of calls... I think what I implemented should still work, but can't test it)