home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.14k stars 29.82k forks source link

BMW ConnectedDrive sensors stopped functioning #59403

Closed silviudc closed 2 years ago

silviudc commented 2 years ago

The problem

Since the 2021.11 update the following sensors are no longer working. image This has been confirmed by more users on https://community.home-assistant.io/t/bmw-connecteddrive-component/39569/688

What version of Home Assistant Core has the issue?

core-2021.11.1

What was the last working version of Home Assistant Core?

core-2021.10.x

What type of installation are you running?

Home Assistant OS

Integration causing the issue

BMW ConnectedDrive

Link to integration documentation on our website

https://www.home-assistant.io/integrations/bmw_connected_drive/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2021-11-09 18:45:51 ERROR (MainThread) [homeassistant.components.binary_sensor] bmw_connected_drive: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 651, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/binary_sensor.py", line 251, in update
    self._attr_is_on = self.entity_description.value_fn(
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/binary_sensor.py", line 102, in _is_vehicle_charging
    extra_attributes["charging_status"] = vehicle_state.charging_status.value
AttributeError: 'NoneType' object has no attribute 'value'

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

bmw_connected_drive documentation bmw_connected_drive source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @gerard33, @rikroe, mind taking a look at this issue as it has been labeled with an integration (bmw_connected_drive) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

madpsy commented 2 years ago

Exactly the same issue here after upgrade to 2021.11.1 and .2

quantummobile commented 2 years ago

Exactly the same issue here after upgrade to 2021.11.1 and .2

Same here.

BrummyGit commented 2 years ago

Same here since the release of 2021.11.1 and .2

My car is BMW X5 xDrive45e (PHEV)

Pirol62 commented 2 years ago

Not only 2021/11 but 2021/10/6 as well. After a restart I got this:

Logger: homeassistant.components.binary_sensor
Source: components/bmw_connected_drive/binary_sensor.py:107
**Integration: Binärsensor (documentation, issues)**
First occurred: 17:13:45 (3 occurrences)
Last logged: 17:20:54

bmw_connected_drive: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 618, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/binary_sensor.py", line 107, in update
    result["door_lock_state"] = vehicle_state.door_lock_state.value
AttributeError: 'NoneType' object has no attribute 'value'

and this at the same time:

bmw_connected_drive: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 618, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/binary_sensor.py", line 115, in update
    self._attr_is_on = not vehicle_state.are_all_cbs_ok
  File "/usr/local/lib/python3.9/site-packages/bimmer_connected/state.py", line 36, in _func_wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/bimmer_connected/state.py", line 300, in are_all_cbs_ok
    return bool(self.vehicle_status.are_all_cbs_ok)
  File "/usr/local/lib/python3.9/site-packages/bimmer_connected/vehicle_status.py", line 284, in are_all_cbs_ok
    for cbs in self.condition_based_services:
TypeError: 'NoneType' object is not iterable

PS: I forgot this some minutes before:

Logger: homeassistant.components.lock
Source: components/bmw_connected_drive/lock.py:71
**Integration: Schloss (documentation, issues)**
First occurred: 17:13:45 (3 occurrences)
Last logged: 17:20:54

bmw_connected_drive: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 618, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/lock.py", line 71, in update
    result["door_lock_state"] = vehicle_state.door_lock_state.value
AttributeError: 'NoneType' object has no attribute 'value'

I executed a restart at 08:20 CET where everything was ok.

wokkeltje13 commented 2 years ago

Same issue here after update to version core-2021.11.2 According to my sensors, everything was working with version core-2021.11.1

silviudc commented 2 years ago

Totally broken for me too after 2021.11.2 Update with this error:

2021-11-09 18:45:51 ERROR (MainThread) [homeassistant.components.binary_sensor] bmw_connected_drive: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 651, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/binary_sensor.py", line 251, in update
    self._attr_is_on = self.entity_description.value_fn(
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/binary_sensor.py", line 102, in _is_vehicle_charging
    extra_attributes["charging_status"] = vehicle_state.charging_status.value
AttributeError: 'NoneType' object has no attribute 'value'
Pirol62 commented 2 years ago

I would like to point out, that it might has nothing to do with an update. A simple restart caused the same issue. Something must have changed in the Api.

fredriklj commented 2 years ago

I can confirm that a restart (without update) caused the issue for me.

Rep-Hueman commented 2 years ago

Totally broken for me too

bmw_connected_drive: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 651, in async_device_update await task File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/sensor.py", line 565, in update self._attr_native_value = getattr(attr, sub_attr) AttributeError: 'NoneType' object has no attribute 'community_average'

rikroe commented 2 years ago

Could one of you (best one in rest of world and one on us) please try out the commands in the issue template of the upstream library at https://github.com/bimmerconnected/bimmer_connected?

It might be that the old API we rely on has been turned off.

There will be a solution but it might take a little while as the data structure has changed.

fredriklj commented 2 years ago

An issue has been filed already:

https://github.com/bimmerconnected/bimmer_connected/issues/325

jypsie commented 2 years ago

same here

danfulton72 commented 2 years ago

Yup, rest of world and kaput :(

obhammer commented 2 years ago

HA 2021.10.3 here - broken after restart/reload... API related for sure

havrla commented 2 years ago

No version problem BMW server respond: ######################################## HTTP Status 410 - Gone type Status report messageGone descriptionThe requested resource is no longer available, and no forwarding address is known. Payara Micro #badassfish ########################################

rikroe commented 2 years ago

Hi all, still not sure if the BMW APIs are just broken or actually shut off.

Please jump over to https://github.com/bimmerconnected/bimmer_connected/discussions/327 to help us with some data contributions on what the My BMW API will return for your vehicle, so we can start migrating.

scstraus commented 2 years ago

I'm having this issue too.

kayintveen commented 2 years ago

Same here :(

smortier59 commented 2 years ago

Same here !

rikroe commented 2 years ago

Good news! I just created beta releases for both the python library (bimmer_connected==0.8.0b2) and our custom component (20211113.1) that should enable My BMW APIs.

⚠️ It is still beta and all tests fail, but you should get some data back into Home Assistant.

Please check the release notes of both carefully and let us know if anything doesn't work. When it is smoothed out a little bit we will create a PR to get it included in HA proper.

EDIT: The cli issue should be fixed with bimmer_connected==0.8.0b4/custom component 20211114.2.

silviudc commented 2 years ago

Good news! I just created beta releases for both the python library (bimmer_connected==0.8.0b2) and our custom component (20211113.1) that should enable My BMW APIs.

⚠️ It is still beta and all tests fail, but you should get some data back into Home Assistant.

Please check the release notes of both carefully and let us know if anything doesn't work. When it is smoothed out a little bit we will create a PR to get it included in HA proper.

EDIT: The cli issue should be fixed with bimmer_connected==0.8.0b4/custom component 20211114.2.

Many thanks, yes that fixed the login issues for me. I still have 5 non-working sensors, just let me know if these are gone so I can delete them

image

silviudc commented 2 years ago

Looks like no updates in the last 3 hours to any sensors and the service to refresh data also doesn't do anything? Anyone else seeing this? No errors/warnings in the logs.

rikroe commented 2 years ago

I'll double check the now unused sensors, please wait with deleting them.

Regarding no update: I pushed a new version of the component that should fix this issue this morning, are you using this already?

danfulton72 commented 2 years ago

I'm using 0.8.0b6 - the sensors are not automatically updating for me, but do at restart of HA (I use the container version).

On Mon, 15 Nov 2021 at 14:58, rikroe @.***> wrote:

I'll double check the now unused sensors, please wait with deleting them.

Regarding no update: I pushed a new version of the component this morning, are you using this already?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/59403#issuecomment-968993250, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHZQZAQA5SO2EFADVWP7UTUMENZPANCNFSM5HUYUQHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

kayintveen commented 2 years ago

I installed but for me the errors still popup in logs. i tried both 202111114.2 as well as the newer 20211115 and such.

bmw_connected_drive: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 651, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/bmw_connected_drive/sensor.py", line 565, in update
    self._attr_native_value = getattr(attr, sub_attr)
AttributeError: 'NoneType' object has no attribute 'community_average'

and

mw_connected_drive: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 651, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/bmw_connected_drive/sensor.py", line 543, in update
    if parsed_date := dt_util.parse_datetime(date_str):
  File "/usr/src/homeassistant/homeassistant/util/dt.py", line 133, in parse_datetime
    return ciso8601.parse_datetime(dt_str)
TypeError: argument 1 must be str, not None
sdemmery commented 2 years ago

Looks like no updates in the last 3 hours to any sensors and the service to refresh data also doesn't do anything? Anyone else seeing this? No errors/warnings in the logs. Yep same issue only a HA restart makes the readings update will try the new release now.

silviudc commented 2 years ago

I'm using 0.8.0b6 - the sensors are not automatically updating for me, but do at restart of HA (I use the container version). On Mon, 15 Nov 2021 at 14:58, rikroe @.***> wrote: I'll double check the now unused sensors, please wait with deleting them. Regarding no update: I pushed a new version of the component this morning, are you using this already? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#59403 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHZQZAQA5SO2EFADVWP7UTUMENZPANCNFSM5HUYUQHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Yes the sensors do update if I restart HA but they do not on their own :( version I am on is bimmer_connected==0.8.0.0b5 Lock/unlock service does work

rikroe commented 2 years ago

Please check custom component 20211115.2/bimmer_connected==0.8.0b7.

All mentioned issues should be fixed.

@sdemmery @silviudc @kayintveen

dgomes commented 2 years ago

@rikroe no PR yet for core ?

rikroe commented 2 years ago

@dgomes if nothing major comes up, I will create a PR for core. Just was not sure how many issues we will find... Or would you suggest to create a PR now and rather fix issues afterwards?

dgomes commented 2 years ago

This sort of issues can be fixed before the next release, and there is no limit to the amount of PR submitted ;) It is actually preferred to submit various small PR then large ones

Rep-Hueman commented 2 years ago

The sensors are not (good) automatically updating!

The sensors do update if I restart HA or reload the intergation. But they do not on their own or switches between two values old value en ?? value. (Car was charging..) version I am on is custom component 20211115.2 bimmer_connected==0.8.0b7

ha-bmw

Ps, Every time I restart HA, it first shows the correct value at that moment : sensor.cooper_se_remaining_range_electric (123 km) But on update it goes back to (74 km) and the next update to (95 km) and than it switches between (74 km) and (95 km) with every update.

silviudc commented 2 years ago

Please check custom component 20211115.2/bimmer_connected==0.8.0b7.

All mentioned issues should be fixed.

@sdemmery @silviudc @kayintveen

Thanks, updated to 0.8.0b7 and HA to 2021.11.4, will test it out shortly. Fuel % now works but these guys are still dead, the API is not showing those values anymore? image

silviudc commented 2 years ago

Still no updates on sensors and the refresh state service also does not update them image Some errors in the logs this time:

2021-11-16 10:38:54 ERROR (SyncWorker_21) [custom_components.bmw_connected_drive] Could not connect to the BMW Connected Drive portal. The vehicle state could not be updated
2021-11-16 10:38:54 ERROR (SyncWorker_21) [custom_components.bmw_connected_drive] HTTPSConnectionPool(host='cocoapi.bmwgroup.com', port=443): Max retries exceeded with url: /eadrax-vcs/v1/vehicles?apptimezone=1440.0&appDateTime=1637059134.339867&tireGuardMode=ENABLED (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f7dd32bb0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection
    raise err
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, in create_connection
    sock.connect(sa)
OSError: [Errno 113] Host is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 358, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f7dd32bb0>: Failed to establish a new connection: [Errno 113] Host is unreachable
kayintveen commented 2 years ago

I do not have any logs with errors but the sensor are not getting updated only on refresh.

rikroe commented 2 years ago

Thanks for reporting! I will try to figure out the issue this evening.

danfulton72 commented 2 years ago

Same here, but if you reload the integration, the sensors update - another piece of the puzzle maybe 🤷

sdemmery commented 2 years ago

Same here, but if you reload the integration, the sensors update - another piece of the puzzle maybe 🤷

Yep exactly the same here sensors never update unless I reload the integration or restart HA. Using version 20211115.2 bimmer_connected==0.8.0b7 such great work happening here feels so near now :-)

rikroe commented 2 years ago

No idea whats going on here, so created custom component release 20211116.1 with more logging.

Please enable your HA debug logs as described and post back. It should update every 5 minutes and give some logs in the likes of

sensor value for 'remaining_range_electric' is '(125, 'km')'. Source data: '{some_huge_json}'

Also you maybe get some other interesting information. It is fine if updating vehicles is called multiple times.

sdemmery commented 2 years ago

Updated to 20211116.1 & pasted in the logging options. Im not getting any of those kind of messages (assuming Im looking in the right place) log has these type entries every few mins

In case its relevant car is a Mini Clubman 2019

2021-11-16 17:53:55 DEBUG (SyncWorker_1) [bimmer_connected.account] Getting vehicle list 2021-11-16 17:53:55 DEBUG (SyncWorker_1) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:53:55 DEBUG (SyncWorker_1) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:53:55 DEBUG (SyncWorker_1) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles 2021-11-16 17:53:55 DEBUG (SyncWorker_1) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:53:55 DEBUG (SyncWorker_1) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:53:57 DEBUG (SyncWorker_1) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:53:57 DEBUG (SyncWorker_1) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles 2021-11-16 17:53:57 DEBUG (SyncWorker_1) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:53:57 DEBUG (SyncWorker_1) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:53:58 DEBUG (SyncWorker_4) [bimmer_connected.vehicle_status] No data available for attribute <function VehicleStatus.fuel_percent at 0x7f239b8db040>!

I then reloaded the integration to get the sensors to update & got these log entries

2021-11-16 17:54:45 DEBUG (SyncWorker_6) [bimmer_connected.account] Getting vehicle list 2021-11-16 17:54:45 DEBUG (SyncWorker_6) [bimmer_connected.account] Authenticating against GCDM with MyBMW flow. 2021-11-16 17:54:45 DEBUG (SyncWorker_6) [bimmer_connected.account] got authorization challenge Redatcted 2021-11-16 17:54:46 DEBUG (SyncWorker_6) [bimmer_connected.account] got login code -Redatcted 2021-11-16 17:54:46 DEBUG (SyncWorker_6) [bimmer_connected.account] getting new oauth token 2021-11-16 17:54:46 DEBUG (SyncWorker_6) [bimmer_connected.account] got new token Redatcted with expiration date 2021-11-16 18:54:45.121995 2021-11-16 17:54:46 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:46 DEBUG (SyncWorker_6) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles 2021-11-16 17:54:46 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:46 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:48 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:48 DEBUG (SyncWorker_6) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles 2021-11-16 17:54:48 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:48 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:49 DEBUG (SyncWorker_6) [bimmer_connected.account] Getting vehicle list 2021-11-16 17:54:49 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:49 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:49 DEBUG (SyncWorker_6) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles 2021-11-16 17:54:49 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:49 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:49 DEBUG (SyncWorker_7) [bimmer_connected.account] Getting vehicle list 2021-11-16 17:54:49 DEBUG (SyncWorker_7) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:49 DEBUG (SyncWorker_7) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:49 DEBUG (SyncWorker_7) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles 2021-11-16 17:54:49 DEBUG (SyncWorker_7) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:49 DEBUG (SyncWorker_7) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:51 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:51 DEBUG (SyncWorker_6) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles 2021-11-16 17:54:51 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:51 DEBUG (SyncWorker_6) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:51 DEBUG (SyncWorker_7) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:51 DEBUG (SyncWorker_7) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles 2021-11-16 17:54:51 DEBUG (SyncWorker_7) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:51 DEBUG (SyncWorker_7) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:52 DEBUG (SyncWorker_0) [bimmer_connected.account] Getting vehicle list 2021-11-16 17:54:52 DEBUG (SyncWorker_0) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:52 DEBUG (SyncWorker_0) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:52 DEBUG (SyncWorker_0) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles 2021-11-16 17:54:52 DEBUG (SyncWorker_0) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:52 DEBUG (SyncWorker_0) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:53 DEBUG (SyncWorker_0) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:53 DEBUG (SyncWorker_0) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles 2021-11-16 17:54:53 DEBUG (SyncWorker_0) [bimmer_connected.account] Old token is still valid. Not getting a new one. 2021-11-16 17:54:53 DEBUG (SyncWorker_0) [bimmer_connected.account] Old token is still valid. Not getting a new one.

kayintveen commented 2 years ago

After reload was this my logs

2021-11-16 19:46:52 DEBUG (SyncWorker_8) [bimmer_connected.account] Getting vehicle list
2021-11-16 19:46:52 DEBUG (SyncWorker_8) [bimmer_connected.account] Authenticating against GCDM with MyBMW flow.
2021-11-16 19:46:52 DEBUG (SyncWorker_8) [bimmer_connected.account] got authorization challenge XXXXXXXXXXXXXXXXXXX
2021-11-16 19:46:52 DEBUG (SyncWorker_8) [bimmer_connected.account] got login code XXXXXXXXXXXXXXXXXXX
2021-11-16 19:46:52 DEBUG (SyncWorker_8) [bimmer_connected.account] getting new oauth token
2021-11-16 19:46:52 DEBUG (SyncWorker_8) [bimmer_connected.account] got new token XXXXXXXXXXXXXXXXXXX with expiration date 2021-11-16 20:46:51.863968
2021-11-16 19:46:52 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:52 DEBUG (SyncWorker_8) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 19:46:52 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:52 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:55 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:55 DEBUG (SyncWorker_8) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 19:46:55 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:55 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:57 DEBUG (SyncWorker_8) [bimmer_connected.account] Getting vehicle list
2021-11-16 19:46:57 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:57 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:57 DEBUG (SyncWorker_8) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 19:46:57 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:57 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:57 DEBUG (SyncWorker_4) [bimmer_connected.account] Getting vehicle list
2021-11-16 19:46:57 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:57 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:57 DEBUG (SyncWorker_4) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 19:46:57 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:57 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:58 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:58 DEBUG (SyncWorker_4) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 19:46:58 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:58 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:59 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:59 DEBUG (SyncWorker_8) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 19:46:59 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:46:59 DEBUG (SyncWorker_8) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:47:00 DEBUG (SyncWorker_5) [bimmer_connected.account] Getting vehicle list
2021-11-16 19:47:00 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:47:00 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:47:00 DEBUG (SyncWorker_5) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 19:47:00 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:47:00 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:47:02 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:47:02 DEBUG (SyncWorker_5) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 19:47:02 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:47:02 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:47:03 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.bmw_connected_drive
2021-11-16 19:47:03 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.bmw_connected_drive
2021-11-16 19:47:03 INFO (MainThread) [homeassistant.components.lock] Setting up lock.bmw_connected_drive
2021-11-16 19:47:03 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.bmw_connected_drive
2021-11-16 19:47:03 INFO (MainThread) [homeassistant.components.notify] Setting up notify.bmw_connected_drive

Nothing like

sensor value for 'remaining_range_electric' is '(125, 'km')'. Source data: '{some_huge_json}'

5 min later the following

2021-11-16 19:49:07 DEBUG (SyncWorker_5) [bimmer_connected.account] Getting vehicle list
2021-11-16 19:49:07 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:49:07 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:49:07 DEBUG (SyncWorker_5) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 19:49:07 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:49:07 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:49:08 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:49:08 DEBUG (SyncWorker_5) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 19:49:08 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 19:49:08 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
rikroe commented 2 years ago

Just to double check (as I just saw it now): You guys have (PH)EVs? Or combustion only? Because the two I picked for debug require an EV...

sdemmery commented 2 years ago

Ah yep combustion only for me but as I said not updating unless reload of the integration

danfulton72 commented 2 years ago

I'm a PHEV (225 xe) and a 2013 F11

2021-11-16 17:44:26 DEBUG (SyncWorker_5) [bimmer_connected.account] Getting vehicle list
2021-11-16 17:44:26 DEBUG (SyncWorker_5) [bimmer_connected.account] Authenticating against GCDM with MyBMW flow.
2021-11-16 17:44:27 DEBUG (SyncWorker_5) [bimmer_connected.account] got authorization challenge REDACTED
2021-11-16 17:44:27 DEBUG (SyncWorker_5) [bimmer_connected.account] got login code REDACTED
2021-11-16 17:44:27 DEBUG (SyncWorker_5) [bimmer_connected.account] getting new oauth token
2021-11-16 17:44:27 DEBUG (SyncWorker_5) [bimmer_connected.account] got new token REDACTED with expiration date 2021-11-16 18:44:26.483275
2021-11-16 17:44:27 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:27 DEBUG (SyncWorker_5) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 17:44:27 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:27 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:30 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:30 DEBUG (SyncWorker_5) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 17:44:30 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:30 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:31 DEBUG (SyncWorker_5) [bimmer_connected.account] Getting vehicle list
2021-11-16 17:44:31 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:31 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:31 DEBUG (SyncWorker_5) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 17:44:31 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:31 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:31 DEBUG (SyncWorker_4) [bimmer_connected.account] Getting vehicle list
2021-11-16 17:44:31 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:31 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:31 DEBUG (SyncWorker_4) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 17:44:31 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:31 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:33 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:33 DEBUG (SyncWorker_5) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 17:44:33 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:33 DEBUG (SyncWorker_5) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:34 DEBUG (SyncWorker_2) [bimmer_connected.account] Getting vehicle list
2021-11-16 17:44:34 DEBUG (SyncWorker_2) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:34 DEBUG (SyncWorker_2) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:34 DEBUG (SyncWorker_2) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 17:44:34 DEBUG (SyncWorker_2) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:34 DEBUG (SyncWorker_2) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:35 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:35 DEBUG (SyncWorker_4) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 17:44:35 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:35 DEBUG (SyncWorker_4) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:35 DEBUG (SyncWorker_2) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:35 DEBUG (SyncWorker_2) [bimmer_connected.account] Request to: https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles
2021-11-16 17:44:35 DEBUG (SyncWorker_2) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:35 DEBUG (SyncWorker_2) [bimmer_connected.account] Old token is still valid. Not getting a new one.
2021-11-16 17:44:52 DEBUG (SyncWorker_15) [bimmer_connected.vehicle_status] No data available for attribute <function VehicleStatus.fuel_percent at 0x7f95939f0430>!
rikroe commented 2 years ago

Sorry guys, had a typo in the logger config :/ It's custom_components.bmw_connected_drive (was missing the s in components). Also you should be able to remove the logger for bimmer_connected as that won't help that much.

Please check with the latest custom component release 20211116.2.

danfulton72 commented 2 years ago

Here you go,

2021-11-16 21:51:56 DEBUG (SyncWorker_6) [custom_components.bmw_connected_drive] Adding new account ******
2021-11-16 21:52:00 DEBUG (SyncWorker_6) [custom_components.bmw_connected_drive] Updating vehicle state for account ******, notifying 0 listeners
2021-11-16 21:52:00 DEBUG (SyncWorker_8) [custom_components.bmw_connected_drive] Updating vehicle state for account ******, notifying 0 listeners
2021-11-16 21:52:07 DEBUG (SyncWorker_5) [custom_components.bmw_connected_drive] Updating vehicle state for account ******, notifying 0 listeners
2021-11-16 21:52:15 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.notify] Found BMW accounts: ******
2021-11-16 21:52:15 INFO (MainThread) [custom_components.bmw_connected_drive.device_tracker] Tracking is (currently) disabled for vehicle 530d ****** defaulting to unknown
2021-11-16 21:52:15 DEBUG (SyncWorker_21) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_21) [custom_components.bmw_connected_drive.binary_sensor] Status of lid: True
2021-11-16 21:52:15 DEBUG (SyncWorker_19) [custom_components.bmw_connected_drive.device_tracker] Updating device tracker of 530d
2021-11-16 21:52:15 DEBUG (SyncWorker_19) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_19) [custom_components.bmw_connected_drive.sensor] UoM Conversion for remaining_range_total. HA: 230 km, Vehicle: 143 mi.
2021-11-16 21:52:15 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.device_tracker] Updating device tracker of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.sensor] UoM Conversion for mileage. HA: 107482 km, Vehicle: 66786 mi.
2021-11-16 21:52:15 DEBUG (SyncWorker_22) [custom_components.bmw_connected_drive.lock] Updating lock data for 'lock' of 530d
2021-11-16 21:52:15 DEBUG (SyncWorker_22) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_22) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_17) [custom_components.bmw_connected_drive.lock] Updating lock data for 'lock' of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_17) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_17) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_16) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_16) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_20) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_20) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_9) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_9) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_9) [custom_components.bmw_connected_drive.sensor] UoM Conversion for remaining_fuel. HA: 19 L, Vehicle: 19 L.
2021-11-16 21:52:15 DEBUG (SyncWorker_5) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:52:15 DEBUG (SyncWorker_5) [custom_components.bmw_connected_drive.sensor] UoM Conversion for remaining_range_fuel. HA: 230 km, Vehicle: 143 mi.
2021-11-16 21:52:15 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance

