bmwcd / bmwcd.js

Lightweight Node module for interfacing with BMW ConnectedDrive API. Allows painless Remote Service and Vehicle Status requests.

Home Page:https://bmwcd.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bmwcd.js

npm install bmwcd.js bmwcd.js !Dependency status MIT license

yarn (recommended)

$ yarn add bmwcd.js

npm install

$ npm install bmwcd.js

Basic Usage

ES6 + dotenv

import ConnectedDrive from 'bmwcd.js'
import dotenv from 'dotenv/config'

(async () => {
  const bmwcd = await new ConnectedDrive(process.env.BMW_USERNAME, process.env.BMW_PASSWORD)
  const vehicle = await bmwcd.getVehicle(process.env.BMW_VIN)
  console.log(await vehicle.status())
})()

CommonJS

const { ConnectedDrive } = require('bmwcd.js')

const main = async () => {
  // ConnectedDrive account authentication
  const bmwcd = new ConnectedDrive(username, password)

  // Select vehicle by VIN and output status object
  const vehicle = await bmwcd.findVehicle('WBAXXXXXXX1234567')
  console.log(await vehicle.status())
}
main()

Acknowledgements

Inspired by connected_drive.js and bimmerconnected (python).

RememberJimmy.com

About

Lightweight Node module for interfacing with BMW ConnectedDrive API. Allows painless Remote Service and Vehicle Status requests.

https://bmwcd.github.io

License:MIT License


Languages

Language:JavaScript 100.0%