BavarianData

Manual / Reference

Troubleshooting & FAQ

Jump to:

“Authorization didn’t finish”: access_denied during setup

Home Assistant shows this as “Authorization didn’t finish”, with “We couldn’t complete the device authorization” and access_denied in the details. BMW’s device-authorization backend can return access_denied (“The user has declined authorization”) even though you never saw a consent page and the login clearly worked. This is flakiness on BMW’s side, not the integration — BMW support has confirmed (in response to a ticket) that the device-code flow is handled by an internal partner system with “sync problems.” There is nothing the integration can do to fix it.

Update, 2026-07-28 — BMW says this is fixed. BMW notified several projects that the partner-system sync problem has been resolved, and confirmed it by email to users who had raised tickets. Most affected people got through immediately afterwards. Affected clients are not repaired in place: BMW’s instruction is to delete the CarData client in the portal, create a new one (tick both subscriptions), and run the device flow again with the new client ID. If you have been stuck for weeks, do that first — before working through the ritual below.

If it still fails, two things outside the flow itself have repeatedly turned out to be the cause:

  • MyBMW app privacy settings. Several people only got through after setting the profile’s privacy/data-sharing settings to all in the MyBMW app and then starting the car once so the change is applied. You can turn them back down afterwards.
  • Ad blockers. AdGuard, Pi-hole and friends can break the portal’s approval page. Disable them for the attempt.

Beyond that it can take a few attempts. This sequence has worked reliably (multiple times) for others:

  1. Open a fresh incognito/private browser window.
  2. Go to the My BMW / CarData portal manually — do not use the pre-filled complete link, and strip any ?user_code=… from the URL.
  3. Sign in, open Authenticate device (“Gerät authentifizieren”), then type the user code by hand (make sure no “incorrect code” banner appears) and approve. You’ll typically land on a “Login successful” / “continue in the car” screen — you don’t need to do anything in the car; that screen is just confirmation. Go straight back to Home Assistant and press Submit.
  4. If the code timed out meanwhile, press Submit in Home Assistant for a fresh code and repeat.
  5. Still failing after several tries? Delete the client in the BMW portal, create a new one (tick both subscriptions), and redo auth with the new client ID.

If none of that helps, stop retrying and wait. This is genuinely a lottery on BMW’s side. Many users only got through after leaving it alone for several hours to a couple of days (sometimes it starts working overnight with no further action); rapid retries don’t seem to speed it up. There’s no single trick that works for everyone. For the hardest cases the only lever left is BMW support: bmwcardata-b2c-support@bmwgroup.com (include your reference ID from the error, if BMW showed one).

No data arriving (“No BMW CarData stream data received”)

  1. Make sure you completed step 4 — descriptors must be ticked and saved in the portal’s Data Selection.
  2. Trigger a lock/unlock in the MyBMW app to prompt the car to send an update.
  3. Run bavariandata.get_coverage_report (Services) — it tells you exactly which expected descriptors haven’t arrived, so you can tell a selection problem from a car-doesn’t-send-it problem. A cluster with some fields arriving is healthy; one with none is the selection problem.

If nothing streams for 48 hours, a repair issue titled “No BMW CarData stream data received” appears under Settings → Repairs, pointing back here. If the stream works but one cluster you selected has sent nothing at all for days, the repair is “A selected data cluster has never streamed” instead: that cluster isn’t saved in the portal’s Data Selection, or your car doesn’t produce that data. Re-activate it under Configure → Choose streamed data, or unselect it.

The battery level stands still while the car charges

BMW CarData often stops streaming the state of charge mid-charge, for an hour or more, so Battery HV State Of Charge stands still and then jumps. Use State Of Charge (Predicted on Integration side) instead: it keeps counting from the charging power, or from your wallbox meter. See state of charge while charging.

One sensor reads unknown or looks stuck while the rest update

Usually not a fault. Check three things:

  1. Is it calculated rather than sent by BMW? Real Range, the charging-cost sensors and Battery Health need some charging history first. Real Range’s status attribute says what it is waiting for. See Unknown or unavailable?.
  2. Is it the right sensor? Several range and state-of-charge sensors look alike, and some only change while charging or at the end of a drive. See which range entity and which state-of-charge entity to use.
  3. Is BMW still sending it? Diagnostics list every field with how often it arrived and when it last did. If a field keeps arriving but its entity doesn’t follow, that’s a bug — open an issue with the diagnostics attached.

