Closed vineethktpla closed 4 months ago
Same issue here the My Vauxhall app is working and PSA is showing my millage and battery status fine but the pre heat is throwing up the same error as everyone else.
Same here...
2024-04-24 17:22:44,902 :: ERROR :: Can't refresh remote token 'refresh_token' Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 167, in _refresh_remote_token self.remoteCredentials.refresh_token = data["refresh_token"] KeyError: 'refresh_token'
Same here, after this error, i can't limit the charge battery. Anyone with this error cant limit the % charge battery too?
2024-04-27 09:51:20,896 :: ERROR :: Can't refresh remote token 'refresh_token'
Traceback (most recent call last):
File "/Users/gomes/psa/venv/lib/python3.9/site-packages/psa_car_controller/psa/RemoteClient.py", line 167, in _refresh_remote_token
self.remoteCredentials.refresh_token = data["refresh_token"]
KeyError: 'refresh_token'
Yes, Nor activate heat/climate
cannot do nothing...same problems
I had the same error out of the blue again. I followed point 2 of this list: https://github.com/flobz/psa_car_controller/blob/master/FAQ.md I had to uninstall the app on my phone twice. But then it worked again. But only for one start of the pre-conditioning. That's how the log looks like:
2024-04-28 20:47:53,531 :: INFO ::
Your vehicles: ["{'vin': 'VR3UHZKXZPTXXXXXX', 'vehicle_id': '17e5a62808712139d137df34d98abb0c4c88b5948b65594089d51b3412d0dce16e12a07c1ae5522c02fe4fd26fa40262d50eca2a97c320e01ec1c2a6da3850625b270e48bfa1abd34', 'label': 'e-208', 'brand': 'Peugeot', 'abrp_name': 'peugeot:e208:20:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2024-04-28 20:47:53,531 :: INFO :: save config change
2024-04-28 20:47:53,531 :: INFO :: App version 3.5.0
2024-04-28 20:47:54,135 :: INFO :: ["{'vin': 'VR3UHZKXZPTXXXXXX', 'vehicle_id': '17e5a62808712139d137df34d98abb0c4c898387b10cdb790fa09b0af2205a6d5b6d7c4ceb324aca3468b5948b65594089d51b3412d0dce16e12a07c1ae5522c02fe4fd26fa40262d50eca2a97c320e01ec1c2a6da3850625b270e48bfa1abd34', 'label': 'e-208', 'brand': 'Peugeot', 'abrp_name': 'peugeot:e208:20:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2024-04-28 20:47:54,136 :: INFO :: save config change
2024-04-28 20:47:54,137 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:47:54] "[37mPOST /_dash-update-component HTTP/1.1[0m" 200 -
2024-04-28 20:47:55,494 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:47:55] "[37mGET /config_otp HTTP/1.1[0m" 200 -
2024-04-28 20:47:55,708 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:47:55] "[37mGET /_dash-layout HTTP/1.1[0m" 200 -
2024-04-28 20:47:55,720 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:47:55] "[37mGET /_dash-dependencies HTTP/1.1[0m" 200 -
2024-04-28 20:47:55,777 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:47:55] "[37mPOST /_dash-update-component HTTP/1.1[0m" 200 -
2024-04-28 20:47:56,134 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:47:56] "[37mGET /get_vehicleinfo/VR3UHZKXZPTXXXXXX?from_cache=1 HTTP/1.1[0m" 200 -
2024-04-28 20:47:56,136 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:47:56] "[37mPOST /_dash-update-component HTTP/1.1[0m" 200 -
2024-04-28 20:47:56,138 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:47:56] "[37mPOST /_dash-update-component HTTP/1.1[0m" 204 -
2024-04-28 20:47:56,140 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:47:56] "[37mPOST /_dash-update-component HTTP/1.1[0m" 204 -
2024-04-28 20:47:58,814 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:47:58] "[37mPOST /_dash-update-component HTTP/1.1[0m" 200 -
2024-04-28 20:48:02,897 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:02] "[37mGET /get_vehicleinfo/VR3UHZKXZPTXXXXXX?from_cache=1 HTTP/1.1[0m" 200 -
2024-04-28 20:48:20,100 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:20] "[37mGET /get_vehicleinfo/VR3UHZKXZPTXXXXXX?from_cache=1 HTTP/1.1[0m" 200 -
2024-04-28 20:48:20,119 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:20] "[37mGET /get_vehicleinfo/VR3UHZKXZPTXXXXXX?from_cache=1 HTTP/1.1[0m" 200 -
2024-04-28 20:48:20,189 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:20] "[37mGET /get_vehicleinfo/VR3UHZKXZPTXXXXXX?from_cache=1 HTTP/1.1[0m" 200 -
2024-04-28 20:48:23,617 :: ERROR :: remote_refresh_token isn't defined
2024-04-28 20:48:24,138 :: INFO :: save config change
2024-04-28 20:48:24,410 :: INFO :: save config change
2024-04-28 20:48:24,732 :: INFO :: ask wakeup to VR3UHZKXZPTXXXXXX
2024-04-28 20:48:24,733 :: INFO :: topic: psa/RemoteServices/from/cid/AP-ACNT200008447523/VehCharge/state: {'action': 'state'}
2024-04-28 20:48:24,831 :: INFO :: Connected with result code {'session present': 0}
2024-04-28 20:48:24,832 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200008447523/#
2024-04-28 20:48:24,832 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VR3UHZKXZPTXXXXXX
2024-04-28 20:48:25,041 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state/ProcessManagement b'{"process_date":"2024-04-28T20:48:25Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"ce650b7fb7ab468589d65a529b3c6caa20240428204824733","process_code":"900","process_message":"[process.900.request.accepted.key]"}'
2024-04-28 20:48:25,047 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:25] "[37mPOST /_dash-update-component HTTP/1.1[0m" 200 -
2024-04-28 20:48:25,177 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state/ProcessManagement b'{"process_date":"2024-04-28T20:48:25Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"ce650b7fb7ab468589d65a529b3c6caa20240428204824733","process_code":"901","process_message":"[process.901.vehicle.asleep.key]"}'
2024-04-28 20:48:25,822 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:25] "[37mGET /get_vehicleinfo/VR3UHZKXZPTXXXXXX?from_cache=1 HTTP/1.1[0m" 200 -
2024-04-28 20:48:26,337 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:26] "[37mGET / HTTP/1.1[0m" 200 -
2024-04-28 20:48:26,527 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:26] "[37mGET /_dash-layout HTTP/1.1[0m" 200 -
2024-04-28 20:48:26,545 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:26] "[37mGET /_dash-dependencies HTTP/1.1[0m" 200 -
2024-04-28 20:48:26,688 :: WARNING :: Failed to generate figure, there is probably not enough data yet
2024-04-28 20:48:26,691 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:26] "[37mPOST /_dash-update-component HTTP/1.1[0m" 200 -
2024-04-28 20:48:26,767 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:26] "[37mGET /control?header=false HTTP/1.1[0m" 200 -
2024-04-28 20:48:26,961 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:26] "[37mGET /_dash-layout HTTP/1.1[0m" 200 -
2024-04-28 20:48:26,966 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:26] "[37mGET /_dash-dependencies HTTP/1.1[0m" 200 -
2024-04-28 20:48:27,047 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:27] "[37mPOST /_dash-update-component HTTP/1.1[0m" 200 -
2024-04-28 20:48:42,824 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR3UHZKXZPTXXXXXX b'{"date":"2024-04-28T20:48:32Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program2":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program3":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program4":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]}},"asap":0,"status":0,"aff":1},"charging_state":{"program":{"hour":4,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":0,"soc_batt":94,"autonomy_zev":330,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VR3UHZKXZPTXXXXXX","reason":0,"signal_quality":3,"sev_stop_date":"2024-04-28T15:00:28Z","fds":["NXC01","NXO01","NXP01","NCG01","NXM01","NXJ01","NXE01","NXD01","NXR01","NAS01","NDR01","NXL01","NXK01","NXW01","NAE01","NXT01","NBM01","NXQ01","NXG01","NXH01","NXA01","NXN01","NXU01","NAO01"],"sev_state":0,"obj_counter":1,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":1,"superlock_state":0}'
2024-04-28 20:48:42,836 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR3UHZKXZPTXXXXXX b'{"date":"2024-04-28T20:48:33Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program2":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program3":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program4":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]}},"asap":0,"status":0,"aff":1},"charging_state":{"program":{"hour":4,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":0,"soc_batt":94,"autonomy_zev":330,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VR3UHZKXZPTXXXXXX","reason":3,"signal_quality":3,"sev_stop_date":"2024-04-28T15:00:28Z","fds":["NXC01","NXO01","NXP01","NCG01","NXM01","NXJ01","NXE01","NXD01","NXR01","NAS01","NDR01","NXL01","NXK01","NXW01","NAE01","NXT01","NBM01","NXQ01","NXG01","NXH01","NXA01","NXN01","NXU01","NAO01"],"sev_state":0,"obj_counter":2,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":1,"superlock_state":0}'
2024-04-28 20:48:42,958 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR3UHZKXZPTXXXXXX b'{"date":"2024-04-28T20:48:35Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program2":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program3":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program4":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]}},"asap":0,"status":0,"aff":1},"charging_state":{"program":{"hour":4,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":0,"soc_batt":94,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VR3UHZKXZPTXXXXXX","reason":4,"signal_quality":3,"sev_stop_date":"2024-04-28T15:00:28Z","fds":["NXC01","NXO01","NXP01","NCG01","NXM01","NXJ01","NXE01","NXD01","NXR01","NAS01","NDR01","NXL01","NXK01","NXW01","NAE01","NXT01","NBM01","NXQ01","NXG01","NXH01","NXA01","NXN01","NXU01","NAO01"],"sev_state":0,"obj_counter":3,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":1,"superlock_state":0}'
2024-04-28 20:48:42,995 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state/ProcessManagement b'{"process_date":"2024-04-28T20:48:42Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"ce650b7fb7ab468589d65a529b3c6caa20240428204824733","process_code":"903","process_message":"[process.903.request.forwarded.to.vehicle.key]"}'
2024-04-28 20:48:43,794 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state b'{"resp_date":"2024-04-28T20:48:43Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"ce650b7fb7ab468589d65a529b3c6caa20240428204824733","return_code":"0"}'
2024-04-28 20:48:46,918 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR3UHZKXZPTXXXXXX b'{"date":"2024-04-28T20:48:42Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program2":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program3":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program4":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]}},"asap":0,"status":0,"aff":1},"charging_state":{"program":{"hour":4,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":0,"soc_batt":94,"autonomy_zev":330,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VR3UHZKXZPTXXXXXX","reason":4,"signal_quality":2,"sev_stop_date":"2024-04-28T15:00:28Z","fds":["NXC01","NXO01","NXP01","NCG01","NXM01","NXJ01","NXE01","NXD01","NXR01","NAS01","NDR01","NXL01","NXK01","NXW01","NAE01","NXT01","NBM01","NXQ01","NXG01","NXH01","NXA01","NXN01","NXU01","NAO01"],"sev_state":0,"obj_counter":4,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":1,"superlock_state":0}'
2024-04-28 20:48:55,824 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:55] "[37mGET /get_vehicleinfo/VR3UHZKXZPTXXXXXX?from_cache=1 HTTP/1.1[0m" 200 -
2024-04-28 20:48:55,916 :: INFO :: Preconditioning: topic: psa/RemoteServices/from/cid/AP-ACNT200008447523/ThermalPrecond: {'asap': 'activate', 'programs': {'program1': {'hour': 34, 'minute': 7, 'on': 0, 'day': [0, 0, 0, 0, 0, 0, 0]}, 'program2': {'hour': 34, 'minute': 7, 'on': 0, 'day': [0, 0, 0, 0, 0, 0, 0]}, 'program3': {'hour': 34, 'minute': 7, 'on': 0, 'day': [0, 0, 0, 0, 0, 0, 0]}, 'program4': {'hour': 34, 'minute': 7, 'on': 0, 'day': [0, 0, 0, 0, 0, 0, 0]}}}
2024-04-28 20:48:55,918 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:55] "[37mGET /preconditioning/VR3UHZKXZPTXXXXXX/1 HTTP/1.1[0m" 200 -
2024-04-28 20:48:55,932 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:48:55] "[37mGET /get_vehicleinfo/VR3UHZKXZPTXXXXXX?from_cache=1 HTTP/1.1[0m" 200 -
2024-04-28 20:48:56,168 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/ThermalPrecond/ProcessManagement b'{"process_date":"2024-04-28T20:48:56Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"8c068143b67948ba97d7efe8e7a271eb20240428204855917","process_code":"900","process_message":"[process.900.request.accepted.key]"}'
2024-04-28 20:48:56,189 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/ThermalPrecond/ProcessManagement b'{"process_date":"2024-04-28T20:48:56Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"8c068143b67948ba97d7efe8e7a271eb20240428204855917","process_code":"903","process_message":"[process.903.request.forwarded.to.vehicle.key]"}'
2024-04-28 20:48:56,672 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/ThermalPrecond b'{"resp_date":"2024-04-28T20:48:56Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"8c068143b67948ba97d7efe8e7a271eb20240428204855917","return_code":"0"}'
2024-04-28 20:49:02,898 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:49:02] "[37mGET /get_vehicleinfo/VR3UHZKXZPTXXXXXX?from_cache=1 HTTP/1.1[0m" 200 -
2024-04-28 20:49:03,254 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR3UHZKXZPTXXXXXX b'{"date":"2024-04-28T20:48:59Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program2":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program3":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program4":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]}},"asap":1,"status":1,"aff":1},"charging_state":{"program":{"hour":4,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":0,"soc_batt":94,"autonomy_zev":330,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VR3UHZKXZPTXXXXXX","reason":3,"signal_quality":2,"sev_stop_date":"2024-04-28T15:00:28Z","fds":["NXC01","NXO01","NXP01","NCG01","NXM01","NXJ01","NXE01","NXD01","NXR01","NAS01","NDR01","NXL01","NXK01","NXW01","NAE01","NXT01","NBM01","NXQ01","NXG01","NXH01","NXA01","NXN01","NXU01","NAO01"],"sev_state":0,"obj_counter":5,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":1,"superlock_state":0}'
2024-04-28 20:50:25,508 :: INFO :: new position recorded for VR3UHZKXZPTXXXXXX
2024-04-28 20:50:25,508 :: INFO :: update_data
2024-04-28 20:52:05,261 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:52:05] "[37mGET / HTTP/1.1[0m" 200 -
2024-04-28 20:52:05,482 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:52:05] "[37mGET /_dash-layout HTTP/1.1[0m" 200 -
2024-04-28 20:52:05,492 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:52:05] "[37mGET /_dash-dependencies HTTP/1.1[0m" 200 -
2024-04-28 20:52:05,629 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:52:05] "[37mPOST /_dash-update-component HTTP/1.1[0m" 200 -
2024-04-28 20:52:05,646 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:52:05] "[37mGET /_favicon.ico?v=2.16.1 HTTP/1.1[0m" 200 -
2024-04-28 20:52:05,692 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:52:05] "[37mGET /control?header=false HTTP/1.1[0m" 200 -
2024-04-28 20:52:05,903 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:52:05] "[37mGET /_dash-dependencies HTTP/1.1[0m" 200 -
2024-04-28 20:52:05,904 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:52:05] "[37mGET /_dash-layout HTTP/1.1[0m" 200 -
2024-04-28 20:52:05,943 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:52:05] "[37mPOST /_dash-update-component HTTP/1.1[0m" 200 -
2024-04-28 20:52:13,896 :: INFO :: Preconditioning: topic: psa/RemoteServices/from/cid/AP-ACNT200008447523/ThermalPrecond: {'asap': 'deactivate', 'programs': {'program1': {'hour': 34, 'minute': 7, 'on': 0, 'day': [0, 0, 0, 0, 0, 0, 0]}, 'program2': {'hour': 34, 'minute': 7, 'on': 0, 'day': [0, 0, 0, 0, 0, 0, 0]}, 'program3': {'hour': 34, 'minute': 7, 'on': 0, 'day': [0, 0, 0, 0, 0, 0, 0]}, 'program4': {'hour': 34, 'minute': 7, 'on': 0, 'day': [0, 0, 0, 0, 0, 0, 0]}}}
2024-04-28 20:52:13,898 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:52:13] "[37mGET /preconditioning/VR3UHZKXZPTXXXXXX/0 HTTP/1.1[0m" 200 -
2024-04-28 20:52:13,913 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:52:13] "[37mGET /get_vehicleinfo/VR3UHZKXZPTXXXXXX?from_cache=1 HTTP/1.1[0m" 200 -
2024-04-28 20:52:14,127 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/ThermalPrecond/ProcessManagement b'{"process_date":"2024-04-28T20:52:14Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"26e3ff0052874062a5461f908d6a2eaa20240428205213897","process_code":"900","process_message":"[process.900.request.accepted.key]"}'
2024-04-28 20:52:14,270 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/ThermalPrecond/ProcessManagement b'{"process_date":"2024-04-28T20:52:14Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"26e3ff0052874062a5461f908d6a2eaa20240428205213897","process_code":"901","process_message":"[process.901.vehicle.asleep.key]"}'
2024-04-28 20:52:21,211 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state/ProcessManagement b'{"process_date":"2024-04-28T20:52:21Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"ce94fa7c4a8946159b26d333eb20a4a120240428225220496","process_code":"900","process_message":"[process.900.request.accepted.key]"}'
2024-04-28 20:52:21,332 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state/ProcessManagement b'{"process_date":"2024-04-28T20:52:21Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"ce94fa7c4a8946159b26d333eb20a4a120240428225220496","process_code":"901","process_message":"[process.901.vehicle.asleep.key]"}'
2024-04-28 20:52:59,258 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/ThermalPrecond/ProcessManagement b'{"process_date":"2024-04-28T20:52:59Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"26e3ff0052874062a5461f908d6a2eaa20240428205213897","process_code":"903","process_message":"[process.903.request.forwarded.to.vehicle.key]"}'
2024-04-28 20:52:59,258 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state/ProcessManagement b'{"process_date":"2024-04-28T20:52:59Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"ce94fa7c4a8946159b26d333eb20a4a120240428225220496","process_code":"903","process_message":"[process.903.request.forwarded.to.vehicle.key]"}'
2024-04-28 20:53:36,727 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/ThermalPrecond b'{"resp_date":"2024-04-28T20:53:36Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"26e3ff0052874062a5461f908d6a2eaa20240428205213897","return_code":"300"}'
2024-04-28 20:53:36,728 :: ERROR :: 300 : ?
2024-04-28 20:53:36,744 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state b'{"resp_date":"2024-04-28T20:53:36Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"ce94fa7c4a8946159b26d333eb20a4a120240428225220496","return_code":"300"}'
2024-04-28 20:53:36,744 :: ERROR :: 300 : ?
2024-04-28 20:54:03,360 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state/ProcessManagement b'{"process_date":"2024-04-28T20:54:03Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"163b97141dd04c8e9b00bef28c9df72020240428225402540","process_code":"900","process_message":"[process.900.request.accepted.key]"}'
2024-04-28 20:54:03,380 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state/ProcessManagement b'{"process_date":"2024-04-28T20:54:03Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"163b97141dd04c8e9b00bef28c9df72020240428225402540","process_code":"903","process_message":"[process.903.request.forwarded.to.vehicle.key]"}'
2024-04-28 20:54:03,757 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state b'{"resp_date":"2024-04-28T20:54:03Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"163b97141dd04c8e9b00bef28c9df72020240428225402540","return_code":"0"}'
2024-04-28 20:54:06,800 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR3UHZKXZPTXXXXXX b'{"date":"2024-04-28T20:54:02Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program2":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program3":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program4":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]}},"asap":1,"status":1,"aff":1},"charging_state":{"program":{"hour":4,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":0,"soc_batt":94,"autonomy_zev":330,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VR3UHZKXZPTXXXXXX","reason":4,"signal_quality":3,"sev_stop_date":"2024-04-28T15:00:28Z","fds":["NXC01","NXO01","NXP01","NCG01","NXM01","NXJ01","NXE01","NXD01","NXR01","NAS01","NDR01","NXL01","NXK01","NXW01","NAE01","NXT01","NBM01","NXQ01","NXG01","NXH01","NXA01","NXN01","NXU01","NAO01"],"sev_state":0,"obj_counter":6,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":1,"superlock_state":0}'
2024-04-28 20:54:25,530 :: INFO :: new position recorded for VR3UHZKXZPTXXXXXX
2024-04-28 20:54:25,791 :: INFO :: update_data
2024-04-28 20:54:33,037 :: INFO :: Preconditioning: topic: psa/RemoteServices/from/cid/AP-ACNT200008447523/ThermalPrecond: {'asap': 'deactivate', 'programs': {'program1': {'hour': 34, 'minute': 7, 'on': 0, 'day': [0, 0, 0, 0, 0, 0, 0]}, 'program2': {'hour': 34, 'minute': 7, 'on': 0, 'day': [0, 0, 0, 0, 0, 0, 0]}, 'program3': {'hour': 34, 'minute': 7, 'on': 0, 'day': [0, 0, 0, 0, 0, 0, 0]}, 'program4': {'hour': 34, 'minute': 7, 'on': 0, 'day': [0, 0, 0, 0, 0, 0, 0]}}}
2024-04-28 20:54:33,038 :: INFO :: 172.17.0.1 - - [28/Apr/2024 20:54:33] "[37mGET /preconditioning/VR3UHZKXZPTXXXXXX/0 HTTP/1.1[0m" 200 -
2024-04-28 20:54:33,132 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/ThermalPrecond/ProcessManagement b'{"process_date":"2024-04-28T20:54:33Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"32c92e78174847cb8f7d31825504e0c920240428205433037","process_code":"900","process_message":"[process.900.request.accepted.key]"}'
2024-04-28 20:54:33,152 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/ThermalPrecond/ProcessManagement b'{"process_date":"2024-04-28T20:54:33Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"32c92e78174847cb8f7d31825504e0c920240428205433037","process_code":"903","process_message":"[process.903.request.forwarded.to.vehicle.key]"}'
2024-04-28 20:54:37,734 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/ThermalPrecond b'{"resp_date":"2024-04-28T20:54:37Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"32c92e78174847cb8f7d31825504e0c920240428205433037","return_code":"0"}'
2024-04-28 20:54:38,080 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR3UHZKXZPTXXXXXX b'{"date":"2024-04-28T20:54:33Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program2":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program3":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program4":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]}},"asap":0,"status":0,"aff":1},"charging_state":{"program":{"hour":4,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":0,"soc_batt":94,"autonomy_zev":330,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VR3UHZKXZPTXXXXXX","reason":3,"signal_quality":3,"sev_stop_date":"2024-04-28T15:00:28Z","fds":["NXC01","NXO01","NXP01","NCG01","NXM01","NXJ01","NXE01","NXD01","NXR01","NAS01","NDR01","NXL01","NXK01","NXW01","NAE01","NXT01","NBM01","NXQ01","NXG01","NXH01","NXA01","NXN01","NXU01","NAO01"],"sev_state":0,"obj_counter":7,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":1,"superlock_state":0}'
2024-04-28 20:56:25,647 :: INFO :: new position recorded for VR3UHZKXZPTXXXXXX
2024-04-28 20:56:25,928 :: INFO :: update_data
2024-04-28 21:01:59,826 :: INFO :: ask wakeup to VR3UHZKXZPTXXXXXX
2024-04-28 21:01:59,826 :: INFO :: topic: psa/RemoteServices/from/cid/AP-ACNT200008447523/VehCharge/state: {'action': 'state'}
2024-04-28 21:01:59,828 :: INFO :: 172.17.0.1 - - [28/Apr/2024 21:01:59] "[37mGET /wakeup/VR3UHZKXZPTXXXXXX HTTP/1.1[0m" 200 -
2024-04-28 21:01:59,838 :: INFO :: ask wakeup to VR3UHZKXZPTXXXXXX
2024-04-28 21:01:59,839 :: INFO :: topic: psa/RemoteServices/from/cid/AP-ACNT200008447523/VehCharge/state: {'action': 'state'}
2024-04-28 21:01:59,840 :: INFO :: 172.17.0.1 - - [28/Apr/2024 21:01:59] "[37mGET /wakeup/VR3UHZKXZPTXXXXXX HTTP/1.1[0m" 200 -
2024-04-28 21:01:59,924 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state b'{"resp_date":"2024-04-28T21:01:59Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"1a115575fe6341bf9ef6827d4a08d41220240428210159839","return_code":"502","reason":"[duplicate.message.key]"}'
2024-04-28 21:01:59,924 :: ERROR :: 502 : [duplicate.message.key]
2024-04-28 21:02:00,084 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state/ProcessManagement b'{"process_date":"2024-04-28T21:02:00Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"cb698cf7c8804eda9266f068a513fdb020240428210159827","process_code":"900","process_message":"[process.900.request.accepted.key]"}'
2024-04-28 21:02:00,185 :: INFO :: 172.17.0.1 - - [28/Apr/2024 21:02:00] "[37mGET /favicon.ico HTTP/1.1[0m" 200 -
2024-04-28 21:02:00,268 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state/ProcessManagement b'{"process_date":"2024-04-28T21:02:00Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"cb698cf7c8804eda9266f068a513fdb020240428210159827","process_code":"901","process_message":"[process.901.vehicle.asleep.key]"}'
2024-04-28 21:02:46,174 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR3UHZKXZPTXXXXXX b'{"date":"2024-04-28T21:02:11Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program2":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program3":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program4":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]}},"asap":0,"status":0,"aff":1},"charging_state":{"program":{"hour":4,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":0,"soc_batt":94,"autonomy_zev":330,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VR3UHZKXZPTXXXXXX","reason":3,"signal_quality":2,"sev_stop_date":"2024-04-28T15:00:28Z","fds":["NXC01","NXO01","NXP01","NCG01","NXM01","NXJ01","NXE01","NXD01","NXR01","NAS01","NDR01","NXL01","NXK01","NXW01","NAE01","NXT01","NBM01","NXQ01","NXG01","NXH01","NXA01","NXN01","NXU01","NAO01"],"sev_state":0,"obj_counter":2,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":1,"superlock_state":0}'
2024-04-28 21:02:46,186 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR3UHZKXZPTXXXXXX b'{"date":"2024-04-28T21:02:06Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program2":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program3":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program4":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]}},"asap":0,"status":0,"aff":1},"charging_state":{"program":{"hour":4,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":0,"soc_batt":94,"autonomy_zev":330,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VR3UHZKXZPTXXXXXX","reason":0,"signal_quality":2,"sev_stop_date":"2024-04-28T15:00:28Z","fds":["NXC01","NXO01","NXP01","NCG01","NXM01","NXJ01","NXE01","NXD01","NXR01","NAS01","NDR01","NXL01","NXK01","NXW01","NAE01","NXT01","NBM01","NXQ01","NXG01","NXH01","NXA01","NXN01","NXU01","NAO01"],"sev_state":0,"obj_counter":1,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":1,"superlock_state":0}'
2024-04-28 21:02:47,115 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR3UHZKXZPTXXXXXX b'{"date":"2024-04-28T21:02:12Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program2":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program3":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program4":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]}},"asap":0,"status":0,"aff":1},"charging_state":{"program":{"hour":4,"minute":0},"available":1,"remaining_time":635,"rate":0,"cable_detected":0,"soc_batt":94,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VR3UHZKXZPTXXXXXX","reason":4,"signal_quality":2,"sev_stop_date":"2024-04-28T15:00:28Z","fds":["NXC01","NXO01","NXP01","NCG01","NXM01","NXJ01","NXE01","NXD01","NXR01","NAS01","NDR01","NXL01","NXK01","NXW01","NAE01","NXT01","NBM01","NXQ01","NXG01","NXH01","NXA01","NXN01","NXU01","NAO01"],"sev_state":0,"obj_counter":3,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":1,"superlock_state":0}'
2024-04-28 21:02:47,116 :: WARNING :: charge begin but API isn't updated
2024-04-28 21:03:47,176 :: INFO :: ask wakeup to VR3UHZKXZPTXXXXXX
2024-04-28 21:03:47,177 :: INFO :: topic: psa/RemoteServices/from/cid/AP-ACNT200008447523/VehCharge/state: {'action': 'state'}
2024-04-28 21:03:48,039 :: ERROR :: Can't refresh remote token 'refresh_token'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 167, in _refresh_remote_token
self.remoteCredentials.refresh_token = data["refresh_token"]
KeyError: 'refresh_token'
2024-04-28 21:03:54,153 :: INFO :: save config change
2024-04-28 21:04:25,773 :: INFO :: new position recorded for VR3UHZKXZPTXXXXXX
2024-04-28 21:04:26,756 :: INFO :: update_data
2024-04-28 21:04:48,099 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state/ProcessManagement b'{"process_date":"2024-04-28T21:02:47Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"cb698cf7c8804eda9266f068a513fdb020240428210159827","process_code":"903","process_message":"[process.903.request.forwarded.to.vehicle.key]"}'
2024-04-28 21:04:48,100 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/AP-ACNT200008447523/VehCharge/state b'{"resp_date":"2024-04-28T21:03:06Z","vin":"VR3UHZKXZPTXXXXXX","correlation_id":"cb698cf7c8804eda9266f068a513fdb020240428210159827","return_code":"300"}'
2024-04-28 21:04:48,100 :: ERROR :: 300 : ?
2024-04-28 21:04:48,101 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR3UHZKXZPTXXXXXX b'{"date":"2024-04-28T21:03:09Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program2":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program3":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program4":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]}},"asap":0,"status":0,"aff":1},"charging_state":{"program":{"hour":4,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":0,"soc_batt":94,"autonomy_zev":330,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VR3UHZKXZPTXXXXXX","reason":4,"signal_quality":3,"sev_stop_date":"2024-04-28T15:00:28Z","fds":["NXC01","NXO01","NXP01","NCG01","NXM01","NXJ01","NXE01","NXD01","NXR01","NAS01","NDR01","NXL01","NXK01","NXW01","NAE01","NXT01","NBM01","NXQ01","NXG01","NXH01","NXA01","NXN01","NXU01","NAO01"],"sev_state":0,"obj_counter":4,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":1,"superlock_state":0}'
2024-04-28 21:04:48,101 :: WARNING :: Disconnected with result code 1
2024-04-28 21:04:48,662 :: ERROR :: Can't refresh remote token 'refresh_token'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 167, in _refresh_remote_token
self.remoteCredentials.refresh_token = data["refresh_token"]
KeyError: 'refresh_token'
2024-04-28 21:05:49,871 :: WARNING :: Disconnected with result code 1
2024-04-28 21:05:51,064 :: INFO :: token expired, renew
2024-04-28 21:05:51,065 :: ERROR :: can't refresh_remote_token: {'httpCode': '401', 'httpMessage': 'Unauthorized', 'moreInformation': 'Cannot pass the security checks that are required by the target API or operation, Enable debug headers for more details.'}
Create a new one
2024-04-28 21:05:52,335 :: INFO :: token expired, renew
2024-04-28 21:05:52,335 :: ERROR :: Can't refresh remote token 'access_token'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 174, in _refresh_remote_token
self._get_remote_access_token(otp_code)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 206, in _get_remote_access_token
self.remoteCredentials.access_token = data["access_token"]
KeyError: 'access_token'
2024-04-28 21:05:54,155 :: INFO :: save config change
2024-04-28 21:06:25,492 :: ERROR :: refresh_vehicle_info:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/oauth.py", line 107, in call_api
return self._ApiClient__call_api(resource_path, method,
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api_client.py", line 157, in __call_api
response_data = self.request(
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api_client.py", line 347, in request
return self.rest_client.GET(url,
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/rest.py", line 234, in GET
return self.request("GET", url,
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/rest.py", line 228, in request
raise ApiException(http_resp=r)
psa_car_controller.psa.connected_car_api.rest.ApiException: (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'X-Client-IP': '10.128.30.239', 'X-Global-Transaction-ID': '32486679662eba51fa096a3d', 'Date': 'Sun, 28 Apr 2024 21:06:25 GMT', 'Connection': 'close', 'Set-Cookie': 'PSACountry=DE; Domain=.groupe-psa.com; Path=/', 'Vary': 'Accept-Encoding'})
HTTP response body: {"httpCode":"401","httpMessage":"Unauthorized","moreInformation":"Invalid client id or secret."}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
self.get_vehicle_info(car.vin)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 107, in get_vehicle_info
res = self.api().get_vehicle_status(car.vehicle_id)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api/vehicles_api.py", line 1229, in get_vehicle_status
(data) = self.get_vehicle_status_with_http_info(id, **kwargs) # noqa: E501
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api/vehicles_api.py", line 1293, in get_vehicle_status_with_http_info
return self.api_client.call_api(
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/oauth.py", line 123, in call_api
self.configuration.refresh_callback()
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
2024-04-28 21:06:54,157 :: INFO :: save config change
2024-04-28 21:06:54,543 :: WARNING :: Disconnected with result code 1
2024-04-28 21:06:54,544 :: ERROR :: Can't refresh remote token
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 155, in _refresh_remote_token
self.manager.refresh_token_now()
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
Does anyone found a workaround for this problem? Still getting "Can't refresh remote token 'refresh_token'"
Just my personal experience, just in, case it helps anyone, I do not pretend I understand the issue.
I had the refresh token error, but still got data so I ignored it, until a couple days ago. I stopped getting data altogether, resulting in no more data received and lots of errors in the logs. I redid the entire authentication process several times today. It seemed to go ok but in the end I still had issues.
after some retries, it settled on this "warning"
24-04-30 02:14:18,521 :: INFO :: Connected with result code {'session present': 0}
2024-04-30 02:14:18,521 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT2000085xxxxxx/#
2024-04-30 02:14:18,521 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VF3M4DGZUxxxxxxxxxx
2024-04-30 02:14:18,522 :: WARNING :: Disconnected with result code 5
2024-04-30 02:14:18,522 :: WARNING :: The connection was refused.
still no data.but no "real" errors either. I guessed it was maybe a "too many errors/attempts please wait 10m" type thing, so I shut down psacc completly (docker image) waited ~1h and started it back up. It's been working ok since ( haven't tried sending commands; just receiveng data)
There's obviously a problem with, at least, MyPeugeot app (servers) reading the comments: https://play.google.com/store/apps/details?id=com.psa.mym.mypeugeot&hl=en&gl=US
Just my personal experience, just in, case it helps anyone, I do not pretend I understand the issue.
I had the refresh token error, but still got data so I ignored it, until a couple days ago. I stopped getting data altogether, resulting in no more data received and lots of errors in the logs. I redid the entire authentication process several times today. It seemed to go ok but in the end I still had issues.
after some retries, it settled on this "warning"
24-04-30 02:14:18,521 :: INFO :: Connected with result code {'session present': 0} 2024-04-30 02:14:18,521 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT2000085xxxxxx/# 2024-04-30 02:14:18,521 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VF3M4DGZUxxxxxxxxxx 2024-04-30 02:14:18,522 :: WARNING :: Disconnected with result code 5 2024-04-30 02:14:18,522 :: WARNING :: The connection was refused.
still no data.but no "real" errors either. I guessed it was maybe a "too many errors/attempts please wait 10m" type thing, so I shut down psacc completly (docker image) waited ~1h and started it back up. It's been working ok since ( haven't tried sending commands; just receiveng data)
It seems to be the sending commands that causes the problem. If I restart then I get data but any commands being sent seems to break it again with the token refresh issue. I will try stopping and waiting instead of restarting to see if that makes a difference but I'm not convinced this will help.
Getting the data was never a problem for me. Just the remote commands won't work.
Getting the data was never a problem for me. Just the remote commands won't work.
This is true, but car wake up is also a command, maybe you have the automation to send it periodically.
Getting the data was never a problem for me. Just the remote commands won't work.
This is true, but car wake up is also a command, maybe you have the automation to send it periodically.
Wakeup, stop/start charge, precondition won't work. But data like battery, odometer etc.. updates properly. That is the reason why I raised this issue.
And without wakeup you won't get updated battery information while charging.
And without wakeup you won't get updated battery information while charging.
This is true. I follow this workaround for this issue ( https://github.com/flobz/psa_car_controller/issues/851#issuecomment-2067947832 ) and works well but little frustrating to do it every now and then
my car (Opel) wont charge (initiated by wallbox) without waking it up. I charge on dynamic energy prices, so the wakeup function is part of my HASS automation (and now not working). I can wake it up using te keyfob (unlocking and locking it), but can't automate that ;-)
Really frustrating...
MyPeugeot app is asking for the 4 digit security code everytime now for remote commands. Did they introduced any code requirements for sending remote commands, and is that the reason why our psacc remote commands are failing or unable to get refresh tokens ?
I have been noticing the same behaviour ^^
I regularly have been asking for the pin, when I force a refresh the main screen oder loading status page, even before I installed psa_car_controller ;-)
I might be wrong, but I guess this is a incorrect reaction of the app to the server rate limit response.
Last month I wasn't able to refresh status form android app, It just didn't work but I was able to start or stop charging from app. Today app for android was updated and it looks like refreshing from app is again working (without pin).
edit. Nevermind, app is showing success but not refreshing status or time of last sync.
my car (Opel) wont charge (initiated by wallbox) without waking it up. I charge on dynamic energy prices, so the wakeup function is part of my HASS automation (and now not working). I can wake it up using te keyfob (unlocking and locking it), but can't automate that ;-)
Really frustrating...
I have this same issue so was using HA automation as well. The wake up command still times out with the token refresh issue for me as of this morning. It doesn't look like any of the clever developers are looking at this problem.
@flobz apparently the guys at evcc added the new token stuff, however the use isn't clear to me (only to get data imo). It's also said that they seem to have discussed with you the use of the access token VS the refresh token? Maybe something that needs to be looked into concerning this issue ?
See https://github.com/evcc-io/evcc/pull/13612#issuecomment-2081408733
Hi @flobz, you are unusally quite even though the recent changes of Stellantis makes your great piece of software partly useless. Shall we try to make some noise at the support hotlines and see if a bigger crowd might make some difference?
my car (Opel) wont charge (initiated by wallbox) without waking it up. I charge on dynamic energy prices, so the wakeup function is part of my HASS automation (and now not working). I can wake it up using te keyfob (unlocking and locking it), but can't automate that ;-)
Really frustrating...
I also use the refresh in my charge automation to go to a specific threshold (avoid going to 100%). Changed my automation yesterday in order to use the "time remaining" to calculate the time needed to go to X %. I then wait and stop the charge using my wallbox at the time given and check again if the % is ok.
Not perfect but apparently worked.
same for me. I freshly installed the psa-cc on proxmox. i get for my Citroen this error after the onboarding process was completed:
root@testpython:~# psa-car-controller -l 192.168.12.176 --web-conf
2024-05-10 10:09:26,574 :: INFO :: App version 3.5.0
2024-05-10 10:09:27,600 :: INFO :: ["{'vin': 'VR7BXXXXXXXXXXXX', 'vehicle_id': '11b1db207fc8045258e49aa6b755a80e1c4599a5cda6d4ad8bd49f888d3bcc68bb78cd89e3fecf509b5c1d5ae34j0sdfgiadsjfa0d85e8a31d89fd2e8f0924384e12f0ecdeff911e7e41e094e866a418b5afb11272a9546cec2339620f70750b7', 'label': 'E-C4', 'brand': 'Citroën', 'abrp_name': 'citroen:ec4:21:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2024-05-10 10:09:28,246 :: ERROR :: Can't refresh remote token 'refresh_token'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/psa_car_controller/psa/RemoteClient.py", line 167, in _refresh_remote_token
self.remoteCredentials.refresh_token = data["refresh_token"]
KeyError: 'refresh_token'
Dear psa_car_controller users, in my case it currently works with the following workaround:
close psa_car_controller
change line 170 in psa_car_controller/psa/remoteClient.py in the following way:
self.remoteCredentials.refresh_token = ' '
(original code: self.remoteCredentials.refresh_token = data["refresh_token"])
I did the modification on April 28th and since then it has been working most of the time. It refreshes SOC, so charge limit will work. Waking up the car also works.
P.S.: @flobz : Great piece of work, your car controller! - I love it.
Hack Working for me but, i have need to set this variable with my refresh_token find in my config.json file.
i think when the token was dead you need to remake user config and otp config. check your config.json file and update psa_car_controller/psa/remoteClient.py with the new remote token
For HomeAssistant User no hack because can't acces to psa_car_controller/psa/remoteClient.py
Good job @jokraem !
Hack Working for me but, i have need to set this variable with my refresh_token find in my config.json file.
i think when the token was dead you need to remake user config and otp config. check your config.json file and update psa_car_controller/psa/remoteClient.py with the new remote token
For HomeAssistant User no hack because can't acces to psa_car_controller/psa/remoteClient.py
Good job @jokraem !
Is there any way to do this in Home assistant as source file editing is not possible in docker ?
Dear psa_car_controller users, in my case it currently works with the following workaround:
1. close psa_car_controller 2. change line 170 in psa_car_controller/psa/remoteClient.py in the following way:
self.remoteCredentials.refresh_token = ' '
(original code: self.remoteCredentials.refresh_token = data["refresh_token"])
3. restart psa_car_controller.
I did the modification on April 28th and since then it has been working most of the time. It refreshes SOC, so charge limit will work. Waking up the car also works.
P.S.: @flobz : Great piece of work, your car controller! - I love it.
Hi,
How do you edit this file ? psa_car_controller/psa/RemoteClient.py
I can only edit psa_car_controller/psaac/config.json
and don't have access to the psa_car_controller/psa/
folder
Thx for the fix !
Hi
I know how to edit those file in HA but I don't know how to save those changes after psacc restart. Addon "Advanced SSH & Web Terminal" with setting "protection_mode: false" Commands: docker ps docker exec -t -i addon_b9f12d83_psacc /bin/bash #specific name you will find with first command cd /data/ #here you can find config files ls -lahtr apt-get update apt-get -y install vim cat config.ini cd /usr/local/lib/python3.9/dist-packages/psa_car_controller/psa #here I have RemoteClient.py file vim RemoteClient.py
Restarting through HA recreates the container, you can just restart it through Portainer addon.
Restarting through HA recreates the container, you can just restart it through Portainer addon.
portainer is not available for HA now. Any other alternatives ?
Hack Working for me but, i have need to set this variable with my refresh_token find in my config.json file.
i think when the token was dead you need to remake user config and otp config. check your config.json file and update psa_car_controller/psa/remoteClient.py with the new remote token
For HomeAssistant User no hack because can't acces to psa_car_controller/psa/remoteClient.py
Good job @jokraem !
You can access it via Terminal & ssh adon path is /usr/local/lib/python3.9/dist-packages/psa_car_controller/psa
Hi
I know how to edit those file in HA but I don't know how to save those changes after psacc restart. Addon "Advanced SSH & Web Terminal" with setting "protection_mode: false" Commands: docker ps docker exec -t -i addon_b9f12d83_psacc /bin/bash #specific name you will find with first command cd /data/ #here you can find config files ls -lahtr apt-get update apt-get -y install vim cat config.ini cd /usr/local/lib/python3.9/dist-packages/psa_car_controller/psa #here I have RemoteClient.py file vim RemoteClient.py
I found a way to restart the adon without recreating the adon. Do the necessary file changes and then save the file, then docker restart [container_id]. This wont recreate the docker and will reboot with the new changes
Hope this works for everyone
Restarting through HA recreates the container, you can just restart it through Portainer addon.
portainer is not available for HA now. Any other alternatives ?
Yes it is : https://github.com/MikeJMcGuire/hass-portainer
Dear psa_car_controller users, in my case it currently works with the following workaround:
1. close psa_car_controller 2. change line 170 in psa_car_controller/psa/remoteClient.py in the following way:
self.remoteCredentials.refresh_token = ' '
(original code: self.remoteCredentials.refresh_token = data["refresh_token"])
3. restart psa_car_controller.
I did the modification on April 28th and since then it has been working most of the time. It refreshes SOC, so charge limit will work. Waking up the car also works.
P.S.: @flobz : Great piece of work, your car controller! - I love it.
Not working for me : "return_code":"300"
Not working for me : "return_code":"300"
Same issue this night, It's PSA server issue.. This morning 10 AM working
Restarting through HA recreates the container, you can just restart it through Portainer addon.
portainer is not available for HA now. Any other alternatives ?
Yes it is : https://github.com/MikeJMcGuire/hass-portainer
Dear psa_car_controller users, in my case it currently works with the following workaround:
1. close psa_car_controller 2. change line 170 in psa_car_controller/psa/remoteClient.py in the following way:
self.remoteCredentials.refresh_token = ' ' (original code: self.remoteCredentials.refresh_token = data["refresh_token"])
3. restart psa_car_controller.
I did the modification on April 28th and since then it has been working most of the time. It refreshes SOC, so charge limit will work. Waking up the car also works. P.S.: @flobz : Great piece of work, your car controller! - I love it.
Not working for me : "return_code":"300"
https://github.com/MikeJMcGuire/hass-portainer is not a valid add-on repository
Restarting through HA recreates the container, you can just restart it through Portainer addon.
portainer is not available for HA now. Any other alternatives ?
Yes it is : https://github.com/MikeJMcGuire/hass-portainer
Dear psa_car_controller users, in my case it currently works with the following workaround:
1. close psa_car_controller 2. change line 170 in psa_car_controller/psa/remoteClient.py in the following way:
self.remoteCredentials.refresh_token = ' ' (original code: self.remoteCredentials.refresh_token = data["refresh_token"])
3. restart psa_car_controller.
I did the modification on April 28th and since then it has been working most of the time. It refreshes SOC, so charge limit will work. Waking up the car also works. P.S.: @flobz : Great piece of work, your car controller! - I love it.
Not working for me : "return_code":"300"
https://github.com/MikeJMcGuire/hass-portainer is not a valid add-on repository
It's this: https://github.com/MikeJMcGuire/HASSAddons
But i use this: https://github.com/alexbelgium/hassio-addons
Not working for me : "return_code":"300"
Same issue this night, It's PSA server issue.. This morning 10 AM working
Still not working from me
ERROR :: can't refresh_remote_token: {'error_description': "Missing parameter, 'refresh_token'", 'error': 'invalid_request'} Create a new one
Not working for me : "return_code":"300"
Same issue this night, It's PSA server issue.. This morning 10 AM working
Still not working from me
ERROR :: can't refresh_remote_token: {'error_description': "Missing parameter, 'refresh_token'", 'error': 'invalid_request'} Create a new one
You need to copy the refresh token from config.json and replace it in the remoteClient.py file
Not working for me : "return_code":"300"
Same issue this night, It's PSA server issue.. This morning 10 AM working
Still not working from me
ERROR :: can't refresh_remote_token: {'error_description': "Missing parameter, 'refresh_token'", 'error': 'invalid_request'} Create a new one
have you set self.remoteCredentials.refresh_token with the refresh_token find in my config.json file ? like that https://github.com/flobz/psa_car_controller/issues/851#issuecomment-2113235122
Not working for me : "return_code":"300"
Same issue this night, It's PSA server issue.. This morning 10 AM working
Still not working from me
ERROR :: can't refresh_remote_token: {'error_description': "Missing parameter, 'refresh_token'", 'error': 'invalid_request'} Create a new one
have you set self.remoteCredentials.refresh_token with the refresh_token find in my config.json file ? like that #851 (comment)
I tried yesterday but the refresh token in config.json change each time I reboot the container, I’m going to try again… Edit: the refresh token is changing each time i send a command ...that is not working ...so i need to set the right token again and again...
Not working for me : "return_code":"300"
Same issue this night, It's PSA server issue.. This morning 10 AM working
You're lucky, still the same error, wait and see ...PSA ...Stellantis...servers...
As a docker noob it took some time, but I got it working! (keeping fingers crossed)
Can you tell me if it's fixed for you ?
How can we get your last commit, via git or is it reflected in pip3 install ?
Both should work
Will I get an update on HA adon?
Hi @flobz, thanks very much for this update. I did the complete authentification process once again and updated the docker container to the latest version from today and it WORKED PERFECTLY. Thanks!
Now we have to wait for the update on HA and we can use the app again :)
Now we have to wait for the update on HA and we can use the app again :)
The last time I created my own repository, so I don't have to wait 😉 https://github.com/mj1985/psacc-ha
Thanks @flobz works like charm
Error : 2024-04-15 11:02:36,058 :: ERROR :: Can't refresh remote token 'refresh_token' Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/RemoteClient.py", line 167, in _refresh_remote_token self.remoteCredentials.refresh_token = data["refresh_token"] KeyError: 'refresh_token'
Platform: home assistant.
I tried to redo the authentication with --web-conf and once I did the authentication, I tried to restart the ad-on with -f config.json -c charge_config.json -r parameter gives me this error.
Sometimes, restarting the homeassistant fixes this issue sometimes not.