Skip to content

Alheimsins/bmw-is-connected-to-charger

Repository files navigation

js-standard-style

bmw-is-connected-to-charger

Answers the question: is my BMW connected to a charger?

Usage

import isConnectedToCharger from '@alheimsins/bmw-is-connected-to-charger'

const username = '<connected-drive-username>'
const password = '<connected-drive-password>'

const data = await isConnectedToCharger({ username, password })

console.log(data)

This will return

{
  isConnected: false,
  batteryLevel: 54,
  location: {
    coordinates: {
      latitude: <your-latitude>,
      longitude: <your-longitude>
    },
    address: {
      formatted: <your-formatted-address>
    },
    heading: 295
  }
}

Limitations

  • If you have multiple cars added to your Connected Drive account, this script will only return the location of the first car.
  • To get the location of your car, you need to have your share location permission activated.

Disclaimer

This module is not affiliated with or endorsed by BMW Group. It might break any time.

Related

Inspiration

License

MIT

About

Created with ❤ for Alheimsins