BMW ConnectedDrive component

Im getting some more informations about my car in the response of the api call https://b2vapi.bmwgroup.com/api/vehicle/dynamic/v1/WBXYZ11110000

{
    "attributesMap": {
		
		...,
		
        "beEnergyLevelHv": "31.719",
        "remaining_charging_time_minutes": "0",
        "battery_size_max": "36.7"
    },
    "vehicleMessages": {
        "ccmMessages": [],
        "cbsMessages": []
    }
}

I can’t find some of the entities in the official component. Are the attributes created dynamically? So are they different with another vin? I want to use beEnergyLevelHv and remaining_charging_time_minutes in my Lovelace.

For some (probably newer) vehicles it does. :stuck_out_tongue_winking_eye:

hello thanks for the answer I saw a thread to use openstreetmap, but every time I restart the system tells me places not found you can help me with your example

You have to integrate “places” in your HASS first, like I meantioned above (don’t forget to restart Home Assistant :slight_smile:)

Put the following lines and edit them for your needs into your configuration.yaml:

# bmw places configuration
sensor places:
  - platform: places
	name: "BMW places location"
	devicetracker_id: device_tracker.< BMW > # your connected drive device tracker entity
	api_key: < YOUR_EMAIL > # OpenStreetMap API key (your email address)

# template to get current city from places
template:
  - sensor:
      - name: "BMW city"
        value_template: "{{ state_attr('sensor.bmw_places_location', 'city') }}"

You can create your own template to get full address and a lot more attributes from “places”. Everything described on their github site.

Thank you perfect now function…

I had the BMW connected integration installed and was getting errors in the logs. I removed it and added the beta repository via HACS. Do I add it again in Integrations in HA? Sorry for the newbie question
I tried adding again in HA Integrations and now I only have the lock option and no find or any other option.

Did you install BMW Connected Drive via Integration after adding the integration via HACS?

Yes that’s what I tried. With the beta added I only get the lock option. I removed the beta and I have all options back

I found BMW ConnectedDrive component by accident. This is great. Easy to setup and works very well.

One thing I’m missing: A sensor to see the sunroof is open and the hood. I can see it in the MyBMW app.
I see references to it in the code in Github but not good enough in python to understand it completely.

Is there a sensor for it and is a problem with my setup or is the sunroof and hoop check not yet implemented?

The status of the sunroof and hood are visible via attributes of the lids and windows. You can make a template sensor if you want the status directy visible as a binary sensor.

1 Like

@gerard33 thank you very much. I saw what you mean. In the details of windows you can see status of each individual window and the sun roof. If one is open than the status is open.

I would like to have a sensor for the roof separately. I will look into template sensor. No experience with it.

Thanks!!

Hello, is it somehow possible to change the charging current of an Hybrid BMW through Home Assistant ? (Low, Reduced, High)

1 Like

Since about two days there are no attributes for binary sensors condition_based_services or check_control_messages any more. I only get the state ‘unknown’ or ‘off’ now…

2022-03-31 07_14_02-Window
2022-03-31 07_12_56-Window

Same problem here, plus the location update is not working (device tracker is updating, but location is not changing). In addition, while trying to press the buttons (e.g. flash lights or refresh from cloud) I get the following error:

“Blocking calls must be done in the executor or a separate thread; Use ‘await hass.async_add_executor_job()’ at custom_components/bmw_connected_drive/button.py, line 63”

Anyone else with this problem or a solution?

Hello everyone I also have the same problem it all started with the update via HACS of the BMW Connected Drive sensor:

  • location update does not work, the device tracker does not update and the location does not change

  • there are no more attributes for binary sensors condition_based_services orcheck_control_messages

  • the condition_based_services or check_control_messages binary sensors no longer work
    when I try to press the buttons (e.g. flash lights or cloud refresh) I get the following error:

“Call blocking must be done in the executor or in a separate thread; Use ‘await hass.async_add_executor_job ()’ in custom_components / bmw_connected_drive / button.py, line 63 "

Fixed in latest version.

Hi Martin

Did you ever find a software solution?

/Niels

I’m in a similar situation. What I ended up doing is buying a “normally closed” relay that is controlled by a regular smart plug, when the smart plug turns on the power to my BMW charger gets turned off. HA will allow me to fully customize when I want to disconnect power to the BMW charger so I can be sure to never charge when rates are higher. I can try to dig through my receipts and things to show exactly what I bought and how it’s wired if anyone would like.

1 Like

Anyone having issues today with error 500 and the component not loading?

2022-05-18 09:17:59 ERROR (SyncWorker_5) [bimmer_connected.account] MyBMW API error '500 Server Error: Internal Server Error for url: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles?apptimezone=60.0&appDateTime=1652861849723&tireGuardMode=ENABLED': { "statusCode": 500, "message": "Internal server error", "activityId": "39ed743d-0bf4-442b-98f4-...." }
2 Likes

Yup, similar here …

Logger: bimmer_connected.account
Source: /usr/local/lib/python3.9/site-packages/bimmer_connected/account.py:312
First occurred: 06:25:47 (17 occurrences)
Last logged: 09:20:24

MyBMW API error '500 Server Error: Internal Server Error for url: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles?apptimezone=60.0&appDateTime=1652859621295&tireGuardMode=ENABLED': { "statusCode": 500, "message": "Internal server error", "activityId": "513e92ec-cef5-47e4-a67d-dd73c64d717e" }
MyBMW API error '500 Server Error: Internal Server Error for url: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles?apptimezone=60.0&appDateTime=1652859814029&tireGuardMode=ENABLED': { "statusCode": 500, "message": "Internal server error", "activityId": "cb0b41ec-3266-4b6d-8de9-cceeffb5b37a" }
MyBMW API error '500 Server Error: Internal Server Error for url: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles?apptimezone=60.0&appDateTime=1652859880039&tireGuardMode=ENABLED': { "statusCode": 500, "message": "Internal server error", "activityId": "76bd9359-230d-4f26-91de-bf19e403680a" }
MyBMW API error '500 Server Error: Internal Server Error for url: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles?apptimezone=60.0&appDateTime=1652860071389&tireGuardMode=ENABLED': { "statusCode": 500, "message": "Internal server error", "activityId": "3ee07927-2359-482d-8d5c-a828a0b52071" }
MyBMW API error '500 Server Error: Internal Server Error for url: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles?apptimezone=60.0&appDateTime=1652861994214&tireGuardMode=ENABLED': { "statusCode": 500, "message": "Internal server error", "activityId": "8ba11244-e674-4d31-b35e-f50d206adb49" }
2 Likes