audiconnect / audi_connect_ha

Adds an audi connect integration to home assistant
MIT License
236 stars 96 forks source link

"Refresh Vehicle Data" Not Working #330

Open coreywillwhat opened 7 months ago

coreywillwhat commented 7 months ago

_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:

Service Details:

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:

coreywillwhat commented 7 months ago

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 commented 6 months ago

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.

devslash0 commented 6 months ago

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')

github-actions[bot] commented 5 months ago

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

coreywillwhat commented 5 months ago

Still an issue

Sephyi commented 5 months ago

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.

JamieP83 commented 4 months ago

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
coreywillwhat commented 4 months ago

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.

maartenv86 commented 3 months ago

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.

menloperk commented 3 months ago

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

markushartmann commented 3 months ago

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`

github-actions[bot] commented 1 month ago

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