Skip to content

Which AWTRIX do you have? Choose it once and the Hub shows what runs on it.

ScriptAWTRIX NG

BMW CarData

On an AWTRIX display
BMW CarData shown on an AWTRIX display
BMW CarData · by catalinserban

On your display

Battery, range, charging and lock status of your BMW or MINI, straight from BMW CarData.

Which AWTRIX do you have? See below where it runs, or choose your device.
Topic
Smarthome
Includes
Script

Runs on

  • Does not run on 32×8 (TC001 & DIY) Made for 52×16 (TC002).
  • Runs on 52×16 (TC002)
  • Does not run on 32×8 with AWTRIX 3 (TC001 & DIY) Made for AWTRIX NG.

Choose your display in the next step.

Send to AWTRIX

Choose your AWTRIX

BMW CarDataAWTRIX NG script

Install this script on your AWTRIX NG. Its icons and sounds are installed with it.

Your AWTRIX’s local address, for example 192.168.178.39 or awtrix.local.

The name shown in your AWTRIX script list. Use letters, digits, hyphens or underscores.

Connection & device login

Connect your phone or computer to the same network as your AWTRIX. Allow local network access if your browser asks.

Use the device’s IP address, without a page path such as /#/apps.

If your AWTRIX requires a login, the username and password fields will appear when you connect.

Sign in to the Hub to install scripts. Attached files are installed separately.

Script description

What's inside

  • Two screens that take turns: one for the battery, one for the car.
  • Charge level, electric range, charging time left, charge target, fuel, total range, lock state and odometer.
  • Hand-drawn, animated icons: a battery that fills while charging and a car whose lights turn red while it is unlocked.
  • Every row is yours to choose in the app settings.
  • No Home Assistant, no MQTT, no second computer. The clock signs in to BMW and asks BMW CarData directly.

The screens

Screen Icon Top row Lower row Bottom line
Battery a battery, filled to the charge level charge in %, electric range on the right charging time, "Plugged in" or the lock state the charge as a bar
Car a car seen from the front total range fuel, lock state and odometer, one after the other the fuel level as a bar

The app stays on screen long enough to show both, 8 seconds each by default. A petrol or diesel car has no battery to report, so it gets the car screen only.

While charging

  • The battery icon fills up in a loop and pulses.
  • The lower row shows the time left, for example "1h20 left".
  • A glint runs along the charge bar.
  • The charge target, for example "To 80%", takes a turn in rows set to cycle.

Each of these can be switched off in the settings.

What you need

  • An Ulanzi TC002 with AWTRIX NG (tested on [your version])
  • A BMW or MINI with ConnectedDrive, and the MyBMW account that is the car's primary user
  • A country where BMW offers CarData. If the section in step 1 below is missing, BMW does not offer it for your account.
  • A free CarData client, which takes about five minutes:
    1. Open the MyBMW website on a computer, sign in, pick your car and open BMW CarData.
    2. Under Technical access to BMW CarData, create a CarData client.
    3. Switch on Request access to CarData API and CarData Stream. Wait a moment between the two.
    4. Copy the Client ID.

How to use it

Install the script, then open Apps, press the gear on its row and paste the Client ID. The clock now scrolls a BMW web address and an 8-character code. Open the address on your phone or computer, sign in to BMW and type the code. You have about five minutes. The same line with the code also appears in the clock's log, which is easier to copy from.

A few seconds after you approve, the clock finds your car and shows the first data.

If the panel shows a message instead:

Message What to do
enter the CarData Client ID in the app settings Paste the Client ID and save.
sign-in: open ... code ... Open the address, sign in to BMW and type the code.
sign-in timed out Press the clock's button for a new code.
sign-in error with a number Check the Client ID and that both switches are on in the BMW portal, then press the button.
signed out BMW ended the sign-in. Press the button and sign in again.
daily limit reached or no access BMW allows 50 requests a day. The clock tries again in an hour.
the car has sent no data yet Lock or unlock the car, or drive it, so it reports to BMW.
no car on this account The account has no car, or you are not its primary user.
no connection The clock has no internet, or BMW is not answering.

Settings

Account

  • CarData Client ID: the ID from the BMW portal.
  • VIN: leave empty for the first car on the account, or type a VIN to pick one.
  • Check every: how often the clock asks BMW, 30 to 240 minutes.

Screens

  • Screens: both, battery only or car only.
  • Seconds per screen: 3 to 60.
  • Seconds per item when a row takes turns: 2 to 30.
  • Bar along the bottom: on or off.

Battery

  • Upper right: electric range, charge target or nothing.
  • Lower row: status, target, range, fuel, lock, odo, cycle or none.

Car

  • Upper row and Lower row: the same choices.
  • Red lights while unlocked: on or off.
  • Own icon for the car screen: the name of an icon installed on your clock, shown in place of the drawn car.

Charging

  • Battery fills and pulses, glint on the bar, "Plugged in" when connected but idle, charge target takes a turn: each on or off.

"status" shows the charging time or "Plugged in", and the lock state the rest of the time. "cycle" shows everything the car reports, one after the other. "odo" is the odometer.

Good to know

  • CarData is read-only. This script cannot lock, unlock or start anything.
  • The script does not ask for the car's location.
  • BMW allows 50 requests a day per account. At one check every 30 minutes the clock uses 48, so what you see can be up to half an hour old.
  • A field your car does not report is skipped, and its row shows less.
  • The sign-in is stored on the clock without encryption, like every app setting. Anyone who can open the clock's web page can read it.
  • To take the clock's access away, delete the CarData client in the BMW portal.
  • Tested on a BMW X1 xDrive30e plug-in hybrid. Written to handle full electric, petrol and diesel cars as well, which I could not test.
  • An independent project, not affiliated with or endorsed by BMW.

More scripts in Smarthome

Something wrong with this script? Report it.