audi_connect_ha icon indicating copy to clipboard operation
audi_connect_ha copied to clipboard

"Refresh Vehicle Data" Not Working

Open coreywillwhat opened this issue 1 year ago • 12 comments

This issue consolidates previous reports about the malfunctioning refresh_vehicle_data service to avoid duplicates and allow us to close related, older issues.

Issue Summary:

  • The refresh_vehicle_data service is not functioning as expected. While it might seem related to vehicle request actions, the issue stems solely from the refresh service.
  • Users might observe updates in the Audi app without corresponding updates in Home Assistant entities.

Service Details:

  • refresh_vehicle_data is designed to "wake" the vehicle and provide an update of its current state. Under normal circumstances, this is unnecessary as the vehicle should automatically sync with the cloud after significant activities (e.g., starting climate control, shutting off the car, etc.).
  • We've updated the service to ensure a cloud update occurs even if the initial refresh attempt fails (see PR #327). Previously a cloud update was only done if a vehicle refresh was successful. This should resolve the issue of home assistant entities not being updated after a vehicle action request. This does not resolve the error in the logs from the refresh_vehicle_data service. You will continue to see errors in your logs, as below, until the underlying issues is resolved.

Current Behavior: Logs indicate failure to refresh vehicle data, presenting errors similar to:

2024-04-04 10:26:13.264 ERROR (MainThread) [custom_components.audiconnect.util] Unable to refresh vehicle data of WA1EXXXXXX1234567: 403, message='', url=URL('https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/vsr/v1/Audi/US/vehicles/WA1EXXXXXX1234567/requests')
2024-04-04 10:26:13.264 ERROR (MainThread) [custom_components.audiconnect.audi_account] Error refreshing vehicle data WA1EXXXXXX1234567

Next Steps:

  • We are enhancing log details to improve debugging efforts and clarify which actions have succeeded or failed.
  • We will continue to look into this issue and provide updates.

coreywillwhat avatar Apr 04 '24 16:04 coreywillwhat

More logs:

2024-04-04 20:14:16.102 DEBUG (MainThread) [custom_components.audiconnect.audi_connect_account] Sending command to refresh data to vehicle WA1E2XXXXX1234567
2024-04-04 20:14:16.102 DEBUG (MainThread) [custom_components.audiconnect.audi_api] Starting request to URL: https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/vsr/v1/Audi/US/vehicles/WA1E2XXXXX1234567/requests with method: POST
2024-04-04 20:14:16.681 DEBUG (MainThread) [custom_components.audiconnect.audi_api] Received response from URL: https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/vsr/v1/Audi/US/vehicles/WA1E2XXXXX1234567/requests with status: 403
2024-04-04 20:14:16.681 ERROR (MainThread) [custom_components.audiconnect.audi_api] Error response 403 from URL: https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/vsr/v1/Audi/US/vehicles/WA1E2XXXXX1234567/requests
2024-04-04 20:14:16.681 ERROR (MainThread) [custom_components.audiconnect.audi_api] Unexpected error during request to URL: https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/vsr/v1/Audi/US/vehicles/WA1E2XXXXX1234567/requests. Error: 403, message='', url=URL('https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/vsr/v1/Audi/US/vehicles/WA1E2XXXXX1234567/requests')
Traceback (most recent call last):
  File "/config/custom_components/audiconnect/audi_api.py", line 66, in request
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='', url=URL('https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/vsr/v1/Audi/US/vehicles/WA1E2XXXXX1234567/requests')

coreywillwhat avatar Apr 05 '24 02:04 coreywillwhat

#389 addresses the 403 response and will disable the functionality until next HA reboot. This will prevent continuous attempts to access the service, and increase responsiveness.

coreywillwhat avatar Apr 17 '24 13:04 coreywillwhat

Still the same result for me with newest version :/

2024-04-18 17:53:06.496 ERROR (MainThread) [custom_components.audiconnect.util] Unable to start charger of vehicle xxx: 403, message='', url=URL('https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/Audi/DE/vehicles/xxx/charger/actions') 2024-04-18 17:53:46.494 ERROR (MainThread) [custom_components.audiconnect.util] Unable to stop charger of vehicle xxx: 403, message='', url=URL('https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/Audi/DE/vehicles/xxx/charger/actions')

devslash0 avatar Apr 18 '24 15:04 devslash0

This issue is stale because it has been open for 45 days with no activity. Are you still experiencing this issue?

github-actions[bot] avatar Jun 03 '24 02:06 github-actions[bot]

Still an issue

coreywillwhat avatar Jun 03 '24 03:06 coreywillwhat

Underlying issue of #330 or #227 is that they are tinkering on the authentication system. What you see here is the phased enforcement of it for each service. I'm sorry, but that's already all the information I can provide.

Edit: It seems they are now using a current implementation of OAuth 2.0 or at least that's what they are working on.

Sephyi avatar Jun 03 '24 13:06 Sephyi

hey, not sure if this is the same issue, but when i try and call this, it doesnt work?

i use both teh VIN of my car and the car ID, neitehr worked.

service: audiconnect.refresh_data
data:
  vin: "05b5567185ed9cbc"

or


service: audiconnect.refresh_data
data:
  vin: 05b5567185ed9cbc

JamieP83 avatar Jun 14 '24 19:06 JamieP83

Hi @JamieP83 On recent versions of this custom component there is no audiconnect.refresh_data. There is either audiconnect.refresh_cloud_data and audiconnect.refresh_vehicle_data. I do not have any issues with refresh_cloud_data. This issue is related to refresh_vehicle_data.

Seems like you may be on an older version prior to renaming to refresh_vehicle_data. In either instance the service is not currently working unfortunately.

coreywillwhat avatar Jun 14 '24 20:06 coreywillwhat

I also have to manually reload the integration to get my data refreshed. Calling the Audi Connect: Refresh Cloud Data service is not updating my data and also Audi Connect: Refresh Vehicle Data is not refreshing my data. The only thing that does is reloading the entire integration. On version 1.9.0 and HA core is version 2024.7.0 . It stopped working for a couple of weeks and versions, cannot get it to refresh automatically anymore.

maartenv86 avatar Jul 17 '24 19:07 maartenv86

Exactly same here... I was about to start a new issue when I found this one.

menloperk avatar Jul 21 '24 18:07 menloperk

Same here, Version 1.9.0 stop working a few weeks ago, when I restart the integration the values are refreshed. HA Core is 2024.7.4. In the log files every few minutes this message is shown

`2024-08-01 20:45:15.377 ERROR (MainThread) [custom_components.audiconnect.audi_services] Refresh token failed: 'access_token'

Restart the integration fixes the problem`

markushartmann avatar Aug 01 '24 19:08 markushartmann

This issue is stale because it has been open for 45 days with no activity. Are you still experiencing this issue?

github-actions[bot] avatar Sep 16 '24 02:09 github-actions[bot]

This issue is stale because it has been open for 45 days with no activity. Are you still experiencing this issue?

github-actions[bot] avatar Nov 11 '24 02:11 github-actions[bot]

This issue was closed because it has been inactive for 15 days since being marked as stale.

github-actions[bot] avatar Nov 26 '24 02:11 github-actions[bot]