flobz / psa_car_controller

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

PSA CC v2.6.0 no longer working #391

Closed maivorbim closed 2 years ago

maivorbim commented 2 years ago

Describe the bug For the last 2-4 weeks, PSA CC is no longer working. This is the error log I receive after a clean install. Initial setup (user name, password, OTP config) finishes with confirmation that everything is OK, however this is the error received in the log:

Requested API level 30 is larger than maximum we have, returning API level 28 instead.
2022-08-16 17:27:05,380 :: INFO :: save config change
2022-08-16 17:27:06,280 :: INFO :: 
Your vehicles: ["{'vin': 'VR3XXXXXXXX', 'vehicle_id': '1566XXXXXXXXXXXXXXX', '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}"]
2022-08-16 17:27:06,282 :: INFO :: save config change
2022-08-16 17:27:07,446 :: INFO :: ["{'vin': 'VR3XXXXXXXXXXXXXXXXXX', 'vehicle_id': '1566cXXXXXXXXXXXXXXXXXX', '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}"]
2022-08-16 17:27:07,447 :: INFO :: save config change
172.30.32.1 - - [16/Aug/2022 17:27:07] "POST /_dash-update-component HTTP/1.1" 200 -
172.30.32.1 - - [16/Aug/2022 17:27:49] "GET /config_otp HTTP/1.1" 200 -
172.30.32.1 - - [16/Aug/2022 17:27:49] "GET /_dash-layout HTTP/1.1" 200 -
172.30.32.1 - - [16/Aug/2022 17:27:49] "GET /_dash-dependencies HTTP/1.1" 200 -
172.30.32.1 - - [16/Aug/2022 17:27:49] "POST /_dash-update-component HTTP/1.1" 200 -
172.30.32.1 - - [16/Aug/2022 17:27:49] "POST /_dash-update-component HTTP/1.1" 200 -
172.30.32.1 - - [16/Aug/2022 17:27:49] "POST /_dash-update-component HTTP/1.1" 204 -
172.30.32.1 - - [16/Aug/2022 17:27:49] "POST /_dash-update-component HTTP/1.1" 204 -
172.30.32.1 - - [16/Aug/2022 17:27:52] "POST /_dash-update-component HTTP/1.1" 200 -
2022-08-16 17:28:14,688 :: ERROR :: Error during activation: {'newversion': '2.0.0', 'newversionurl': 'http://m.inwebo.com/', 'err': 'NOK:FORBIDDEN'}
2022-08-16 17:28:15,183 :: ERROR :: remote_refresh_token isn't defined
2022-08-16 17:28:15,905 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2022-08-16 17:28:15,906 :: ERROR :: get_otp_code:
Traceback (most recent call last):
  File "/psa_car_controller/libs/psa/RemoteClient.py", line 186, in get_otp_code
    otp_code = self.otp.get_otp_code()
  File "/psa_car_controller/otp/otp.py", line 277, in get_otp_code
    raise ConfigException("Can't get otp code")
otp.otp.ConfigException: Can't get otp code
2022-08-16 17:28:15,909 :: ERROR :: Please redo otp config
2022-08-16 17:28:16,793 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2022-08-16 17:28:16,795 :: ERROR :: start_remote_control failed redo otp config
172.30.32.1 - - [16/Aug/2022 17:28:16] "POST /_dash-update-component HTTP/1.1" 200 -
172.30.32.1 - - [16/Aug/2022 17:28:18] "GET / HTTP/1.1" 200 -
172.30.32.1 - - [16/Aug/2022 17:28:18] "GET /_dash-layout HTTP/1.1" 200 -
172.30.32.1 - - [16/Aug/2022 17:28:18] "GET /_dash-dependencies HTTP/1.1" 200 -
2022-08-16 17:28:18,285 :: WARNING :: Failed to generate figure, there is probably not enough data yet
172.30.32.1 - - [16/Aug/2022 17:28:18] "POST /_dash-update-component HTTP/1.1" 200 -
172.30.32.1 - - [16/Aug/2022 17:28:18] "GET /control?header=false HTTP/1.1" 200 -
172.30.32.1 - - [16/Aug/2022 17:28:18] "GET /_dash-dependencies HTTP/1.1" 200 -
172.30.32.1 - - [16/Aug/2022 17:28:18] "GET /_dash-layout HTTP/1.1" 200 -
2022-08-16 17:28:18,469 :: ERROR :: get_control_tabs:
Traceback (most recent call last):
  File "/psa_car_controller/web/view/control.py", line 35, in get_control_tabs
    preconditionning_state = car.status.preconditionning.air_conditioning.status != "Disabled"
AttributeError: 'NoneType' object has no attribute 'preconditionning'
172.30.32.1 - - [16/Aug/2022 17:28:18] "POST /_dash-update-component HTTP/1.1" 200 -
2022-08-16 17:28:37,452 :: INFO :: save config change

Environment (please complete the following information):

SharkEzz commented 2 years ago

The latest version is v3.0.4, you should try to upgrade to see if your issue is still here, there is a good chance that your problem is related to the age of your version.

maivorbim commented 2 years ago

No, same error on v3.0.4

Matssa56 commented 2 years ago

Hi there,

I'm having the same issue which is strange since sometimes it works, sometimes it doesn't... I get the issue when trying to wake up the car but not only. When seeing this, I tried to make the OTP again and it didn't change anything.

I'm using the v3.0.4 through the docker image. I didn't try to update the PSACC inside the docker though.

OS: Debian 11 (home assistant supervised through docker, even though it shouldn't have any impact) Brand and model of car: Opel eCorsa Application version (commit number, branch or tag): 3.0.4 (DOCKER image)

///EDIT

Just read the FAQ, had to uninstall the app on my phone and reset my account... @maivorbim did you try this out?

maivorbim commented 2 years ago

Omg, how did I miss the FAQ...Yes, following the FAQ procedure solved my problem. Case solved.