Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Refresh Vehicle Data" Not Working #330

Open
coreywillwhat opened this issue Apr 4, 2024 · 13 comments
Open

"Refresh Vehicle Data" Not Working #330

coreywillwhat opened this issue Apr 4, 2024 · 13 comments
Labels
bug Something isn't working good first issue Good for newcomers stale

Comments

@coreywillwhat
Copy link
Contributor

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 fix: Request Vehicle Data #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
Copy link
Contributor Author

coreywillwhat commented Apr 5, 2024

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
Copy link
Contributor Author

#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
Copy link

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

Copy link

github-actions bot commented Jun 3, 2024

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

@github-actions github-actions bot added the stale label Jun 3, 2024
@coreywillwhat
Copy link
Contributor Author

Still an issue

@Sephyi
Copy link

Sephyi commented Jun 3, 2024

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
Copy link

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
Copy link
Contributor Author

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
Copy link

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
Copy link

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

@markushartmann
Copy link

markushartmann commented Aug 1, 2024

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`

Copy link

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

@github-actions github-actions bot added the stale label Sep 16, 2024
@cdnninja cdnninja removed the stale label Sep 27, 2024
Copy link

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

@github-actions github-actions bot added the stale label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers stale
Projects
None yet
Development

No branches or pull requests

8 participants