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

Error 429 #81

Open
lakatusch opened this issue Aug 27, 2024 · 2 comments
Open

Error 429 #81

lakatusch opened this issue Aug 27, 2024 · 2 comments

Comments

@lakatusch
Copy link

lakatusch commented Aug 27, 2024

hi there,

have several errors in the log regarding error 429

024-08-27 19:11:21.080 ERROR (SyncWorker_37) [weconnect_cupra] Could not fetch data. Status Code was: 429

2024-08-27 20:18:07.167 ERROR (MainThread) [custom_components.cupra_we_connect] Unknown error while updating weconnect_cupra
Traceback (most recent call last):
  File "/config/custom_components/cupra_we_connect/__init__.py", line 52, in async_update_data
    await asyncio.wait_for(
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/weconnect_cupra/weconnect_cupra.py", line 176, in update
    self.__api.update(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force, selective=selective)
  File "/usr/local/lib/python3.12/site-packages/weconnect_cupra/api/cupra/api.py", line 39, in update
    self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force, selective=selective)
  File "/usr/local/lib/python3.12/site-packages/weconnect_cupra/api/cupra/api.py", line 67, in updateVehicles
    self.__vehicles[vin].update(
  File "/usr/local/lib/python3.12/site-packages/weconnect_cupra/api/cupra/elements/vehicle.py", line 207, in update
    self.updateStatus(updateCapabilities=updateCapabilities, force=force, selective=selective)
  File "/usr/local/lib/python3.12/site-packages/weconnect_cupra/api/cupra/elements/vehicle.py", line 237, in updateStatus
    'windowHeatingStatus': (WindowHeatingStatus, climatization_status_dict['windowHeatingStatus']),
                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'windowHeatingStatus'

2024-08-27 20:54:35.817 ERROR (SyncWorker_42) [weconnect_cupra] Failed to retrieve data for VIN VSS: Could not fetch data. Status Code was: 429
2024-08-27 20:54:35.817 ERROR (SyncWorker_42) [weconnect_cupra] Could not fetch data. Status Code was: 429

what is wrong / what do i wring?

thanks a lot and regards
Daniel

@delormejonathan
Copy link

Hello,

I experienced the same issue yesterday, with the official app also being blocked. To resolve it, I had to disable my integration and wait a couple of hours for the API to reauthorize.

This issue might be linked to the interval setting, which could be too aggressive:

update_interval=timedelta(seconds=30),

I modified my integration today to use a longer interval (1 hour). I'll let you know if this adjustment resolves the issue.

@aperezva
Copy link

aperezva commented Sep 3, 2024

I have the same problem every 30 minutes and info is not updating so often. I have to force it changing per example charge limit.

It’s not confidence integration and app too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants