/bmw

BMW ConnectedDrive JavaScript API

BMW ConnectedDrive JavaScript API

Since we got the new car I always wanted to have more control over my car than the Connected app is giving me.

For example I would like to:

  • check the charging status directly from my laptop, without opening the ConnectedDrive website
  • set up alerts when the car is charged.
  • maybe ask Google Assistant what the charging status is / when it’s gonna be finished

But you can’t do that…yet. So I started digging around for a way to access their API. With the help of a few people (Link, Link, Link) I was able to get a grasp on how it works and how to access it.

Therefore, I’ve published my own JavaScript implementation of the BMW ConnectedDrive API (NPM, GitHub, API Documentation)

Usage

import API from '@mihaiblaga89/bmw-connecteddrive-api';
 
await API.init({
    region: 'eu',
    username: 'user@example.com',
    password: 'mySuperPassword',
});
 
const vehicles = await API.getVehicles();
 
const vehicleStatus = await vehicles[0].getStatus();

For more details about the package, visit the above mentioned API Documentation.

It’s still work in progress but I’m adding features as I go since I’ve also started working on a desktop Electron app that implements this package and will allow me to do the notifications part. More on this later, in another post.

This work is not affiliated nor endorsed by BMW Group / Bayerische Motoren Werke AG.

Tags: bmwpersonalbmw f30

Mihai Blaga

Mihai Blaga