@alheimsins/bmw-is-connected-to-charger

1.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @alheimsins/bmw-is-connected-to-charger

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

7.77 kB

Total Files

9

Last publish

Collaborators

  • zrrrzzt
  • maccyber