BMW ConnectedDrive component

@gerard33 will you be bringing the message sending functionality over to home assistant?

That would be awesone.

How to get the location of the car in HA? I have no tracking device created… the bmw app does support it.

You should have a new entity called device_tracker.x where x is the name of the vehicle you supplied in your configuration.yaml.

For example, in the following config, the vehicle name would be “foo”:

bmw_connected_drive:
  foo:
    username: 
    password: 

I also had to enable Vehicle Tracking in the iDrive of the vehicle itself.

I think I should, but I really have not…

This is my configuration.yaml:
image

This is my entities with bmw in it:

We are currently working on that.

@sender, have you also checked if vehicle tracking is activated in your car? See also the comment below.

I think I know every angle of my iDrive settings. But never seen that. Nevertheless it works in my bmw app, thus… any other tips?

Hi,

My HA only contains the location entity, no entities for all the other sensors of the car?
BMW 520dta 2015; anybody else have this issue ?
(Rebooted twice, no developer logs)

Older cars only support the device tracker and the services. Probably your car (being from 2015) doesn’t have the info available for the sensors. You can find more info here -> https://github.com/bimmerconnected/bimmer_connected

Hm would of thought I saw the same as in the BMW Connected App… Will have a look if I find my model in the git.

My car is not responding to anything at all since last week…

1 Like

Guys anyone else failing to connect with update 0.108.6?

2020-04-18 10:49:05 ERROR (MainThread) [homeassistant.setup] Error during setup of component bmw_connected_drive
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 175, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/__init__.py", line 51, in setup
    accounts.append(setup_account(account_config, hass, name))
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/__init__.py", line 79, in setup_account
    cd_account = BMWConnectedDriveAccount(username, password, region, name, read_only)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/__init__.py", line 126, in __init__
    self.account = ConnectedDriveAccount(username, password, region)
  File "/usr/local/lib/python3.7/site-packages/bimmer_connected/account.py", line 61, in __init__
    self._get_vehicles()
  File "/usr/local/lib/python3.7/site-packages/bimmer_connected/account.py", line 230, in _get_vehicles
    for vehicle_dict in response.json()['vehicles']:
KeyError: 'vehicles'

Yes, it failed for me as well. Didn’t look into it yet as I thought it could be a BMW issue

Bmw perform updates to their platforms on a Saturday. See if you can log in to their connected drive web portal; that’s probably down too.

I didn’t check the portal but it seems to be working again today.

Hi all I het this error from bimmerconnected

Any idea?

DEBUG:bimmer_connected.account:Getting vehicle list
DEBUG:bimmer_connected.account:getting new oauth token
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): customer.bmwgroup.com:443
DEBUG:urllib3.connectionpool:https://customer.bmwgroup.com:443 “POST /gcdm/oauth/authenticate HTTP/1.1” 302 None
Traceback (most recent call last):
File “/usr/bin/bimmerconnected”, line 10, in
sys.exit(main())
File “/usr/lib/python3.8/site-packages/bimmer_connected/cli.py”, line 82, in main
args.func(args)
File “/usr/lib/python3.8/site-packages/bimmer_connected/cli.py”, line 112, in fingerprint
account = ConnectedDriveAccount(args.username, args.password, get_region_from_name(args.region),
File “/usr/lib/python3.8/site-packages/bimmer_connected/account.py”, line 61, in init
self._get_vehicles()
File “/usr/lib/python3.8/site-packages/bimmer_connected/account.py”, line 226, in _get_vehicles
self._get_oauth_token()
File “/usr/lib/python3.8/site-packages/bimmer_connected/account.py”, line 126, in _get_oauth_token
self._oauth_token = response_json[‘access_token’]
KeyError: ‘access_token’

HA 0.109 will contain a notify platform for BMW Connected Drive :partying_face:
More details here -> https://rc--home-assistant-docs.netlify.app/blog/2020/04/21/release-109/#new-platforms.

You can install the beta version of HA 0.109 to check out the notify function.

1 Like

Anyone having issues with the integration after 109.3 or just usual BMW problem?

2020-05-03 21:28:08 ERROR (MainThread) [homeassistant.setup] Error during setup of component bmw_connected_drive
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 175, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/__init__.py", line 51, in setup
    accounts.append(setup_account(account_config, hass, name))
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/__init__.py", line 79, in setup_account
    cd_account = BMWConnectedDriveAccount(username, password, region, name, read_only)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/__init__.py", line 126, in __init__
    self.account = ConnectedDriveAccount(username, password, region)
  File "/usr/local/lib/python3.7/site-packages/bimmer_connected/account.py", line 61, in __init__
    self._get_vehicles()
  File "/usr/local/lib/python3.7/site-packages/bimmer_connected/account.py", line 226, in _get_vehicles
    self._get_oauth_token()
  File "/usr/local/lib/python3.7/site-packages/bimmer_connected/account.py", line 126, in _get_oauth_token
    self._oauth_token = response_json['access_token']
KeyError: 'access_token'

Same yes…
image

Fixed itself over night it seems :slight_smile:

Hi guys, question. I have the integration setup. I can lock and unlock in my app and the portal. But I cannot in HA. I can sound the horn via HA…

My status is also not updated for the lock:

this works for lock and unlock:

What can this be?