Repository navigation
Replies: 5 comments 3 replies
|
Hi Jerry, Thanks, and thanks for the detailed example. Miles: fixed in v0.9.22-beta.1. In HACS, open BavarianData → ⋮ → Redownload and pick that version (it's a pre-release, so it won't show up as an update on its own). There's a new Configure → Units screen: kilometers or miles, plus fuel, temperature and tire-pressure units, all in one place. It starts on Automatic, which follows the unit your odometer sensor is shown in, then the car's own display setting, then Home Assistant's unit system. The unit system comes last on purpose: it only knows Metric and US customary, and a UK install is Metric with a car in miles, so it would always say km. Pick Miles and everything follows: every dashboard view (Trips and Efficiency included, with consumption in kWh/100 mi like My BMW), the settings, the service calendar, the month report, and the car's sensors in Home Assistant. Everything is still recorded in km underneath, so switching back and forth never touches your history. If you try it, I'd be glad to hear whether anything still shows km. Trip energy: as far as we can see, CarData doesn't have that number. My BMW gets it from a trip record the car sends to BMW's own app backend, measured inside the car much more finely than it streams. None of the CarData fields is the energy used on a trip. The closest are climate/comfort energy and recuperation, and on my i5 even the "energy to full charge" field only moves in whole kWh. What we can work out is the SoC drop times the battery size: 74 → 67 % on your i4 M50 is about 5.7 kWh, give or take 0.8 kWh, because each end is rounded to a whole percent. BMW's 5.1 kWh is within that, but on a short trip the error is as big as the number, so we don't show it per trip. To check whether your i4 sends more than mine: after a drive, Settings → Devices & services → BavarianData → ⋮ → Download diagnostics. It's already redacted (no VIN, no positions) and lists every field your car has sent and how often. I'd look for any trip energy fields, and whether your car sends its distance display unit. If it does, Automatic gives you miles without you touching anything. Chris |
|
Hi Chris,
Wow, that was quick!
Thank you.I'll install v0.9.22-beta.1 and test the new Units settings on the i4.I'll keep an eye out for anything that still shows km.
I'll also download the diagnostics after a drive and send them over so you can see whether the M50 exposes anything useful that your i5 doesn't
.Completely understand your reasoning on the trip energy figure.
If CarData only gives enough information to estimate it with that sort of margin, I agree it's better not to present it as an accurate value.
Really appreciate you turning the units change around so quickly.Jerry
I sent you a coffee earlier, good luck with this. Your hard work will pay off
Regards
Jerry
…Sent from my iPhone
On 20 Oct 2026, at 20:50, JustChr ***@***.***> wrote:
Hi Jerry,
Thanks, and thanks for the detailed example.
Miles: fixed in v0.9.22-beta.1<https://github.com/JustChr/BavarianData/releases/tag/v0.9.22-beta.1>. In HACS, open BavarianData → ⋮ → Redownload and pick that version (it's a pre-release, so it won't show up as an update on its own).
There's a new Configure → Units screen: kilometers or miles, plus fuel, temperature and tire-pressure units, all in one place. It starts on Automatic, which follows the unit your odometer sensor is shown in, then the car's own display setting, then Home Assistant's unit system. The unit system comes last on purpose: it only knows Metric and US customary, and a UK install is Metric with a car in miles, so it would always say km.
Pick Miles and everything follows: every dashboard view (Trips and Efficiency included, with consumption in kWh/100 mi like My BMW), the settings, the service calendar, the month report, and the car's sensors in Home Assistant. Everything is still recorded in km underneath, so switching back and forth never touches your history. If you try it, I'd be glad to hear whether anything still shows km.
Trip energy: as far as we can see, CarData doesn't have that number. My BMW gets it from a trip record the car sends to BMW's own app backend, measured inside the car much more finely than it streams. None of the CarData fields is the energy used on a trip. The closest are climate/comfort energy and recuperation, and on my i5 even the "energy to full charge" field only moves in whole kWh.
What we can work out is the SoC drop times the battery size: 74 → 67 % on your i4 M50 is about 5.7 kWh, give or take 0.8 kWh, because each end is rounded to a whole percent. BMW's 5.1 kWh is within that, but on a short trip the error is as big as the number, so we don't show it per trip.
To check whether your i4 sends more than mine: after a drive, Settings → Devices & services → BavarianData → ⋮ → Download diagnostics. It's already redacted (no VIN, no positions) and lists every field your car has sent and how often. I'd look for any trip energy fields, and whether your car sends its distance display unit. If it does, Automatic gives you miles without you touching anything.
Chris
—
Reply to this email directly, view it on GitHub<#183?email_source=notifications&email_token=BE5SQV3O6XDUUTQNPXSFP7D5U66Y7A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOJQHAYDKMBUUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVRTG633UMVZF6Y3MNFRWW#discussioncomment-19080504>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BE5SQV5O4JPC2FJFPCQ4MAL5U66Y7AVCNFSNUABJKJSXA33TNF2G64TZHMYTEOJRGI4DGMRVGM5UI2LTMN2XG43JN5XDWMJRGA4DSNBSGWQXMAQ>.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS<https://github.com/notifications/mobile/ios/BE5SQV66XATWHKE442OS7HL5U66Y7A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOJQHAYDKMBUUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVJTG633UMVZF62LPOM> and Android<https://github.com/notifications/mobile/android/BE5SQVZ6EG66TS2XYAYIMST5U66Y7A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOJQHAYDKMBUUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>. Download it today!
You are receiving this because you authored the thread.
|
|
Hi Jerry, Thank you for the coffee, that was kind. It isn't why this was quick, though. Your report was clear and the fix was overdue, so it went straight to the top of the list. One thing to know before you try it: on beta.1, picking Miles also switches the car's altitude sensor to miles, so it shows something like 0.11 mi instead of meters. That's a bug on my side, already fixed, and the fix comes with the next beta. Your other sensors and the dashboard aren't affected, and nothing recorded changes. Once you're on the next beta, the altitude goes back to meters by itself. Looking forward to your diagnostics after a drive. Chris |
|
Hi Chris,
The coffee was simply a thank you for all the time and effort you've put into creating BavarianData 😊
Miles was left on Automatic in the Units config and worked straight away. The exported report is also correctly showing miles, just so you know.
I've just done the first test drive and spotted something else that may be useful.
It's clearly the same trip in My BMW and BavarianData because both show 17 minutes, but the distance and consumption differ a bit:
My BMW
* 9.4 mi
* 17 min
* 48.3 kWh/100 mi
* 4.5 kWh energy consumed
BavarianData
* 7.5 mi
* 17 min
* 52.3 kWh/100 mi
*
So BavarianData appears to be about 1.9 miles, or 20%, short on the distance for this particular drive.
Interestingly, BMW's 4.5 kWh over 9.4 miles works out at roughly 47.9 kWh/100 mi, which is very close to its displayed 48.3 figure.
I've downloaded the normal diagnostics immediately after the drive and attached them.
I also enabled Trip-capture diagnostics before driving. I have the NDJSON file, but it contains a large amount of older telemetry as well as VIN/GPS information, so I haven't attached that publicly.
I'm very happy to provide that privately, do another capture, or test anything else on the i4 if useful.
Thanks again,
Jerry
From: JustChr ***@***.***>
Sent: 20 October 2026 21:42
To: JustChr/BavarianData ***@***.***>
Cc: Jerry Holcroft ***@***.***>; Author ***@***.***>
Subject: Re: [JustChr/BavarianData] Trips - miles and actual trip kWh on i4 M50 (Discussion #183)
Hi Jerry,
Thank you for the coffee, that was kind. It isn't why this was quick, though. Your report was clear and the fix was overdue, so it went straight to the top of the list.
One thing to know before you try it: on beta.1, picking Miles also switches the car's altitude sensor to miles, so it shows something like 0.11 mi instead of meters. That's a bug on my side, already fixed, and the fix comes with the next beta. Your other sensors and the dashboard aren't affected, and nothing recorded changes. Once you're on the next beta, the altitude goes back to meters by itself.
Looking forward to your diagnostics after a drive.
Chris
—
Reply to this email directly, view it on GitHub<#183?email_source=notifications&email_token=BE5SQVYOEYOSMRXUL3D4TNL5U7E2RA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOJQHAYTIMRTUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVRTG633UMVZF6Y3MNFRWW#discussioncomment-19081423>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BE5SQVZRZJVVYUOO2QQNTZL5U7E2RAVCNFSNUABJKJSXA33TNF2G64TZHMYTEOJRGI4DGMRVGM5UI2LTMN2XG43JN5XDWMJRGA4DSNBSGWQXMAQ>.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS<https://github.com/notifications/mobile/ios/BE5SQV7QZ4HS4FH23ULBO7D5U7E2RA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOJQHAYTIMRTUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVJTG633UMVZF62LPOM> and Android<https://github.com/notifications/mobile/android/BE5SQV5USWSFGJW6ISOHI2D5U7E2RA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOJQHAYTIMRTUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>. Download it today!
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
|
I've attached the fresh diagnostics taken after the return journey, along with the trip capture processed using your anonymize_capture.py script. I've checked the anonymised output for the full VIN, the final seven VIN characters, and identifiable location/address information before uploading it. The capture contains both journeys from today: Outbound journey My BMW: 9.4 mi, 17 min, 48.3 kWh/100 mi, 4.5 kWh total Return journey My BMW: one continuous journey of 8.4 mi, 15 min, 59.6 kWh/100 mi and 5.0 kWh total There was definitely no stop between those two BavarianData trips. Combined, they total 8.7 miles, which is close to BMW's 8.4 miles, but the journey was incorrectly divided. The anonymiser has shifted the timestamps and locations, so the original times will no longer match my local drive times. The return journey should be identifiable in the capture as the later driving sequence that BavarianData divided into the 7.5-mile and 1.2-mile sections. Hopefully the capture helps pinpoint both the short outbound distance and what caused the return journey to split. Let me know if you need any more config_entry-bavariandata-01M3VQRAP41QK7YGVTCAAC7SE9.json |
Uh oh!
There was an error while loading. Please reload this page.
Hi Chris,
Firstly, thanks again for BavarianData. I’m using it with my i4 M50 and it’s working brilliantly.
I’ve been playing with the Trips view and wondered whether two things might be possible.
Being in the UK, I’d really like trip distances to display in miles rather than kilometres, ideally following the Home Assistant unit setting.
The other is the actual energy used for an individual trip in kWh. BavarianData currently gives me average consumption, whereas personally I find the actual amount of energy used on that journey more useful.
As a real example, My BMW shows one of today’s trips as:
Work → Home
21 minutes
74% → 67%
28.4 mph average
53.1 kWh/100mi
5.1 kWh total energy consumed
BavarianData has correctly captured the same journey as Work → Home, 14 km, 21 minutes.
I’ve read your explanation about BMW only streaming SoC in whole percentages and understand why calculating precise trip energy from that is problematic, particularly on shorter journeys. I also noticed that the Trip in Progress data exposes energy_kwh.
What I’m wondering is whether the more precise 5.1 kWh figure shown in My BMW exists somewhere in the CarData available from my i4 M50, or whether BMW calculates that separately for My Trips.
If it’s something you’d be interested in looking at, I’m more than happy to help. I can provide screenshots, descriptors, diagnostics or test changes against the i4 M50 if that’s useful.
No problem at all if BMW simply doesn’t expose the figure through CarData. I thought it was worth asking because My BMW clearly has it somewhere.
Thanks again for all your work on BavarianData.
Jerry
All reactions