Open edsub opened 1 month ago
Same here, preconditioning is not working for a few weeks already
I downgraded to 3.5.1 and now it works again
Same error, but can't dowgrade to 3.5.1 because mypeugeot.apk url changed : URL fetched by v3.5.1 during login : https://github.com/flobz/psa_apk/raw/main/mypeugeot.apk Actual url : https://github.com/flobz/psa_apk/blob/main/mypeugeot.apk.bz2
Describe the bug When I submit a "http://:5000/preconditioning/yyyy/1" the car does not respond at all. The car (e208 2022 model) does have a functioning preconditioning via the myPeugeot app.
The get_vehicleinfo API call gets me the data I want (doors_state appears to remain 'null' but that is a separate subject), but switching on / off the preconditioning (or door-lock) does not work and generates an error in the logs
To Reproduce submit a "http://:5000/preconditioning/yyyy/1" (with my VIN in it instead of yyyy ;-)
Config file
cat config.json { "abrp": { "abrp_enable_vin": [], "token": "" }, "client_id": "xxxxxxxxxxxxxx", "client_secret": "xxxxxxxxxxxxxx", "co2_signal_api": "xxxxxxxxxxxxxx", "country_code": "NL", "customer_id": "AP-ACNTxxxxxxxxxxxxxx", "proxies": { "http": "", "https": "" }, "realm": "clientsB2CPeugeot", "refresh_token": "xxxxxxxxxxxxxx", "remote_refresh_token": "xxxxxxxxxxxxxx", "weather_api": "xxxxxxxxxxxxxx"
Environment (please complete the following information):2024-10-19 13:28:00,150 :: INFO :: 192.168.1.52 - - [19/Oct/2024 13:28:00] "GET /get_vehicleinfo/yyyy HTTP/1.1" 200 - 2024-10-19 13:28:00,369 :: INFO :: 192.168.1.52 - - [19/Oct/2024 13:28:00] "GET /favicon.ico HTTP/1.1" 200 - 2024-10-19 13:29:41,659 :: INFO :: Preconditioning: topic: psa/RemoteServices/from/cid/AP-ACNT200007631251/ThermalPrecond: {'asap': 'activate', 'programs': {'program1': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program2': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program3': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program4': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}}} 2024-10-19 13:29:42,843 :: ERROR :: Exception on /preconditioning/yyyy/1 [GET] Traceback (most recent call last): File "/home/pi/.local/lib/python3.10/site-packages/flask/app.py", line 1473, in wsgi_app response = self.full_dispatch_request() File "/home/pi/.local/lib/python3.10/site-packages/flask/app.py", line 882, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/pi/.local/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request rv = self.dispatch_request() File "/home/pi/.local/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] File "/home/pi/.local/lib/python3.10/site-packages/psa_car_controller/web/view/api.py", line 89, in preconditioning return jsonify(APP.myp.remote_client.preconditioning(vin, activate)) File "/home/pi/.local/lib/python3.10/site-packages/psa_car_controller/psa/RemoteClient.py", line 252, in preconditioning self.publish(msg) File "/home/pi/.local/lib/python3.10/site-packages/psa_car_controller/psa/RemoteClient.py", line 139, in publish self._refresh_remote_token() File "/home/pi/.local/lib/python3.10/site-packages/psa_car_controller/psa/RemoteClient.py", line 179, in _refresh_remote_token self.mqtt_client.username_pw_set("IMA_OAUTH_ACCESS_TOKEN", self.remoteCredentials.access_token) AttributeError: 'NoneType' object has no attribute 'username_pw_set' 2024-10-19 13:29:42,843 :: ERROR :: Exception on /preconditioning/yyyy/1 [GET] Traceback (most recent call last): File "/home/pi/.local/lib/python3.10/site-packages/flask/app.py", line 1473, in wsgi_app response = self.full_dispatch_request() File "/home/pi/.local/lib/python3.10/site-packages/flask/app.py", line 882, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/pi/.local/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request rv = self.dispatch_request() File "/home/pi/.local/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] File "/home/pi/.local/lib/python3.10/site-packages/psa_car_controller/web/view/api.py", line 89, in preconditioning return jsonify(APP.myp.remote_client.preconditioning(vin, activate)) File "/home/pi/.local/lib/python3.10/site-packages/psa_car_controller/psa/RemoteClient.py", line 252, in preconditioning self.publish(msg) File "/home/pi/.local/lib/python3.10/site-packages/psa_car_controller/psa/RemoteClient.py", line 139, in publish self._refresh_remote_token() File "/home/pi/.local/lib/python3.10/site-packages/psa_car_controller/psa/RemoteClient.py", line 179, in _refresh_remote_token self.mqtt_client.username_pw_set("IMA_OAUTH_ACCESS_TOKEN", self.remoteCredentials.access_token) AttributeError: 'NoneType' object has no attribute 'username_pw_set' 2024-10-19 13:29:42,846 :: INFO :: 192.168.1.52 - - [19/Oct/2024 13:29:42] "[35m[1mGET /preconditioning/yyyy/1 HTTP/1.1[0m" 500 - 2024-10-19 13:29:43,249 :: INFO :: 192.168.1.52 - - [19/Oct/2024 13:29:43] "GET /favicon.ico HTTP/1.1" 200 - 2024-10-19 13:29:47,495 :: INFO :: save config change 2024-10-19 13:30:01,147 :: INFO :: 127.0.0.1 - - [19/Oct/2024 13:30:01] "GET /get_vehicleinfo/yyyy HTTP/1.1" 200 - 2024-10-19 13:30:08,345 :: INFO :: 192.168.1.52 - - [19/Oct/2024 13:30:08] "GET /config HTTP/1.1" 200 - 2024-10-19 13:30:08,413 :: INFO :: 192.168.1.52 - - [19/Oct/2024 13:30:08] "[36mGET /assets/99_custom_overides.css?m=1729108675.1199687 HTTP/1.1[0m" 304 - 2024-10-19 13:30:08,420 :: INFO :: 192.168.1.52 - - [19/Oct/2024 13:30:08] "[36mGET /assets/clientside.js?m=1729108675.1199687 HTTP/1.1[0m" 304 - 2024-10-19 13:30:08,838 :: INFO :: 192.168.1.52 - - [19/Oct/2024 13:30:08] "GET /_dash-layout HTTP/1.1" 200 - 2024-10-19 13:30:08,847 :: INFO :: 192.168.1.52 - - [19/Oct/2024 13:30:08] "GET /_dash-dependencies HTTP/1.1" 200 - 2024-10-19 13:30:08,855 :: INFO :: 192.168.1.52 - - [19/Oct/2024 13:30:08] "GET /_favicon.ico?v=2.18.1 HTTP/1.1" 200 -