p0fi / bmw-leaselense-for-scriptable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BMW Lease Lense

cover

Note: This script requires at least Scriptable version 1.6!

What's this?

Driving a BMW on a lease? Having trouble to keep an eye on your mileage? Don't want to be shocked by the cost at the end of your lease? Than this is for you! This widget uses the BMW Connected Drive API to give you the widget the MyBWM app is missing! It calculates the daily mileage limit based on the terms of your lease and interpolates it linearly over time. Your current mileage is compared against this to tell you if you are on track or if you should slow down on your driving.

Features

Estimated Cost

If you are exceeding your mileage limit for the day, the widget estimates the cost at the end of the lease based on the information you configured for your contract.

Matching Car Image

The car on the widget is the exact picture of your configured VIN πŸš€

Dark Mode Support

Supports different color configurations for light β˜€οΈ and dark πŸ•ΆοΈ mode

Instructions

  1. Download and extract the content of this repository into the Scriptable folder located in your iCloud Drive.

Your Scriptable folder structure should look like this:

iCloud Drive/
β”œβ”€ Scriptable/
β”‚  β”œβ”€ bmw-leaselense.js
β”‚  β”œβ”€ bmw-leaselense/
β”‚  β”‚  β”œβ”€ assets/
β”‚  β”‚  β”‚  β”œβ”€ fuel.png
β”‚  β”‚  β”‚  β”œβ”€ mileage.png
β”‚  β”‚  β”œβ”€ api.js
β”‚  β”‚  β”œβ”€ utils.js
β”‚  β”‚  β”œβ”€ config.js
  1. Add your BMW Connected Drive credentials and the rest of the required information to config.js.
  2. If you like, configure your color settings in the colorConfig() function to match the widget to your homescreen 🎨
  3. Launch Scriptable and make sure that bmw-leaselense is listed in the scripts view.
  4. Once everything is configured, run the script and verify that everything is working correctly.
  5. Go back to your home screen and add a medium Scriptable widget.
  6. Edit the Scriptable widget and choose bmw-leaselense as the script.

Known Issues

  • Right now the widget only supports the medium widget size. A Large and small sized version may follow in the future.

About this project

The script is authored by @thartwi (me) in order to keep track on how much I'm driving and what costs I have to face at the end of the lease. Because seriously, who likes this kind of surprise?

Thanks πŸ™

Thanks to Bimmer Connected for providing inspiraton and help with understanding the BMW API!
Thanks to @simonbs for making an awesome app!

Disclaimer

This widget is not affiliated with or endorsed by BMW Group.

About


Languages

Language:JavaScript 100.0%