BMW ConnectedDrive component

Does the new way in 0.7.0 also work alongside the old way?

I’m now on 0.105.5 and everything works fine with this component.

Shortly after writing that I noticed that 105.5 was available and I have updated and can also confirm that it still works. Thanks again for all of your efforts on this @gerard33

Broken… HA 0.105.5 with BMW_connected 0.70 does not work for me. I have tried restarts and reboots. I am in USA.

I have another external program that continues to work with BMW. It uses the old auth api: https://b2vapi.bmwgroup.us/gcdm/oauth/token

The new HA component auth URL: ‘https://customer.bmwgroup.com/{gcdm_oauth_endpoint}/authenticate’ returns an error.

from home-assistant.log
2020-02-18 09:27:19 INFO (MainThread) [homeassistant.setup] Setting up bmw_connected_drive
2020-02-18 09:27:21 ERROR (MainThread) [homeassistant.setup] Error during setup of component bmw_connected_drive
File “/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/init.py”, line 51, in setup
File “/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/init.py”, line 79, in setup_account
File “/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/init.py”, line 127, in init

We have just found out that BMW only changed the URL for rest of the world and not for USA (and probably China). So for bimmer people in USA and China, don’t update to 105.5 or try to revert to 105.4.

Fix is on the way and will probably be part of 106.

The fix in bimmer_connected 0.7.1 for US and China is part of HA 0.106.
Would be great if someone in :us: or :cn: can confirm it works again by installing the beta of HA 0.106.
CC @rikroe

@gerard33 I want to look into adding an additional service call so I can adjust charging times on my i3. Can I use the web interface to figure out the json data to submit with the call? or is the component using api calls like the android app? Any tips on how to fake this in Postman?

I have BMW component installed. It seems that HA only updates the position of the car when homeassistant starts up. Anyone have the same problem? I drove arround a couple of times and the position of the car never changes… I need to create some cron script in order the update the position of the car? My unit in one NBTevo id4+ F31 04/2016
Thanks in advance!

Do you know that BMW doesn’t update the position of the car when driving?
It does it only when parked.

And it for me they confirmed that production date before 2014 only is updated if the radius of the car is within 1.5 km of the app… thus don’t know how this turns out from HA perspective.

And I’m ok with that, I am extremely happy to only have the parking location if works. When I drive the car and park somewhere, the location is not updated on HA. How is the best way to track down the problem?

Can you share the code you us to get and display the location please?

What do you mean?

Lovelace code to display location

@gerard33 how to get rid od my lock errors?

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 434, in _async_add_entity
await entity.async_update_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 284, in async_update_ha_state
self._async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 328, in _async_write_ha_state
attr.update(self.device_state_attributes or {})
File “/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/lock.py”, line 64, in device_state_attributes
“door_lock_state”: vehicle_state.door_lock_state.value,
AttributeError: ‘NoneType’ object has no attribute ‘value’

https://github.com/home-assistant/core/issues/28806

I have made a PR to fix that. You can follow the progress here -> https://github.com/home-assistant/core/pull/32074.

When will this be “live” this takes zo much up from my log I can’t even see others anymore…

And this is not all:
Body is limited to 32000 characters; you entered 68067.

2020-03-15 22:56:57 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 284, in async_update_ha_state
self._async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 328, in _async_write_ha_state
attr.update(self.device_state_attributes or {})
File “/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/lock.py”, line 64, in device_state_attributes
“door_lock_state”: vehicle_state.door_lock_state.value,
AttributeError: ‘NoneType’ object has no attribute ‘value’
2020-03-15 23:01:57 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 284, in async_update_ha_state
self._async_write_ha_state()

A BIZAR AMOUNT BETWEEN

File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 328, in _async_write_ha_state
attr.update(self.device_state_attributes or {})
File “/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/lock.py”, line 64, in device_state_attributes
“door_lock_state”: vehicle_state.door_lock_state.value,
AttributeError: ‘NoneType’ object has no attribute ‘value’

Have you checked the status of the PR in my post above yours and the status of the issue in your own post before that one?
It will be in 0.107.
And the HA log shows error messages which are the same as 1 line with a counter since a while. You are on a recent HA version already?

And please remove the long log code in your post above. It’s not useful as you already mentioned the error before and it makes this topic less readable.

@gerard33, Yes I tried to find the answer myself before asking. I read he entire thread again, read your links and read this: https://github.com/home-assistant/core/pull/32074

I did not find the answer. And to be honest untill now I cannot even find myself the answer on how to see it will be in 0.107.

And Yes, I am on the latest:
Home Assistant 0.106.6
Supervisor 209
HassOS 3.12

Hi, since update .107 no lock error, thank you! But I do not have a “device tracker” device, not in entities, and I do not know how to put in knowndevices.yaml.any help appreciated again. Thank you.