Scrape mileage of your BMW from the the Connected Drive website and publish it to your MQTT server.
- Ruby
- Firefox running
- Mozilla Geckodriver installed:
brew install geckodriver
- 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
Fill .env
file with your CD credentials and MQTT URL + topic
[email protected]
BMW_CD_PASSWORD=xyz
BMW_VIN=XX012345
MQTT_URI=mqtt://user:[email protected]
MQTT_TOPIC=mybmw
- add support for Chrome
- add other values from CD portal (fuel,...)
- remove
sleep