Closed TheRealSlimSchaali closed 1 year ago
Thanks in advance for any help. In case you need more info, please let me know.
I have the same issue. Environment (please complete the following information):
OS: Home Assistant on Odroid C4 Peugeot e2008 Application version 2.6.0
I tried to replicate it in a standalone docker of PSACC, get the same message.
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 78, in firstLaunchConfig
res_dict = res2.json()["success"]
KeyError: 'success'
{"code":"495", "message": "Invalid or expired client certificate"}
2022-10-29 08:08:00,373 :: ERROR :: Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 78, in firstLaunchConfig
res_dict = res2.json()["success"]
KeyError: 'success'
{"code":"495", "message": "Invalid or expired client certificate"}
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 78, in firstLaunchConfig
res_dict = res2.json()["success"]
KeyError: 'success'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/web/view/config_views.py", line 133, in connectPSA
res = firstLaunchConfig(app_name, email, password, countrycode)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 87, in firstLaunchConfig
raise Exception(msg) from ex
Exception: Traceback (most recent call last): ` File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 78, in firstLaunchConfig
res_dict = res2.json()["success"]
KeyError: 'success'
{"code":"495", "message": "Invalid or expired client certificate"}
HA OS 9.3 HA version 2022.10.5 Psa controller Current version: v2.6.0
first time installation, country code FR => same message unable to receive SMS code also
172.30.32.1 - - [29/Oct/2022 21:24:25] "POST /_dash-update-component HTTP/1.1" 200 - Requested API level 30 is larger than maximum we have, returning API level 28 instead. 172.30.32.1 - - [29/Oct/2022 21:24:49] "POST /_dash-update-component HTTP/1.1" 200 - Requested API level 30 is larger than maximum we have, returning API level 28 instead. 2022-10-29 21:25:10,339 :: ERROR :: Traceback (most recent call last): File "/psa_car_controller/libs/psa/setup/app_decoder.py", line 76, in firstLaunchConfig res_dict = res2.json()["success"] KeyError: 'success' {"code":"495", "message": "Invalid or expired client certificate"} 172.30.32.1 - - [29/Oct/2022 21:25:10] "POST /_dash-update-component HTTP/1.1" 200 - 172.30.32.1 - - [29/Oct/2022 21:26:22] "GET / HTTP/1.1" 200 -
Any ideas ?
I'm also seeing the same error, don't know if it's related to my signing up using the My Peugeot app just minutes before (successfully) with the same credentials?
After decode the certifcate you can see it is not renewed by PSA.
Common Name: MZPMYMA1 Issued By: PSA Peugeot Citroen Issuing Certificate: PSA Peugeot Citroen Programs Partners Serial Number: 68CB4F87B935FA565A550A1E Signature: sha256WithRSAEncryption Valid From: 14:22:13 28 Oct 2021 Valid To: 14:22:13 28 Oct 2022
So to get it work we need an updated cert.
Temporary workaround: vi /usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py
Line 17 GITHUB_USER change from: flobz to kurim
I have modify his apk with the new crt, this should do it for now, as long as flobz not update his apk repo
After decode the certifcate you can see it is not renewed by PSA.
Common Name: MZPMYMA1 Issued By: PSA Peugeot Citroen Issuing Certificate: PSA Peugeot Citroen Programs Partners Serial Number: 68CB4F87B935FA565A550A1E Signature: sha256WithRSAEncryption Valid From: 14:22:13 28 Oct 2021 Valid To: 14:22:13 28 Oct 2022
So to get it work we need an updated cert.
Temporary workaround: vi /usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py
Line 17 GITHUB_USER change from: flobz to kurim
I have modify his apk with the new crt, this should do it for now, as long as flobz not update his apk repo
Thanks for looking into this issue. Excuse the question, how do I do that patch on the HomeAssistant Add-on. I ssh'ed onto the machine but that file is not there...
Yes this is in issue... I have done it on my desktop in WSL2 Ubuntu, and download the otp.bin to homeassistant. you can open console in portainer to the container change to ./data and download the otp.bin
Hello @kurim , Thanks for the fix ! Can you create a PR ?
Hi @flobz , you can get my modified APK here: psa_apk and put them to your psa_apk.
Then there is need to modify the code. Btw. the App has been Updated to 1.37.0 may be you need to take a look at it, if i use this version I can pass this part but it failed later (need to take a look later this day)
After decode the certifcate you can see it is not renewed by PSA.
Common Name: MZPMYMA1 Issued By: PSA Peugeot Citroen Issuing Certificate: PSA Peugeot Citroen Programs Partners Serial Number: 68CB4F87B935FA565A550A1E Signature: sha256WithRSAEncryption Valid From: 14:22:13 28 Oct 2021 Valid To: 14:22:13 28 Oct 2022
So to get it work we need an updated cert.
Temporary workaround: vi /usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py
Line 17 GITHUB_USER change from: flobz to kurim
I have modify his apk with the new crt, this should do it for now, as long as flobz not update his apk repo
Thankyou very much kurim, with the change works fine.
Hi @flobz
after your modification, I delete PSA controller version to reinstall it (in HA OS) but when I config variable I have got this message :'NoneType' object is not subscriptable
and nothin in Log tab :
2022-11-01 15:46:34,537 :: WARNING :: Can't get language
2022-11-01 15:46:35,423 :: INFO :: update_data
I am unable also to locate app_decode.py in HA vm
Hi, You need the last version. The release workflow is in progress.
@flobz , thanks for all the work. Do you know when the Home Assistant release will be ready?
You can use the beta, but it has the limitation that you can't use ingress for access.
it is working in the beta branch for HA 2022.10.5. widget in lovelace have value :-)
many thanks @kurim and @flobz !!
Describe the bug Below error in log appears every time I try to log in within the config screen.
To Reproduce Steps to reproduce the behavior:
Config file I use country code DE.
Environment (please complete the following information):
Traceback (most recent call last): File "/psa_car_controller/libs/psa/setup/app_decoder.py", line 76, in firstLaunchConfig res_dict = res2.json()["success"] KeyError: 'success' {"code":"495", "message": "Invalid or expired client certificate"}
Additional context Add any other context about the problem here.