Consumption & Used (kWh) are different to what Car Tips are reporting
Is there an existing issue for this?
- [X] I have searched the existing issues
What happened?
Since the installation of TeslaMate, the reported consumption always seemed to me higher than the car reports, however I didn't happen to collect good enough info for a bug report, until very recent road trip (almost ~2000km), for which I made sure to reset 'this trip' trip card, right at the start (as we left house), so we can have as close as possible data from on-board Trip calculation to TeslaMate.
Simply put, the car has reported:
- Distance: 1781 km
- Energy used: 284 kWh
- Efficiency: 159 Wh/km
Where the same time frame in Tesla Mate reporting:
- Distance: 1781 km
- Efficiency Net: 169 Wh/km
- Efficiency Gross: 173 Wh/km
- Energy used: 308.7 kWh
From https://github.com/adriankumpf/teslamate/discussions/2021 , My understanding 'net' (driving efficiency) is what Tesla trip card should be reporting too (?)
However you can see that, TeslaMate and Tesla agree on the trip distance, but do not agree on efficiency & used energy.
So, I wonder is this the limitation of API that TeslaMate is using to pull data, a bug in TeslaMate calculation or expected behaviour (i.e TeslaMate and Tesla Trip card do not show the same data)
Expected Behavior
I expect that TeslaMate numbers for: 'Efficiency' & 'Energy used' to be as close to the in car reported values to be (it's ok if they are within some margin of error +-, but in this case you can see the values are very different (i.e 173 vs 159 Wh/km) The distance report is matching between Tesla and TeslaMate, so why other numbers not?
Steps To Reproduce
- Reset in car Trip meter
- Take it for a drive
- Come back, and compare number for this trip in the car trip meter vs TeslaMate
Relevant log output
N/A
Screenshots
No response
Additional data
I wish I can export the db, but the data will contain some private information (such as home location, and places where we have stopped) So, I won't be attaching the raw data here, but I'm happy to work with developers, to run some selective queries that you'd need to understand the issue, which would keep my location data not exposed on public GitHub page.
ps. for future me, time range for this trip (in case I need to run db queries, timestamps are handy): start: 2023-01-26 00:00:00 end: 2023-01-30 23:59:59
Type of installation
Docker
Version
v1.27.2
I think the reason these numbers will not match is that the 1) the values are not provided by the API and as such, TeslaMate is taking a swag at calculating them. And 2) the calculation to get a guesstimate is also not published.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I've also observed this but the funny part is that the Energy app from Tesla shows the same consumption as TeslaMate, and the trip card info shows other consumption (less).
I've posted here: https://teslamotorsclub.com/tmc/threads/current-drive-trip-card-consumption-is-wrong-or-misleading-not-about-sentry-preheating-or-charging-loses.346416/
I don't know the reason behind this, maybe someone knows.
@Deishelon I don't know if you are still interested in this mystery, but finally there is some logical explanation for this. More details here: https://teslamotorsclub.com/tmc/threads/current-drive-trip-card-consumption-is-wrong-or-misleading-not-about-sentry-preheating-or-charging-loses.346416/page-2#post-8770381
@JakobLichterfeld @swiffer sorry for tagging but you might be interested in the above findings, that the "charge_energy_added" API value it's probably wrong by the same percentage as the buffer size.
Many calculations might be wrong because they are using the "efficiency" which is calculated from "charge_energy_added" which might be wrong.
I've just found this and I will double check on my next charge with "ScanMyTesla".
If the bug is confirmed, maybe there is a possible solution by adjusting the "charge_energy_added" value based on the buffer size? I'm not sure but it might be an option.
What do you think?
Thanks!
@Deishelon I don't know if you are still interested in this mystery, but finally there is some logical explanation for this. More details here: https://teslamotorsclub.com/tmc/threads/current-drive-trip-card-consumption-is-wrong-or-misleading-not-about-sentry-preheating-or-charging-loses.346416/page-2#post-8770381
@JakobLichterfeld @swiffer sorry for tagging but you might be interested in the above findings, that the "charge_energy_added" API value it's probably wrong by the same percentage as the buffer size.
Many calculations might be wrong because they are using the "efficiency" which is calculated from "charge_energy_added" which might be wrong.
I've just found this and I will double check on my next charge with "ScanMyTesla".
If the bug is confirmed, maybe there is a possible solution by adjusting the "charge_energy_added" value based on the buffer size? I'm not sure but it might be an option.
What do you think?
Thanks!
Thanks for sharing this! Interested indeed. Good read!
I've just measured a charging with ScanMyTesla and I can confirm that both the value displayed in the Tesla UI "+28 kWh" and the "charge_energy_added" field from API are wrong. The "+188 km" shown in the UI seems to be correct if you multiply by the correct rated consumption value.
As Wugz said, it seems that the "charge_energy_added" and the UI "+x KWh" added are wrongly calculated with the formula: SOC change% * nominal full, instead of SOC change% * usable full (which is nominal full - buffer).
For "+28 kWh" shown in the UI, ScanMyTesla measured +26.8 kWh.
Full data:
- +26.8 kWh measured by ScanMyTesla
- +188 KM shown in the UI: which is 188km * 14.24 Wh/km (rated consumption) = +26.77 kWh
- +28 kWH shown in the UI: no coincidence that 28kWh * 95.5% (removing the buffer) = +26.74 kWh
- +28.04 kWH "charge_energy_added" in the API: 28.04 kWh * 95.5% (removing the buffer) = +26.7782 kWh
- +38% battery SOC changed in the UI, which represents:
- 38% of 73.6 kWh (nominal full) = 28 kWH
- 38% of 70.29 kWh (usable full) = +26.71 kWh
This data it's enough for me to realize that it's not a coincidence, but a bug in their software.
Because the "charge_energy_added" reported by Tesla is wrong, this means for TeslaMate that:
- the charge efficiency is incorrect
- the calculated rated efficiency is incorrect, which means that:
- many consumption measurements are also incorrect
Nice findings - accounting for a fixed buffer of 4.5% is relatively easy - from what i've read so far this buffer varies between different models, age and battery sizes so it looks like itsnit that easy to account for it. Or can nominal full vs usable full be retrieved by api as well?
I agree on one hand. But we must rely on the API values. They provide a ground truth.
Or can nominal full vs usable full be retrieved by api as well?
only usable_battery_level imo
It seems that this is the only field available in the API that says something about the battery in kWh. There is no nominal full, usable, buffer, nothing.
At a quick look, I can't seem to find any other field that we can use from the API to calculate the correct charge_energy_added or the correct rated consumption of the model.
So far, I can't see any automatic solution, only hardcoded/manual solutions:
- hardcode the correct rated consumption for each different model
- enter some manual data about:
- Buffer
- Usable
- find the buffer formula that Tesla uses (i don't think we can find that)
No solution seems to be good enough so far.
I agree on one hand. But we must rely on the API values. They provide a ground truth.
A ground truth that sometimes is a big lie:
- charge_energy_added is unfortunately wrong
- the range in "km" when regenerating increments only in 5km steps. It goes down with 0.1km precission, but up only by 5km. Investigating further, it seems that when regenerating, the range in "km" updates only when the soc of the battery changed with 1%.