Skip to main content

bimmer_connected

https://badge.fury.io/py/bimmer-connected.svg https://github.com/bimmerconnected/bimmer_connected/actions/workflows/test.yml/badge.svg?branch=master https://readthedocs.org/projects/bimmer-connected/badge/?version=latest https://codecov.io/gh/bimmerconnected/bimmer_connected/branch/master/graph/badge.svg?token=qNT50j82f6 https://static.pepy.tech/badge/bimmer_connected/week https://static.pepy.tech/badge/bimmer_connected/month https://static.pepy.tech/badge/bimmer_connected

Library not working anymore due to changes at BMW side

On September 29, 2025, BMW has blocked third parties (i.e. this library used for the Home Assistant BMW Connected Drive integration) from executing requests against BMW servers. BMW enforced additional security checks within the MyBMW app to block third parties (not only this library, but also other companies such as energy providers).

BMW has released BMW Cardata for EU users, see these custom integrations which can be used with Home Assistant or via MQTT with other domotica systems.

Library

This is a simple library to query and control the status of your BMW, Mini, or Toyota Supra vehicle from the MyBMW portal.

Installation

bimmer_connected is tested against Python 3.8 or above. Just install the latest release from PyPI using pip3 install --upgrade bimmer_connected.

Alternatively, clone the project and execute pip install -e . to install the current master branch.

Usage

While this library is mainly written to be included in Home Assistant, it can be use on its own.

After installation, execute bimmerconnected from command line for usage instruction or see the full CLI documentation.

Please be aware that bimmer_connected is an async library when using it in Python code. The description of the modules can be found in the module documentation.

Example in an asyncio event loop

import asyncio
from bimmer_connected.account import MyBMWAccount
from bimmer_connected.api.regions import Regions

async def main():
    # hcaptcha_token is only required for the first login, see the captcha documentation
    account = MyBMWAccount(USERNAME, PASSWORD, Regions.REST_OF_WORLD, hcaptcha_token="P1_eY...")
    await account.get_vehicles()
    vehicle = account.get_vehicle(VIN)
    print(vehicle.brand, vehicle.name, vehicle.vin)

    result = await vehicle.remote_services.trigger_remote_light_flash()
    print(result.state)

asyncio.run(main())

Example in non-async code

import asyncio
from bimmer_connected.account import MyBMWAccount
from bimmer_connected.api.regions import Regions

# hcaptcha_token is only required for the first login, see the captcha documentation
account = MyBMWAccount(USERNAME, PASSWORD, Regions.REST_OF_WORLD, hcaptcha_token="P1_eY...")
asyncio.run(account.get_vehicles())
vehicle = account.get_vehicle(VIN)
print(vehicle.brand, vehicle.name, vehicle.vin)

result = asyncio.run(vehicle.remote_services.trigger_remote_light_flash())
print(result.state)

Compatibility

This works with BMW/Mini/Toyota Supra vehicles with a MyBMW account. So far it is tested on vehicles with a ‘MGU’, ‘NBTEvo’, ‘EntryEvo’, ‘NBT’, or ‘EntryNav’ navigation system. If you have any trouble with other navigation systems, please create an issue with your server responses (see next section).

To use this library, your BMW/Mini/Toyota Supra must have the remote services enabled for your vehicle. You might need to book this in the MyBMW/Mini Connected/Supra Connect portal and this might cost some money. In addition to that you need to enable the Remote Services in your infotainment system in the vehicle.

Different models of vehicles and infotainment systems result in different types of attributes provided by the server. So the experience with the library will certainly vary across the different vehicle models.

Data Contributions

If some features do not work for your vehicle, we would need the data returned form the server to analyse this and potentially extend the code. Different models and head unit generations lead to different responses from the server.

If you want to contribute your data, perform the following steps:

# get the latest version of the library
pip3 install --upgrade bimmer_connected

# run the fingerprint function
bimmerconnected fingerprint <username> <password> <region>

This will create a set of log files in the “vehicle_fingerprint” folder. Before sending the data to anyone please check for any personal data such as dealer name or country.

The following attributes are by default replaced with anonymized values:

  • vin (Vehicle Identification Number)

  • lat and lon (GPS position)

  • licensePlate

  • information of dealer

Create a new fingerprint data contribution and add the files as attachment to the discussion.

Please add your model and year to the title of the issue, to make it easier to organize. If you know the “chassis code” of your car, you can include that too. (For example, googling “2017 BMW X5” will show a Wikipedia article entitled “BMW X5 (F15)”. F15 is therefore the chassis code of the car.)

Note: We will then use this data as additional test cases. So we will publish (parts of) it (after checking for personal information again) and use this as test cases for our library. If you do not want this, please let us know in advance.

Code Contributions

Contributions are welcome! Please make sure that your code passes the checks in .github/workflows/test.yml. We currently test with ruff, mypy (for both see, pyproject.toml) and our own pytest suite. And please add tests where it makes sense. The more the better.

See the contributing guidelines for more details.

Thank you

Thank you to all contributors for your research and contributions! And thanks to everyone who shares the fingerprint data of their vehicles which we use to test the code. A special thanks to @HuChundong, @muxiachuixue, @vividmuse for figuring out how to solve login issues!

This library is basically a best-of of other similar solutions, yet none of them provided a ready to use library with a matching interface to be used in Home Assistant and is available on pypi.

Thank you for your great software!

License

The bimmer_connected library is licensed under the Apache License 2.0.

Disclaimer

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

Release files for bimmer-connected 0.17.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bimmer-connected 0.17.4
File Size Uploaded
bimmer_connected-0.17.4.tar.gz 7.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for bimmer-connected 0.17.4
File Interpreter ABI Platform
bimmer_connected-0.17.4-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 MB

Release files / bimmer_connected-0.17.4.tar.gz

Download URL bimmer_connected-0.17.4.tar.gz
Size 7.2 MB
Tags Source
SHA-256 checksum
How to use checksums
08be26b45828504a07b0523ea5c64fa182337db498422175fe657c39daf4b486
BLAKE2b-256 checksum
How to use checksums
a8545f048b0e432127908b43f8fa8397ccd68359acb347ca7b769f4da05ed847
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / bimmer_connected-0.17.4-py3-none-any.whl

Download URL bimmer_connected-0.17.4-py3-none-any.whl
Size 166.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67f509a019b77e777368591bece8051303b0b5a00836572cee43ff93f17bfac2
BLAKE2b-256 checksum
How to use checksums
6d6963a8bd4129d8ac96eaf36092d2aefda6db61a59f7a4f64df53f823d88e9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.17.4 This release

2 release files

0.17.1

2 release files

0.17.0

2 release files

0.16.2

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.15.3

2 release files

0.15.2

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.5

2 release files

0.14.4

2 release files

0.14.3

2 release files

0.14.2

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.7

2 release files

0.13.6

2 release files

0.13.5

2 release files

0.13.4

2 release files

0.13.2

2 release files

0.13.0

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.12

2 release files

0.8.11

2 release files

0.8.10

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.22

2 release files

0.7.21

2 release files

0.7.20

2 release files

0.7.19

2 release files

0.7.16

2 release files

0.7.15

2 release files

0.7.14

2 release files

0.7.13

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

2 release files

0.5.3

2 release files

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page