A field the portal lists never shows up

The BMW and MINI portals list every data point for every car, including ones your car never sends. Ticking a field in Data Selection lets BMW pass it on; it doesn’t make the car measure or report it. Some fields BMW answers only with placeholder values, and BavarianData creates no sensor from those.

Known cases:

  • Tire diagnosis on iDrive 6 cars. BMW’s Digital Tyre Diagnosis isn’t available on iDrive 6, so the tire-condition fields stay empty (#174). Since 0.9.22 no tire-diagnosis sensors are created for those cars.
  • Tank level on petrol MINIs (#100).
  • Tire pressure on the MINI Cooper SE (F56), although its sensors are fitted (#180).
  • Motion and ignition (vehicle.isMoving, engine.isIgnitionOn, engine.isActive). No car seen so far sends them, electric or not, and BMW’s REST data holds nothing for them either. Trips are detected from position and mileage instead.
  • Coolant temperature, lights and the 12 V battery on the X3 xDrive30e (G01) (D#388). Two of these cars have now been seen, and neither sent them.

To see which of your selected fields your car really delivers, run get_coverage_report, or check the field in the diagnostics. A field that never arrives there can’t be fixed in BavarianData. A field that arrives but whose entity doesn’t follow is a bug: open an issue with the diagnostics attached.

A sensor shows an absurd value, or reads unknown after an update

Changed a unit in an entity’s settings? Versions up to 0.9.6 had a bug where that unit was applied again on every Home Assistant restart. A tire pressure the car reports in kPa but shown in bar was divided by 100 each time, so it drifted towards zero — 2.5e-10 bar after five restarts (issue #7). Readings the car sends rarely, like tire pressure, were worst affected, because a fresh message from the car was what reset the value. Installs using the US customary unit system were affected without changing anything, since Home Assistant picks the display unit itself there — distance, speed, temperature, pressure and volume.

Update to the latest release. From then on the value is stored in the unit the car sends it in, and the unit you display it in makes no difference to it.

Why it then says unknown: a value that already drifted can’t be recovered, and the update deliberately discards it rather than keep a wrong number. The sensor fills in the next time the car reports that reading — immediately for most, at the end of your next drive for tire pressure. Recorded history keeps the old bad values; only new readings are correct.

You can keep displaying whatever unit you prefer. Settings → Devices & services → Entities → the entity → ⚙ → Unit of measurement is safe again.

“Doors lock” hasn’t changed in days

Expected, and not a fault. BMW does not put vehicle.cabin.door.lock.status on the stream — it only refreshes on a REST call, so it shows whatever the lock was at the last daily refresh and can be days out of date.

Use Doors overall state (vehicle.cabin.door.status) instead: it is streamed and follows every lock/unlock within seconds, with the same Secured / Locked / Partially locked / Unlocked values. See Which lock entity to use.

The fuel in litres never changes

BMW’s side, and not a fault. Some cars (a 530e plug-in hybrid, for one) send the fuel in litres (vehicle.drivetrain.fuelSystem.remainingFuel) only with their occasional Teleservice call, while the fuel level in percent (vehicle.drivetrain.fuelSystem.level) arrives with every drive. The litres can then sit unchanged for weeks. BMW’s own CarData export shows the same old value, stamped with the last Teleservice call.

BavarianData ignores litres that are more than a day older than the fuel level. The Fuel view then shows the level and finds refuels in it. Consumption between refuels is worked out in litres, so on such a car it stays empty.

A new car shows up as its VIN, with no model

Everything that names a car — model, series, software version, the device name itself — comes from one REST call to BMW. Until it has answered, a car is a bare VIN.

It is fetched automatically the first time a car is seen on the stream, and again after every Home Assistant start for any car still without it (one request per such car). To ask right away, run Configure → Fetch from BMW now → Fetch basic vehicle info, which covers every car on the entry.

The same call tells the integration the drivetrain and which side the driver sits on, so without it a right-hand-drive car has its doors drawn on the wrong side of the card. A failed call leaves a warning in the log (basic data request failed) with BMW’s status code.

Its streamed fields are a separate matter: BMW’s Data Selection is per vehicle and portal-only, so tick the new car’s fields via Configure → Choose streamed data. See Multiple cars & accounts.

“This BMW account is already set up in Home Assistant”

One config entry covers a whole CarData account, including every car on it — there is no need for a second entry per car, and setup refuses one, even when you generated a second Client ID in the BMW portal.

BMW allows only one stream connection per account, so two entries for the same account would lock each other out in turns, and both would count against the same 50-request daily quota while claiming 50 each. To move the existing entry to a new Client ID of the same account, use Reconfigure on the integration: it keeps the cars and their history. Two different accounts are fine side by side — see Multiple cars & accounts.

A Configure screen shows empty lines after an update

Symptom: after updating BavarianData, a Configure screen opens with rows, fields or buttons that have no text, and its title is only the integration’s name. It happens on screens the update added (#287).

The browser loads an integration’s screen texts once and keeps them until the page is reloaded. A tab that stayed open across the update and the restart still has the old texts, so a new screen has nothing to show. Hard-refresh the browser (Ctrl+F5, Cmd+Shift+R on a Mac), or reset the companion app’s frontend cache (see the mobile-app section), then open the screen again.

“BMW CarData stream not authorized” (MQTT rc=5, Not authorized)

If the stream is rejected as unauthorized (MQTT rc=5, logged as Not authorized) and stays that way, a repair issue titled “BMW CarData stream not authorized” appears under Settings → Repairs. The integration retries and re-authorizes on its own first; the repair only appears once that hasn’t recovered it for a while.

If a freshly renewed token is refused too, the login isn’t the problem, and the repair is titled “Another program holds the BMW stream” instead: see one stream per account. Otherwise there are two usual causes:

  1. Stale tokens. Run Configure → Connection → Refresh tokens now. If it keeps failing, Configure → Connection → Re-authorize with BMW (the refresh token expires roughly every two weeks — see access denied if the re-auth itself is rejected).
  2. Another client holds the stream. BMW allows only one stream per account — disconnect any other CarData client, then reload the integration.

Only one stream per account

BMW allows a single concurrent streaming client per account (GCID). The one that has the stream keeps it, and BMW refuses every other with not authorized (MQTT rc=5), the answer a wrong login gets too. The stream changes hands only when its holder lets go, at least once an hour to renew its login, so two programs take turns locking each other out: values stop for minutes or hours, the connection sensor shows the stream as not connected for long stretches, and evcc loses the state of charge.

When a freshly renewed login is refused as well, BavarianData knows another program holds the stream. It tries again every few minutes and picks the stream up as soon as it is free; if that takes more than half an hour, the repair “Another program holds the BMW stream” appears under Settings → Repairs.

The most common second client is evcc’s own BMW CarData vehicle; others are a second CarData integration, an ioBroker or openHAB adapter, a MagicMirror module or a Garmin widget. You don’t have to choose between them: let BavarianData hold the stream and give it to the others over MQTT with the MQTT bridge, which has a table of what to set for each tool. A second CarData integration in Home Assistant can’t share it; pick one.

The car can’t be controlled

Read-only. CarData cannot send commands, so this integration can’t lock, precondition, or otherwise control the car. Automations act on external devices in response to the car’s data — see Events & blueprints.

Does BavarianData work with a BMW motorcycle?

No. BMW’s CarData guide says streaming is not available for BMW Motorrad. A motorcycle can still be mapped to the account and pass setup, so its device would simply stay empty. When the integration sees a motorcycle in the vehicle’s basic data, it raises a warning under Settings → Repairs: “BMW motorcycles can’t stream their data”. There is nothing to fix on your side; remove the entry if the account has no car.

Download diagnostics

The fastest way to turn “it doesn’t work” into an answer. Go to Settings → Devices & Services → BavarianData → ⋮ → Download diagnostics and attach the file to your issue.

It costs no API quota — everything in it is state the integration already holds — and it is built to be safe to post in public: your VIN, GCID, client ID, tokens, MQTT topic and GPS coordinates are redacted automatically, and so are the names of the entities you picked in the settings (a phone, a zone, an energy sensor): the file only says that one is set. The file does carry a short one-way fingerprint derived from your GCID: it cannot be turned back into the id, and its only use is telling whether two downloads came from the same account — which matters because BMW allows one live stream per account.

What’s left is exactly what distinguishes the common failures from each other:

In the fileAnswers
Quota state (used / remaining / next reset)Whether you’ve spent the day’s 50 requests.
Selected clusters + descriptor coverage per carWhether Data Selection actually saved, and whether the car produces what you picked.
Per-descriptor arrival counts and last-seen timesWhether the stream is delivering, and what.
Connection history with MQTT rc codesAuthorization failures, and another client stealing the single stream.
Bootstrap state and your optionsSetup that never finished; a setting that isn’t what you thought.
The permissions BMW granted (their names only, never a token)Whether your client may use BMW’s REST API at all. Without CarData API, the stream still works but every fetch is refused with HTTP 403.
How BMW answered REST requests since the last restart: how many worked, how many failed, and the last failure (which request, the HTTP status, BMW’s CU- code)Whether fetching works at all, even while the stream does.
The car’s model and drivetrainWhich overview the card should draw, and which electric-only entities should exist.
How the car reports, since the last restart (counts only, no values)Whether the charge level streams or only comes with a fetch, whether the car reports while driving or once after parking, and which fields repeat unchanged.

Debug logging

Off by default. Turn it on in Configure → Connection → Debug logging and reload. It’s verbose and can include vehicle data such as GPS and the full VIN, so leave it off unless you’re chasing a problem. (Separate from Home Assistant’s generic per-integration log level.)

Ordinary log lines — the ones written without debug enabled — show the VIN masked to its last four characters (***1234), which is still enough to tell two cars apart when you read the log.

Prefer the diagnostics download when reporting a problem: it carries more of what’s needed and less of what isn’t.

Capturing a drive for trip detection

If trips are being missed, split or mis-measured, a capture of one drive gives us the raw data to improve detection. Turn on Trip-capture diagnostics under Configure → Trips (independent of Debug logging), take a normal drive that reproduces the problem, then turn it back off.

For the richest capture, first select as many data fields as you can in the BMW portal’s Data Selection (Choose data) — especially the navigation/GPS, speed and drivetrain fields. The capture can only show what the car actually streams, and part of what we’re looking for is which extra signals (GPS fix quality and satellite count, heading, speed, HV-system and door/lock state) your car sends while driving.

It produces two things:

  • Log lines tagged for easy filtering — grep the Home Assistant log for [trip.:
    • [trip.gps] — every GPS fix with its step, inter-fix gap, stream latency, odometer, SoC, the close-timer countdown, and GPS fix state / satellite count / heading (so a “no movement” run can be told apart from a lost fix).
    • [trip.timer] — when the stationary-close timer arms and fires.
    • [trip.door] — driver-door start/end refinements (when the car streams the door).
    • [trip.seg] — each BMW trip-segment batch in full, with timestamps.
    • [trip.watch] — a curated set of candidate “is it driving?” signals (speed, HV-system state, ignition, driver door, both central-lock descriptors, active navigation) whenever the car streams them.
    • [trip.raw] — every other descriptor each message carried.
    • [trip.post] — a one-line summary per closed trip (distances side by side, fix counts, largest GPS gap).
  • A capture file bavariandata_trip_capture.ndjson in your Home Assistant config folder — one JSON record per message, so a drive can be replayed offline while testing detector changes.

Both contain GPS coordinates and your VIN. Don’t send them as they are, not even privately. Scrub the capture file first with anonymize_capture.py (plain Python, nothing to install):

python anonymize_capture.py bavariandata_trip_capture.ndjson trip.ndjson

It replaces the VIN, shifts every position and time (distances and gaps stay exact) and drops address and destination fields. Search trip.ndjson for your VIN, including its last 7 characters, and for your street and town, then attach it to your issue or discussion. Delete the original when you’re done; it stops growing at ~25 MB. The log lines aren’t scrubbed by the script, so share those only with the VIN and coordinates removed by hand.

No dashboard appears after setup

Expected: nothing new turns up in the sidebar. BavarianData creates entities and devices, not a dashboard. The bundled card registers itself as a dashboard resource, which makes it available — you still place it yourself: open any dashboard, ✏️ Edit → ➕ Add card, pick BavarianData Card. See The dashboard card.

If BavarianData Card isn’t in the card picker at all, that is a fault — carry on to the next two sections.

The card doesn’t show up after an update

Hard-refresh the browser — the bundled card is cached aggressively.

“Custom element doesn’t exist: bavariandata-card” in the mobile app

Symptom: the card renders fine in a desktop browser, but the Home Assistant companion app (iOS or Android) shows a red Configuration error box reading Custom element doesn't exist: bavariandata-card.

The card is registered once, for the whole instance — so if a browser sees it, the integration side is fine and something on the phone is failing to load the card file. Don’t start clearing caches; two quick tests narrow it down first.

Test 1 — open the same dashboard in the phone’s own browser (Safari on iOS, Chrome on Android), not the app. Same rendering engine, different cache and different connection settings, so this splits the problem in half:

  • Works in the browser, broken in the app → it’s the app’s own frontend cache. Restarting Home Assistant or the phone does not clear it; you have to do it in the app:
    • iOS: Settings → Companion App → Debugging → Reset frontend cache, then force-quit the app (swipe it away) and reopen it.
    • Android: Settings → Companion app → Troubleshooting → Clear cache, then force-stop and reopen the app.
  • Broken in the browser too → carry on to test 2.

Test 2 — can the phone fetch the card file at all? In the phone’s browser, open your Home Assistant address with this path appended:

/bavariandata/bavariandata-card.js
  • A wall of JavaScript → the file is reachable, so the card is failing while it loads. The card loads more files from beside itself, one per group of views. If the browser console says BavarianData card: could not load its parts, one of them didn’t arrive: try /bavariandata/bavariandata-card-overview.js the same way. A 404 there is the reverse proxy problem below. Otherwise, please open an issue with your iOS/Android version and, if you can get at them, the browser console errors.
  • 404 / “not found” → your connection can’t reach the path. That’s a reverse proxy (Nginx, Traefik, Caddy, Cloudflare Tunnel …) forwarding only the well-known paths — /api/, /static/, /frontend_latest/ and friends. Custom cards live outside those: BavarianData’s at /bavariandata/, Marketplace cards at /local/community/ (/hacsfiles/ before 2026.11). It has to forward everything. Home Assistant Cloud (Nabu Casa) does, and is unaffected.

Worth knowing for both tests: the companion app only uses your internal URL when you’ve told it which Wi-Fi network is home (Settings → Companion App → Connection → Internal URL, with an SSID set). Without that it uses the external URL even on your home Wi-Fi — which is how a proxy problem hides until you look at it on the phone. Test whichever URL the app is actually using, and ideally both.

Cross-check if you have any other card from the Marketplace or HACS installed: if it is broken on the phone too, the cause is the connection or the app, not this integration.

Every card shows “Configuration error” after a reload

Symptom: the cards render correctly when you first open Home Assistant, then every one of them turns into a Configuration error box after pressing F5. A hard refresh doesn’t help; only a fresh browser session does.

Update the integration and restart Home Assistant. If it persists:

  1. Go to Settings → Dashboards → ⋮ → Resources and check that /bavariandata/bavariandata-card.js?v=… is listed, with the ?v= matching your installed version. It is created and kept up to date automatically.

  2. If the list is missing or greyed out, your dashboard resources are YAML-managed. Add the resource yourself in configuration.yaml:

    lovelace:
      mode: yaml
      resources:
        - url: /bavariandata/bavariandata-card.js
          type: module

    Since Home Assistant 2026.2 you can instead set resource_mode: storage on a YAML dashboard to let BavarianData manage the resource for you.

The cause was that the card used to be injected as a frontend module, which Home Assistant renders into the page as a fire-and-forget import(). The frontend’s service worker can serve that page from its cache without it, so the bavariandata-card element was never defined and every placed card fell back to the error box — see home-assistant/frontend#18728. Dashboard resources are delivered with the Lovelace config instead and are loaded before any dashboard renders.

The card shows names like no_vehicle_title instead of text

Symptom: the card draws, but every label is a technical name with underscores (no_vehicle_title, tires …) instead of words.

The card keeps its texts in files of their own, one per language (bavariandata-card-strings-en.js, bavariandata-card-strings-de.js …), which it loads from beside itself. Here the English one didn’t arrive. The browser console says so with the line BavarianData card: could not load its en strings. If only your own language’s file is missing, the card shows English instead of names.

  1. Hard-refresh the browser, or reset the app’s frontend cache (see the mobile-app section).
  2. Open your Home Assistant address with /bavariandata/bavariandata-card-strings-en.js appended. A 404 there is the same reverse proxy problem as in test 2 above: it has to forward everything under /bavariandata/.

A fetch fails with “HTTP 400” or another HTTP error

A fetch_* call or the daily refresh that BMW refuses logs a line like HTTP 400 (CU-105: No permission for specified containerId) for GET …. The CU- code is BMW’s. The ones worth knowing:

CodeMeaningWhat to do
CU-104No permission for this carThe car isn’t mapped to your account or isn’t telematics-capable. Check it is listed at BMW’s CarData portal.
CU-105 / CU-121The telemetry container is unknown or malformedConfigure → Connection → Reset telemetry container (Settings), then fetch again.
CU-403ForbiddenBMW refuses every request from your account, even the list of its cars, while the stream keeps working. Check the permissions in the diagnostics. Without CarData API, delete the client in the portal, create a new one with both subscriptions ticked, and give Home Assistant the new ID with Reconfigure (how). BMW also blocks the API by where the request comes from: it refuses requests from Ukraine and Russia (BMW support, November 2026), whatever country the account belongs to, and only an EU VPN gets around that. If CarData API is there and none of that applies, only BMW can say why: write to bmwcardata-b2c-support@bmwgroup.com with the log line and its time.
CU-400Bad requestBMW refuses one field of a container, and with it the whole fetch (it did so for the service items for a week in October 2026). If the daily fetch fails with CU-400, report it in an issue.
CU-429Too many requestsSee quota exhausted below.

The stream is not affected by any of these.

HTTP 502 (Bad Gateway) or 503 with no CU- code means BMW’s front server couldn’t reach the service behind it: an outage on BMW’s side, not a fault in your setup. If the CarData portal shows errors for your car at the same time, that confirms it. Each attempt still spends quota, so don’t keep fetching; the daily refresh tries again, and the stream usually keeps delivering in the meantime. (One such outage hit several countries from 23 to 26 Oct 2026.)

After such an outage, if the stream stays connected but sends nothing, not even after a lock or unlock in the app, look at the car’s stream setup page in the portal: the October 2026 outage deleted some cars’ Data Selection. Save it again, or run Configure → Choose streamed data, and the stream delivers within a minute.

If the code is something else, or there’s no code, open an issue with the line, after replacing the VIN in its path with ….

“BMW CarData API quota exhausted”

If you’ve spent all 50 REST requests of the day, a repair issue titled “BMW CarData API quota exhausted” appears under Settings → Repairs, telling you when it resets: at 00:00 UTC, when BMW starts a new day. Streaming keeps flowing throughout — only fetch_* calls pause.

Removing BavarianData completely

Deleting the integration under Settings → Devices & Services does the important part: it removes your tokens and deletes the recorded history — charging sessions, trips, any recorded routes — plus the long-term statistics it published. That is deliberate: your driving and charging record should not outlive the integration.

A few things are not removed automatically:

  • The API quota log, the cached vehicle image and, if you used the configurator picture, the bavariandata_renders folder in .storage.
  • bavariandata_trip_capture.ndjson in your config folder, if you ever enabled trip debugging. It contains GPS coordinates — delete it.
  • Devices and entities occasionally linger in the registries; delete leftovers under Settings → Devices & Services → Devices / Entities.

If you are testing a fresh install, one extra check matters: long-term statistics live in the recorder database, not the entity registry, so a partial removal (deleted folder, crash mid-removal) can leave bavariandata:… series behind that reappear in your Energy dashboard with nothing installed. Look under Developer tools → Statistics for orphaned ids and delete them.

The complete artifact list and a step-by-step checklist: clean-install.md.

Upgrading from an older cardata / bmw_cardata install? There is no cross-domain migration — the domain rename is a breaking change. Remove the old integration using the checklist above, then set BavarianData up fresh.

Where to get help

  • Bugs in the integration → Issues. Attach a diagnostics download — it is redacted, costs no quota, and usually answers the first three questions we’d ask.
  • BMW-side registration trouble, setup help, or general questions → Discussions.
  • Nothing here matched? Say so anyway — in Discussions. A problem this page failed to answer is worth knowing about even when you worked around it, and it is how this page gets better for the next car.

Updated Edit this page on GitHub