2021-11-16 21:57:00 DEBUG (SyncWorker_21) [custom_components.bmw_connected_drive] Updating vehicle state for account ******, notifying 20 listeners
2021-11-16 21:57:02 DEBUG (SyncWorker_14) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_14) [custom_components.bmw_connected_drive.binary_sensor] Status of lid: True
2021-11-16 21:57:02 DEBUG (SyncWorker_14) [custom_components.bmw_connected_drive.device_tracker] Updating device tracker of 530d
2021-11-16 21:57:02 DEBUG (SyncWorker_14) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_14) [custom_components.bmw_connected_drive.sensor] UoM Conversion for remaining_range_total. HA: 230 km, Vehicle: 143 mi.
2021-11-16 21:57:02 DEBUG (SyncWorker_14) [custom_components.bmw_connected_drive.lock] Updating lock data for 'lock' of 530d
2021-11-16 21:57:02 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.device_tracker] Updating device tracker of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.sensor] UoM Conversion for mileage. HA: 107482 km, Vehicle: 66786 mi.
2021-11-16 21:57:02 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.lock] Updating lock data for 'lock' of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_16) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_16) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_20) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_20) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_12) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_12) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_17) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_17) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_9) [custom_components.bmw_connected_drive.binary_sensor] Updating binary sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_9) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_9) [custom_components.bmw_connected_drive.sensor] UoM Conversion for remaining_fuel. HA: 19 L, Vehicle: 19 L.
2021-11-16 21:57:02 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
2021-11-16 21:57:02 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive.sensor] UoM Conversion for remaining_range_fuel. HA: 230 km, Vehicle: 143 mi.
2021-11-16 21:57:02 DEBUG (SyncWorker_8) [custom_components.bmw_connected_drive.sensor] Updating sensors of 225xe iPerformance
rikroe commented 2 years ago

