@mihaiblaga89/bmw-connecteddrive-api
v0.5.4
Published
BMW ConnectedDrive API JS implementation
Downloads
42
Maintainers
Readme
bmw-connecteddrive-api
JavaScript implementation of the BMW's ConnectedDrive API
Example: BMWStatus
Usage
import API from '@mihaiblaga89/bmw-connecteddrive-api';
await API.init({
region: 'eu',
username: '[email protected]',
password: 'mySuperPassword',
});
const vehicles = await API.getVehicles();
const vehicleStatus = await vehicles[0].getStatus();
API Methods
API.init(options)
Initializes the API with your credentials. By default it also fetches your vehicles and saves them but you can disable this behaviour if you want. More info
API.getVehicles(force)
Returns your prefetched vehicles or queries the BMW API for them. Has the option to force the query to refresh your vehicles. Every vehicle is an instance of Vehicle. More info
Vehicle Methods
Vehicle.getImage(width, height, view)
Fetches and caches your vehicle image from BMW API. Of course it's not the actual photo, it's just a car photo based on your car's model and color :). Several "views" are available. More info
Vehicle.getStatus(force)
Fetches and caches the car's status from the API. Can be forced. Returns an instance of VehicleStatus. More info
Acknowledgments
This work was inspired by the following repos:
- https://github.com/bimmerconnected/bimmer_connected
- https://github.com/edent/BMW-i-Remote
- https://shkspr.mobi/blog/2015/11/reverse-engineering-the-bmw-i3-api/
Thank you for your efforts and hard work.
License
Disclaimer
This library is not affiliated nor endorsed by BMW Group / Bayerische Motoren Werke AG.