bimmerconnected
CLI
The bimmerconnected
CLI is a command line interface to interact with the BMW ConnectedDrive API.
A full documentation of the commands can be found below.
Warning
The CLI will store your tokens in a file called bimmer_connected.json
in your home directory (--oauth-store
parameter).
You can move this file, but is is required to function properly (have multiple calls).
The data is stored in plain text, so protect this file accordingly.
Note
The first login (or after a long time) requires a captcha to be solved (see Using Captchas). Follow-up logins using refresh token do not require a captcha (as data is persisted as per above).
These follow-up logins also do not require the --captcha-token
parameter.
bimmerconnected
Connect to MyBMW/MINI API and interact with your vehicle.
Version: 0.17.2.dev7
usage: bimmerconnected [-h] [--debug] [--oauth-store [FILE]]
[--disable-oauth-store]
{status,fingerprint,lightflash,horn,vehiclefinder,chargingsettings,chargingprofile,charge,image,sendpoi,sendpoi_from_address}
...
Named Arguments
- --debug
Print debug logs.
Default:
False
- --oauth-store
Path to the OAuth2 storage file. Defaults to $HOME/.bimmer_connected.json.
Default:
/home/docs/.bimmer_connected.json
- --disable-oauth-store
Disable storing the OAuth2 tokens.
Default:
False
subcommands
Command
- cmd
Possible choices: status, fingerprint, lightflash, horn, vehiclefinder, chargingsettings, chargingprofile, charge, image, sendpoi, sendpoi_from_address
Sub-commands
status
Get the current status of the vehicle.
bimmerconnected status [-h] [-j] [-v [VIN]] [--captcha-token [CAPTCHA_TOKEN]]
username password {north_america,china,rest_of_world}
[lat] [lng]
Positional Arguments
- username
Connected Drive username
- password
Connected Drive password
- region
Possible choices: north_america, china, rest_of_world
Region of the Connected Drive account
- lat
(optional) Your current GPS latitude (as float)
- lng
(optional) Your current GPS longitude (as float)
Named Arguments
- -j, --json
Output as JSON only. Removes all other output.
Default:
False
- -v, --vin
Output data for specified VIN only.
- --captcha-token
Captcha token required for North America and Rest of World.
fingerprint
Save a vehicle fingerprint.
bimmerconnected fingerprint [-h] [--captcha-token [CAPTCHA_TOKEN]]
username password
{north_america,china,rest_of_world} [lat] [lng]
Positional Arguments
- username
Connected Drive username
- password
Connected Drive password
- region
Possible choices: north_america, china, rest_of_world
Region of the Connected Drive account
- lat
(optional) Your current GPS latitude (as float)
- lng
(optional) Your current GPS longitude (as float)
Named Arguments
- --captcha-token
Captcha token required for North America and Rest of World.
lightflash
Flash the vehicle lights.
bimmerconnected lightflash [-h] [--captcha-token [CAPTCHA_TOKEN]]
username password
{north_america,china,rest_of_world} vin
Positional Arguments
- username
Connected Drive username
- password
Connected Drive password
- region
Possible choices: north_america, china, rest_of_world
Region of the Connected Drive account
- vin
Vehicle Identification Number
Named Arguments
- --captcha-token
Captcha token required for North America and Rest of World.
horn
Trigger the vehicle horn
bimmerconnected horn [-h] [--captcha-token [CAPTCHA_TOKEN]]
username password {north_america,china,rest_of_world} vin
Positional Arguments
- username
Connected Drive username
- password
Connected Drive password
- region
Possible choices: north_america, china, rest_of_world
Region of the Connected Drive account
- vin
Vehicle Identification Number
Named Arguments
- --captcha-token
Captcha token required for North America and Rest of World.
vehiclefinder
Update the vehicle GPS location.
bimmerconnected vehiclefinder [-h] [--captcha-token [CAPTCHA_TOKEN]]
username password
{north_america,china,rest_of_world} vin [lat]
[lng]
Positional Arguments
- username
Connected Drive username
- password
Connected Drive password
- region
Possible choices: north_america, china, rest_of_world
Region of the Connected Drive account
- vin
Vehicle Identification Number
- lat
(optional) Your current GPS latitude (as float)
- lng
(optional) Your current GPS longitude (as float)
Named Arguments
- --captcha-token
Captcha token required for North America and Rest of World.
chargingsettings
Set vehicle charging settings.
bimmerconnected chargingsettings [-h] [--captcha-token [CAPTCHA_TOKEN]]
[--target-soc [TARGET_SOC]]
[--ac-limit [AC_LIMIT]]
username password
{north_america,china,rest_of_world} vin
Positional Arguments
- username
Connected Drive username
- password
Connected Drive password
- region
Possible choices: north_america, china, rest_of_world
Region of the Connected Drive account
- vin
Vehicle Identification Number
Named Arguments
- --captcha-token
Captcha token required for North America and Rest of World.
- --target-soc
Desired charging target SoC
- --ac-limit
Maximum AC limit
chargingprofile
Set vehicle charging profile.
bimmerconnected chargingprofile [-h] [--captcha-token [CAPTCHA_TOKEN]]
[--charging-mode [{IMMEDIATE_CHARGING,DELAYED_CHARGING,NO_ACTION}]]
[--precondition-climate [PRECONDITION_CLIMATE]]
username password
{north_america,china,rest_of_world} vin
Positional Arguments
- username
Connected Drive username
- password
Connected Drive password
- region
Possible choices: north_america, china, rest_of_world
Region of the Connected Drive account
- vin
Vehicle Identification Number
Named Arguments
- --captcha-token
Captcha token required for North America and Rest of World.
- --charging-mode
Possible choices: IMMEDIATE_CHARGING, DELAYED_CHARGING, NO_ACTION
Desired charging mode
- --precondition-climate
Precondition climate on charging windows
charge
Start/stop charging on enabled vehicles.
bimmerconnected charge [-h] [--captcha-token [CAPTCHA_TOKEN]]
username password {north_america,china,rest_of_world}
vin {start,stop}
Positional Arguments
- username
Connected Drive username
- password
Connected Drive password
- region
Possible choices: north_america, china, rest_of_world
Region of the Connected Drive account
- vin
Vehicle Identification Number
- action
Possible choices: start, stop
Named Arguments
- --captcha-token
Captcha token required for North America and Rest of World.
image
Download a vehicle image.
bimmerconnected image [-h] [--captcha-token [CAPTCHA_TOKEN]]
username password {north_america,china,rest_of_world}
vin
Positional Arguments
- username
Connected Drive username
- password
Connected Drive password
- region
Possible choices: north_america, china, rest_of_world
Region of the Connected Drive account
- vin
Vehicle Identification Number
Named Arguments
- --captcha-token
Captcha token required for North America and Rest of World.
sendpoi
Send a point of interest to the vehicle.
bimmerconnected sendpoi [-h] [--captcha-token [CAPTCHA_TOKEN]] [--name [NAME]]
[--street [STREET]] [--city [CITY]]
[--postalcode [POSTALCODE]] [--country [COUNTRY]]
username password {north_america,china,rest_of_world}
vin latitude longitude
Positional Arguments
- username
Connected Drive username
- password
Connected Drive password
- region
Possible choices: north_america, china, rest_of_world
Region of the Connected Drive account
- vin
Vehicle Identification Number
- latitude
Latitude of the POI
- longitude
Longitude of the POI
Named Arguments
- --captcha-token
Captcha token required for North America and Rest of World.
- --name
Name of the POI
Default:
'Sent with ♥ by bimmer_connected'
- --street
(optional, display only) Street & House No. of the POI
- --city
(optional, display only) City of the POI
- --postalcode
(optional, display only) Postal code of the POI
- --country
(optional, display only) Country of the POI
sendpoi_from_address
Send a point of interest parsed from a street address to the vehicle.
bimmerconnected sendpoi_from_address [-h] [--captcha-token [CAPTCHA_TOKEN]]
[-n [NAME]] [-a ADDRESS [ADDRESS ...]]
username password
{north_america,china,rest_of_world} vin
Positional Arguments
- username
Connected Drive username
- password
Connected Drive password
- region
Possible choices: north_america, china, rest_of_world
Region of the Connected Drive account
- vin
Vehicle Identification Number
Named Arguments
- --captcha-token
Captcha token required for North America and Rest of World.
- -n, --name
(optional, display only) Name of the POI
- -a, --address
Address (e.g. ‘Street 17, city, zip, country’)