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

Plugin stops working / no response after some time #973

Open
adrianscr opened this issue Oct 7, 2024 · 2 comments
Open

Plugin stops working / no response after some time #973

adrianscr opened this issue Oct 7, 2024 · 2 comments

Comments

@adrianscr
Copy link

First of all, thank you for your great work on the PSA Car Controller plugin! I am using it in my Home Assistant setup to monitor my vehicle, and it generally works well. However, I am encountering a recurring issue where the plugin stops functioning properly after a certain amount of time.


The Plugin works for a while after a fresh restart but eventually stops functioning properly. I've already fully reauthenticated the plugin, and OTP.

After restarting the plugin, it works for 1-2 days before the same issue reappeared.


The primary issue

after a certain amount of time, the plugin (also its web interface accessible at 127.0.0.1:5000) stops responding entirely.
When trying to access it, I only get a blank page.
Home Assistant also logs timeouts when attempting to access the resource, like:
Timeout when calling resource, http://127.0.0.1:5000/wakeup/VR3UHZxxxxxxxxxxx

It appears that the server crashes or freezes, even though the plugin continues logging information in the background.

Restarting the plugin temporarily resolves the issue, but it returns after some time.



Logs and Observations:

Looking at the logs, it seems that there are repeated RateLimitException errors, which might be part of the issue:
(The Log from earlier the day)

psa_car_controller.common.utils.RateLimitException
and

2024-10-07 12:55:45,320 :: 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 23, in wrapper
    raise RateLimitException
psa_car_controller.common.utils.RateLimitException

I left the plugin untouched all day today as a test and did not restart it, but I am seeing the following log entries in a loop:

2024-10-08 00:04:43,863 :: INFO :: Connected with result code {'session present': 0}
2024-10-08 00:04:43,865 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200009183831/#
2024-10-08 00:04:43,866 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VR3UHZxxxxxxxxxxx
2024-10-08 00:04:43,868 :: WARNING :: Disconnected with result code 5
2024-10-08 00:04:43,868 :: WARNING :: The connection was refused.

My log is now full of these entries. This suggests that the connection is being refused repeatedly. I suspect this might be contributing to the problem of the web server hanging or crashing, making it inaccessible.



Please let me know if you need any further information from me.

I hope we can solve the problem and thank you in advance :)



Environment:

  • OS: HomeAssistant on Raspberry Pi 4
    Core 2024.10.1 / Supervisor 2024.10.0 / Operating System 13.1 (same issue on older versions of HA)
  • Peugeot e208
  • Application version shows v3.5.3
@ixnoltix
Copy link

ixnoltix commented Oct 10, 2024

Hi,
unfortunately I have the same problem.
I don't know how to get the logs.
If needed please ask.

Environment:
HomeAssistant in Proxmox
Opel CorsaE
Current version: v3.5.3

Best regards,
Niko

@R-dehaan
Copy link

Same issue as here #961
Created a workaround by checking container health and restart, not great but at least no loss of functionality

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