BavarianData — BMW CarData in Home Assistant, with a drive, charging and battery-health history layer

BMW’s CarData gives you a live MQTT stream and a REST API for your own
car, using a client ID you generate yourself. BavarianData connects
Home Assistant to it directly — no third-party cloud in between — and
then keeps a history on top of it.

The live part: one MQTT connection, OAuth tokens refreshed
automatically, and every streamed descriptor turned into a native
sensor or binary sensor. One device per VIN. A Lovelace card ships
with it, so there’s a usable dashboard without building one first.

The part I actually built it for — the stream is ephemeral, so the
integration derives and stores:

  • Trips — start/end, distance, duration, route track and a map,
    with automatic private/commute classification.
  • Charging sessions — energy, duration, cost, and location.
  • Battery health — estimated from charging sessions that span a
    large enough SoC range.
  • Long-term statistics that feed the Energy dashboard under
    Individual devices.
  • Export to CSV and to a self-contained HTML report.

Entity and field names are generated from BMW’s own catalogue in both
English and German, so nothing shows up as a raw token. There’s a
full wiki covering setup, every setting and every service.

Four things to know before you try it, because they’re CarData
limits and not fixable in software:

  1. Read-only. CarData cannot command the car — no preheating, no
    lock/unlock. Nothing built on it can.
  2. Europe only, at least for now.
  3. One concurrent stream per account. If you’re already running
    another CarData client, they will fight over the connection.
  4. 50 REST requests per 24 h per account. The integration budgets
    this and leans on the stream instead, but it’s a hard ceiling.

Install from HACS — it’s in the default store, so searching for
“BavarianData” finds it.

Repo and wiki: GitHub - JustChr/BavarianData: A Home Assistant integration that connects directly to BMW CarData — MQTT stream + REST API — turning your BMW's data into native entities. · GitHub

One honest caveat: it is developed against exactly one car, an i5
eDrive40. Which descriptors your model streams, and how the card looks
with them, is genuinely unknown to me. If you try it on anything else
I’d really like to hear what you got — that feedback is the thing I
can’t generate myself.

2 Likes

HI, works fine on a French BMW IX3 impressive 2023 home assistant greenbox.
Thanks for your job.

1 Like