Mhh... To me this looks completely alright. It runs automatically, notifies the listeners and then updates the sensors without error. Are the values correct/expected?

Rep-Hueman commented 2 years ago

Sensors never update in de front

2021-11-16 22:51:05 DEBUG (SyncWorker_2) [custom_components.bmw_connected_drive] Updating vehicle state for account xxxx@xxxx.nl, notifying 0 listeners
2021-11-16 22:51:05 DEBUG (SyncWorker_4) [custom_components.bmw_connected_drive] Updating vehicle state for account xxxx@xxxx.nl, notifying 0 listeners

2021-11-16 22:51:07 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive] Updating vehicle state for account xxxx@xxxx.nl, notifying 0 listeners

2021-11-16 22:51:10 INFO (MainThread) [homeassistant.components.notify] Setting up notify.bmw_connected_drive
2021-11-16 22:51:10 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.bmw_connected_drive
2021-11-16 22:51:10 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.bmw_connected_drive
2021-11-16 22:51:10 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.bmw_connected_drive
2021-11-16 22:51:10 INFO (SyncWorker_1) [homeassistant.loader] Loaded lock from homeassistant.components.lock
2021-11-16 22:51:10 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.notify] Found BMW accounts: xxxx@xxxx.nl
2021-11-16 22:51:10 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.binary_sensor] Status of lid: True
2021-11-16 22:51:10 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 22:51:10 INFO (MainThread) [homeassistant.setup] Setting up lock
2021-11-16 22:51:10 INFO (MainThread) [homeassistant.setup] Setup of domain lock took 0.0 seconds
2021-11-16 22:51:10 INFO (MainThread) [homeassistant.components.lock] Setting up lock.bmw_connected_drive
2021-11-16 22:51:10 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 22:51:10 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.lock] Cooper SE: updating data for lock
2021-11-16 22:51:10 DEBUG (SyncWorker_4) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 22:51:10 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 22:51:10 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 22:51:10 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.sensor] sensor value for 'charging_level_hv' is '87'. Source data: '87'
2021-11-16 22:51:10 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 22:51:10 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive.sensor] sensor value for 'remaining_range_electric' is '(123, 'km')'. Source data: '[{'mainBarValue': 87, 'secondaryBarValue': 0, 'infoIconId': 59689, 'rangeIconId': 59683, 'rangeUnits': 'km', 'rangeValue': '123', 'levelIconId': 59689, 'showsBar': True, 'levelUnits': '%', 'levelValue': '87', 'showBarGoal': False, 'barType': None, 'infoLabel': '100% at ~12:43 AM', 'isInaccurate': True, 'isCircleIcon': True, 'iconOpacity': 'high', 'chargingType': 'charging', 'chargingStatusType': 'CHARGING', 'chargingStatusIndicatorType': 'CHARGING'}]'
2021-11-16 22:51:11 INFO (SyncWorker_2) [homeconnect.sseclient] Connecting ...

2021-11-16 22:56:05 DEBUG (SyncWorker_5) [custom_components.bmw_connected_drive] Updating vehicle state for account xxxx@xxxx.nl, notifying 15 listeners
2021-11-16 22:56:08 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.binary_sensor] Status of lid: True
2021-11-16 22:56:08 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 22:56:08 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.lock] Cooper SE: updating data for lock
2021-11-16 22:56:08 DEBUG (SyncWorker_6) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 22:56:08 DEBUG (SyncWorker_4) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 22:56:08 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 22:56:08 DEBUG (SyncWorker_2) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 22:56:08 DEBUG (SyncWorker_2) [custom_components.bmw_connected_drive.sensor] sensor value for 'charging_level_hv' is '87'. Source data: '87'
2021-11-16 22:56:08 DEBUG (SyncWorker_6) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 22:56:08 DEBUG (SyncWorker_6) [custom_components.bmw_connected_drive.sensor] sensor value for 'remaining_range_electric' is '(123, 'km')'. Source data: '[{'mainBarValue': 87, 'secondaryBarValue': 0, 'infoIconId': 59689, 'rangeIconId': 59683, 'rangeUnits': 'km', 'rangeValue': '123', 'levelIconId': 59689, 'showsBar': True, 'levelUnits': '%', 'levelValue': '87', 'showBarGoal': False, 'barType': None, 'infoLabel': '100% at ~12:43 AM', 'isInaccurate': True, 'isCircleIcon': True, 'iconOpacity': 'high', 'chargingType': 'charging', 'chargingStatusType': 'CHARGING', 'chargingStatusIndicatorType': 'CHARGING'}]'

2021-11-16 23:01:05 DEBUG (SyncWorker_4) [custom_components.bmw_connected_drive] Updating vehicle state for account xxxx@xxxx.nl, notifying 15 listeners
2021-11-16 23:01:08 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive.binary_sensor] Status of lid: True
2021-11-16 23:01:08 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:01:08 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.lock] Cooper SE: updating data for lock
2021-11-16 23:01:08 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:01:08 DEBUG (SyncWorker_2) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:01:08 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:01:08 DEBUG (SyncWorker_5) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:01:08 DEBUG (SyncWorker_5) [custom_components.bmw_connected_drive.sensor] sensor value for 'charging_level_hv' is '87'. Source data: '87'
2021-11-16 23:01:08 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:01:08 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.sensor] sensor value for 'remaining_range_electric' is '(123, 'km')'. Source data: '[{'mainBarValue': 87, 'secondaryBarValue': 0, 'infoIconId': 59689, 'rangeIconId': 59683, 'rangeUnits': 'km', 'rangeValue': '123', 'levelIconId': 59689, 'showsBar': True, 'levelUnits': '%', 'levelValue': '87', 'showBarGoal': False, 'barType': None, 'infoLabel': '100% at ~12:43 AM', 'isInaccurate': True, 'isCircleIcon': True, 'iconOpacity': 'high', 'chargingType': 'charging', 'chargingStatusType': 'CHARGING', 'chargingStatusIndicatorType': 'CHARGING'}]'

mini (2)


No front update!!  restart HA:

2021-11-16 23:08:05 DEBUG (SyncWorker_5) [custom_components.bmw_connected_drive.notify] Found BMW accounts: xxxx@xxxx.nl
2021-11-16 23:08:05 DEBUG (SyncWorker_5) [custom_components.bmw_connected_drive.binary_sensor] Status of lid: True
2021-11-16 23:08:05 DEBUG (SyncWorker_5) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:08:05 INFO (SyncWorker_6) [homeassistant.loader] Loaded lock from homeassistant.components.lock
2021-11-16 23:08:05 DEBUG (SyncWorker_6) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:08:05 INFO (MainThread) [homeassistant.setup] Setting up lock
2021-11-16 23:08:05 INFO (MainThread) [homeassistant.setup] Setup of domain lock took 0.0 seconds
2021-11-16 23:08:05 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:08:05 INFO (MainThread) [homeassistant.components.lock] Setting up lock.bmw_connected_drive
2021-11-16 23:08:05 DEBUG (SyncWorker_5) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:08:05 DEBUG (SyncWorker_5) [custom_components.bmw_connected_drive.lock] Cooper SE: updating data for lock
2021-11-16 23:08:05 DEBUG (SyncWorker_4) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:08:05 DEBUG (SyncWorker_4) [custom_components.bmw_connected_drive.sensor] sensor value for 'charging_level_hv' is '98'. Source data: '98'
2021-11-16 23:08:05 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:08:05 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.sensor] sensor value for 'remaining_range_electric' is '(142, 'km')'. Source data: '[{'mainBarValue': 98, 'secondaryBarValue': 0, 'infoIconId': 59689, 'rangeIconId': 59683, 'rangeUnits': 'km', 'rangeValue': '142', 'levelIconId': 59689, 'showsBar': True, 'levelUnits': '%', 'levelValue': '98', 'showBarGoal': False, 'barType': None, 'infoLabel': '100% at ~12:08 AM', 'isInaccurate': True, 'isCircleIcon': True, 'iconOpacity': 'high', 'chargingType': 'charging', 'chargingStatusType': 'CHARGING', 'chargingStatusIndicatorType': 'CHARGING'}]'

after 5 min:

2021-11-16 23:13:00 DEBUG (SyncWorker_7) [custom_components.bmw_connected_drive] Updating vehicle state for account xxxx@xxxxxx.nl, notifying 15 listeners
2021-11-16 23:13:02 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive.binary_sensor] Status of lid: True
2021-11-16 23:13:02 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:13:02 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive.lock] Cooper SE: updating data for lock
2021-11-16 23:13:02 DEBUG (SyncWorker_6) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:13:02 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:13:02 DEBUG (SyncWorker_2) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:13:02 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:13:02 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.sensor] sensor value for 'charging_level_hv' is '98'. Source data: '98'
2021-11-16 23:13:02 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:13:02 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive.sensor] sensor value for 'remaining_range_electric' is '(142, 'km')'. Source data: '[{'mainBarValue': 98, 'secondaryBarValue': 0, 'infoIconId': 59689, 'rangeIconId': 59683, 'rangeUnits': 'km', 'rangeValue': '142', 'levelIconId': 59689, 'showsBar': True, 'levelUnits': '%', 'levelValue': '98', 'showBarGoal': False, 'barType': None, 'infoLabel': '100% at ~12:08 AM', 'isInaccurate': True, 'isCircleIcon': True, 'iconOpacity': 'high', 'chargingType': 'charging', 'chargingStatusType': 'CHARGING', 'chargingStatusIndicatorType': 'CHARGING'}]'
2021-11-16 23:23:00 DEBUG (SyncWorker_1) [custom_components.bmw_connected_drive] Updating vehicle state for account xxxx@xxxxx.nl, notifying 15 listeners
2021-11-16 23:23:02 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.binary_sensor] Status of lid: True
2021-11-16 23:23:02 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:23:02 DEBUG (SyncWorker_2) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:23:02 DEBUG (SyncWorker_6) [custom_components.bmw_connected_drive.lock] Cooper SE: updating data for lock
2021-11-16 23:23:02 DEBUG (SyncWorker_0) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:23:02 DEBUG (SyncWorker_3) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:23:02 DEBUG (SyncWorker_4) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:23:02 DEBUG (SyncWorker_4) [custom_components.bmw_connected_drive.sensor] sensor value for 'charging_level_hv' is '98'. Source data: '98'
2021-11-16 23:23:02 DEBUG (SyncWorker_2) [custom_components.bmw_connected_drive.sensor] Updating Cooper SE
2021-11-16 23:23:02 DEBUG (SyncWorker_2) [custom_components.bmw_connected_drive.sensor] sensor value for 'remaining_range_electric' is '(142, 'km')'. Source data: '[{'mainBarValue': 98, 'secondaryBarValue': 0, 'infoIconId': 59689, 'rangeIconId': 59683, 'rangeUnits': 'km', 'rangeValue': '142', 'levelIconId': 59689, 'showsBar': True, 'levelUnits': '%', 'levelValue': '98', 'showBarGoal': False, 'barType': None, 'infoLabel': '100% at ~12:08 AM', 'isInaccurate': True, 'isCircleIcon': True, 'iconOpacity': 'high', 'chargingType': 'charging', 'chargingStatusType': 'CHARGING', 'chargingStatusIndicatorType': 'CHARGING'}]'