flobz / psa_car_controller

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

Add-on loading some data, but gui seems incomplete / standalone webpage not reachable #278

Closed jeroenvdd closed 2 years ago

jeroenvdd commented 2 years ago

Describe the bug A clear and concise description of what the bug is. Car data loads verry partially, config button doesn't work (the one in the corner) and the webpage isn't available, when i restart the application i also see that the webinterfaces started at 0.0.0.0:5000

I can open the tab in openhab, also see that it found my car but no data is shown, but i cant acces http://192.168.0.140:5000/get_vehicleinfo/VXKUKZKXZMWxxxxx

with in my case 0.140 beeing the adres of my homeassistant server running the add-on

To Reproduce Steps to reproduce the behavior:

  1. what command did you use no command yet, only the http request / trying to open config
  2. when the bug append ? from start
  3. Does it persist after restarting the program? yes
  4. Does it persist after recreate config by going to http://server_address:port/config? can't acces that one Config file Give the anonymize content of the config file

Environment (please complete the following information):

azcn2503 commented 2 years ago

I am experiencing the same issue under the following environment:

There does appear to be some activity coming through, as seen in the logs:

2021-11-23 14:07:02,755 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VXKUHZKXZL_______ b'{"date":"2021-11-23T14:06:56Z","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":0,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":1,"soc_batt":99,"autonomy_zev":300,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VXKUHZKXZL_______","reason":4,"signal_quality":5,"sev_stop_date":"2021-11-23T09:41:36Z","fds":["NDR01","NAE01","NBM01","NCG01","NAO01","NAS01"],"sev_state":0,"obj_counter":3,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":2,"superlock_state":0}'
2021-11-23 14:20:14,112 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VXKUHZKXZL_______ b'{"date":"2021-11-23T14:20:03Z","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":0,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":1,"soc_batt":99,"autonomy_zev":300,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VXKUHZKXZL_______","reason":0,"signal_quality":4,"sev_stop_date":"2021-11-23T09:41:36Z","fds":["NDR01","NAE01","NBM01","NCG01","NAO01","NAS01"],"sev_state":0,"obj_counter":1,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":2,"superlock_state":0}'
2021-11-23 14:20:14,124 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VXKUHZKXZL_______ b'{"date":"2021-11-23T14:20: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":0,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":1,"soc_batt":99,"autonomy_zev":300,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VXKUHZKXZL_______","reason":3,"signal_quality":4,"sev_stop_date":"2021-11-23T09:41:36Z","fds":["NDR01","NAE01","NBM01","NCG01","NAO01","NAS01"],"sev_state":0,"obj_counter":2,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":2,"superlock_state":0}'
2021-11-23 14:20:14,136 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VXKUHZKXZL_______ b'{"date":"2021-11-23T14:20: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":0,"minute":0},"available":1,"remaining_time":0,"rate":0,"cable_detected":1,"soc_batt":99,"autonomy_zev":300,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VXKUHZKXZL_______","reason":4,"signal_quality":4,"sev_stop_date":"2021-11-23T09:41:36Z","fds":["NDR01","NAE01","NBM01","NCG01","NAO01","NAS01"],"sev_state":0,"obj_counter":3,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":2,"superlock_state":0}'

Also an error:

2021-11-23 14:27:49,857 :: ERROR :: get_control_tabs:
Traceback (most recent call last):
  File "/psa_car_controller/web/view/control.py", line 27, in get_control_tabs
    preconditionning_state = car.status.preconditionning.air_conditioning.status != "Disabled"
AttributeError: 'NoneType' object has no attribute 'preconditionning'
flobz commented 2 years ago

can you do a get_vehicle_info request and see if it works and if you have error in logs during the request ?

azcn2503 commented 2 years ago

Unfortunately since getting the error, I tried uninstalling and reinstalling the add-on, now cannot progress past the initial login due to an error: Invalid password or PKCS12 data.

flobz commented 2 years ago

Use last version : 2.6.0

azcn2503 commented 2 years ago

Unfortunately I get the same error on 2.6.0. Here is the associated log:

Containerised psa_car_controller loading...
2021-12-02 08:11:56,855 :: WARNING :: Can't get language
2021-12-02 08:11:58,767 :: INFO :: update_data
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
172.30.32.1 - - [02/Dec/2021 08:31:46] "GET / HTTP/1.1" 200 -
172.30.32.1 - - [02/Dec/2021 08:31:46] "GET /assets/clientside.js HTTP/1.1" 200 -
172.30.32.1 - - [02/Dec/2021 08:31:46] "GET /_dash-layout HTTP/1.1" 200 -
172.30.32.1 - - [02/Dec/2021 08:31:46] "GET /_dash-dependencies HTTP/1.1" 200 -
172.30.32.1 - - [02/Dec/2021 08:31:46] "POST /_dash-update-component HTTP/1.1" 200 -
172.30.32.1 - - [02/Dec/2021 08:31:46] "GET /config_login HTTP/1.1" 200 -
172.30.32.1 - - [02/Dec/2021 08:31:46] "GET /_dash-layout HTTP/1.1" 200 -
172.30.32.1 - - [02/Dec/2021 08:31:46] "GET /_dash-dependencies HTTP/1.1" 200 -
172.30.32.1 - - [02/Dec/2021 08:31:46] "POST /_dash-update-component HTTP/1.1" 200 -
172.30.32.1 - - [02/Dec/2021 08:31:46] "GET /assets/images/settings.svg HTTP/1.1" 200 -
172.30.32.1 - - [02/Dec/2021 08:31:46] "POST /_dash-update-component HTTP/1.1" 204 -
172.30.32.1 - - [02/Dec/2021 08:31:46] "POST /_dash-update-component HTTP/1.1" 204 -
172.30.32.1 - - [02/Dec/2021 08:31:47] "POST /_dash-update-component HTTP/1.1" 200 -
Requested API level 29 is larger than maximum we have, returning API level 28 instead.
172.30.32.1 - - [02/Dec/2021 08:32:08] "POST /_dash-update-component HTTP/1.1" 200 -
flobz commented 2 years ago

Ah yeah sorry but last time I checked. My Vauxhall android app v1.33 wasn't released and I need it for the app. Please wait :)

flobz commented 2 years ago

myVauxhall updated ! it should work for you.

azcn2503 commented 2 years ago

Reporting back just to confirm that this is working, thank you!