flobz / psa_car_controller

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

Home Assistant add-on stops when submitting car details. #670

Closed mostlysimon closed 5 months ago

mostlysimon commented 7 months ago

Installed add-on, opened port 5000 in configuration, starts as expected. When the car log in details (Peugeot) are submitted it hangs for 10-20s, then the add-on stops.

Have tried restarting, reinstalling and on multiple days. Have confirmed log in details are correct on the Peugeot website.

Any suggestions would be great, thanks.

Home Assistant Core 2023.11.2 Supervisor 2023.11.3 Operating System 11.1 Frontend 20231030.2

Log: Containerised psa_car_controller loading... 2023-11-15 07:31:23,274 :: ERROR :: No config file 2023-11-15 07:31:23,288 :: WARNING :: Can't get language 2023-11-15 07:31:29,224 :: INFO :: update_data 2023-11-15 07:31:29,425 :: INFO :: * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) 2023-11-15 07:31:36,714 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:36] "GET / HTTP/1.1" 200 - 2023-11-15 07:31:36,803 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:36] "GET /assets/99_custom_overides.css HTTP/1.1" 200 - 2023-11-15 07:31:36,873 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:36] "GET /assets/clientside.js HTTP/1.1" 200 - 2023-11-15 07:31:37,161 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:37] "GET /_dash-layout HTTP/1.1" 200 - 2023-11-15 07:31:37,173 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:37] "GET /_dash-dependencies HTTP/1.1" 200 - 2023-11-15 07:31:37,262 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:37] "POST /_dash-update-component HTTP/1.1" 200 - 2023-11-15 07:31:37,328 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:37] "GET /assets/images/settings.svg HTTP/1.1" 200 - 2023-11-15 07:31:37,343 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:37] "GET /config_login HTTP/1.1" 200 - 2023-11-15 07:31:37,565 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:37] "GET /_dash-layout HTTP/1.1" 200 - 2023-11-15 07:31:37,577 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:37] "GET /_dash-dependencies HTTP/1.1" 200 - 2023-11-15 07:31:37,663 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:37] "POST /_dash-update-component HTTP/1.1" 200 - 2023-11-15 07:31:37,872 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:37] "POST /_dash-update-component HTTP/1.1" 200 - 2023-11-15 07:31:37,884 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:37] "POST /_dash-update-component HTTP/1.1" 204 - 2023-11-15 07:31:37,908 :: INFO :: 172.30.32.1 - - [15/Nov/2023 07:31:37] "POST /_dash-update-component HTTP/1.1" 204 - 2023-11-15 07:32:22,810 :: INFO :: Starting analysis on AndroidManifest.xml 2023-11-15 07:32:22,932 :: INFO :: Namespace mapping (56, 451) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-11-15 07:32:22,935 :: INFO :: Namespace mapping (56, 451) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-11-15 07:32:22,944 :: INFO :: Namespace mapping (56, 451) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-11-15 07:32:22,951 :: INFO :: Namespace mapping (56, 451) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-11-15 07:32:22,959 :: INFO :: Namespace mapping (56, 451) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-11-15 07:32:23,011 :: INFO :: Namespace mapping (56, 451) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-11-15 07:32:23,013 :: INFO :: Namespace mapping (56, 451) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-11-15 07:32:23,018 :: INFO :: Namespace mapping (56, 451) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-11-15 07:32:23,021 :: INFO :: Namespace mapping (56, 451) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-11-15 07:32:23,061 :: INFO :: Namespace mapping (56, 451) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. 2023-11-15 07:32:23,305 :: INFO :: APK file was successfully validated! 2023-11-15 07:32:23,317 :: WARNING :: Requested API level 33 is larger than maximum we have, returning API level 28 instead. /init.sh: line 5: 9 Killed psa-car-controller $ARGS

Mikado8231 commented 7 months ago

What is you version of docker image ?

Have you try to clean your /config folder & recreate docker container ?

JulienADD commented 7 months ago

Same issue #591

ssalorinne commented 7 months ago

I have the same issue, the add on just silently crashes shortly after submitting the login details.

ssalorinne commented 7 months ago

I too am running this on Rpi 3 with 1GB, however my memory usage peaks at 85% before the crash, so it is not just exhausting all available memory. Any ideas I could try next? I'd really like to get this running on the same HW.

ssalorinne commented 7 months ago

FWIW, by disabling all other plugins I was able to successfully setup the add-on. Seems to take roughly 200MB when running based on the HA memory monitoring. Also my logs have lines: 2023-12-12 19:02:37,586 :: ERROR :: Exception on /_dash-update-component [POST] Traceback (most recent call last): File "/usr/lib/python3/dist-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python3/dist-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python3/dist-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/lib/python3/dist-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python3/dist-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python3.9/dist-packages/dash/dash.py", line 1310, in dispatch ctx.run( File "/usr/local/lib/python3.9/dist-packages/dash/_callback.py", line 442, in add_context output_value = func(*func_args, **func_kwargs) # %% callback invoked %% File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/web/tools/Button.py", line 42, in call self._fct(self._element_id) 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

But I'm unsure if these are related to the limited memory or not.

flobz commented 5 months ago

It's memory related, you can stop other plugin during the setup and start them again after setup is finish maybe.

5kat3R commented 4 months ago

Just wanted to comment to this topic, that I had this issue with rpi 3+ 1GB. By disabling all the other addons and all the intergrations, I managed to free up enough memory to get through the login process. After that I could switch back on everything that was disabled and continue to use HA and PSACC normally.