Skip to content

Read mileage of your BMW on the the Connected Drive website and publish it to a MQTT server

License

Notifications You must be signed in to change notification settings

johsem/bmw2mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bmw2mqtt

Scrape mileage of your BMW from the the Connected Drive website and publish it to your MQTT server.

Dependencies

  • Ruby
  • Firefox running
  • Mozilla Geckodriver installed: brew install geckodriver

Usage

  • clone repo
  • Install ruby dependencies: bundle intstall
  • Add your Credentials for BMW Connected Drive and MQTT: cp .env.default .env and fill your credentials in .env file
  • run script: bundle exec dotenv ruby bmw2mqtt.rb

Credentials needed

Fill .env file with your CD credentials and MQTT URL + topic

BMW_CD_USER=email@example.com
BMW_CD_PASSWORD=xyz
BMW_VIN=XX012345
MQTT_URI=mqtt://user:pass@mqttserver.com
MQTT_TOPIC=mybmw

Next steps

  • add support for Chrome
  • add other values from CD portal (fuel,...)
  • remove sleep

About

Read mileage of your BMW on the the Connected Drive website and publish it to a MQTT server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages