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
72.6k stars 30.37k forks source link

Integrated HA Component creates errors and gets unavailable #104586

Closed Pirol62 closed 10 months ago

Pirol62 commented 10 months ago

The problem

Errors causing unstable connection

What version of Home Assistant Core has the issue?

2023.10.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

BMW

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.bmw_connected_drive.coordinator
Source: helpers/update_coordinator.py:290
Integration: BMW Connected Drive (documentation, issues)
First occurred: 11:29:37 (2 occurrences)
Last logged: 12:29:53

Unexpected error fetching bmw_connected_drive-post@joerg-nauen.de data: 'capabilities'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/bmw_connected_drive/coordinator.py", line 59, in _async_update_data
    await self.account.get_vehicles()
  File "/usr/local/lib/python3.11/site-packages/bimmer_connected/account.py", line 112, in get_vehicles
    if vehicle_state[ATTR_CAPABILITIES].get("isChargingPlanSupported", False) or vehicle_state[
       ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'capabilities'

Additional information

No response

home-assistant[bot] commented 10 months 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!

Code owner commands Code owners of `bmw_connected_drive` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign bmw_connected_drive` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


bmw_connected_drive documentation bmw_connected_drive source (message by IssueLinks)

Pirol62 commented 10 months ago

Meanwhile I receive the following error in additiion:

MyBMWAuthError due to HTTPStatusError: Client error '401 Unauthorized' for url 'https://cocoapi.bmwgroup.com/eadrax-vcs/v4/vehicles/state?apptimezone=60.0&appDateTime=1701099058297' For more information check: https://httpstatuses.com/401

and

Logger: homeassistant.components.bmw_connected_drive.coordinator
Source: helpers/update_coordinator.py:322
Integration: BMW Connected Drive (documentation, issues)
First occurred: 16:31:01 (1 occurrences)
Last logged: 16:31:01

Error fetching bmw_connected_drive-post@joerg-nauen.de data: HTTPStatusError: Client error '401 Unauthorized' for url 'https://cocoapi.bmwgroup.com/eadrax-vcs/v4/vehicles/state?apptimezone=60.0&appDateTime=1701099058297' For more information check: https://httpstatuses.com/401
Pirol62 commented 10 months ago

recently updated to 2023.11.3. Let's see if this solves the error logs.

renaudallard commented 10 months ago

Did 2023.11.3 solve the issue? For me, the integration is broken on both 2023.11.3 and 2023.10.5. It was working on 2023.9.3.

Pirol62 commented 10 months ago

No, still receiving these errors

rikroe commented 10 months ago

The issue doesn't have something to do with the HA version (or the component). If there was a change, change, it was on BMW server side. (I'm saying if because we have had hickups with the servers in the past and they have been resolved by BMW silently after some time).

Also closing this in favor of #104555, please continue discussing there.

rikroe commented 10 months ago

@home-assistant close

renaudallard commented 10 months ago

I am not sure those 2 are the same problem. But let's see if the other thread helps.