flobz / psa_car_controller

Control psa car with connected_car v4 API.
GNU General Public License v3.0
391 stars 199 forks source link

Information not retrieved. Error in the log file #543

Closed antro31 closed 1 year ago

antro31 commented 1 year ago

Describe the bug Information are not correctly retreived. (For example still stating that car is charging whereas it is unplugged).

To Reproduce Nothing specific, add on started. After a while, data are not updated any more. An error appears in the log.

Environment (please complete the following information): Home Assistant Add On - OS: [e.g. Windows] DS - DS7

2023-04-27 18:28:42,002 :: ERROR :: force_update:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/charge_control.py", line 70, in force_update
    self.psacc.remote_client.wakeup(self.vin)
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/common/utils.py", line 22, in wrapper
    raise RateLimitException
psa_car_controller.common.utils.RateLimitException

Additional context Maybe we could setup a rate limiter to avoid this?

flobz commented 1 year ago

This is a rate limit in the code.

flobz commented 1 year ago

Don't query too much the API.