psa_car_controller
psa_car_controller copied to clipboard
Null SOH values in DB, but visible in API response
When trying to get soh from http://localhost:5000/battery/soh/VR3XXXXXXXXX I get the below:
{ "soh": null }
When checking in DB I see various entries for SOH with null values.
When checking api at http://localhost:5000/get_vehicleinfo/VR3XXXXXXXXX I get the following under battery section:
When checking source where SOH is updated, I think it is done in psa_client.py starting at line 214: try: soh = electric_energy_status.battery.health.resistance Database.record_battery_soh(car.vin, charge_date, soh)
Is there a way I can make better logging to see why Iam getting null values?
To Reproduce Steps to reproduce the behavior:
- what command did you use = API calls as per above, and DB browser for sqlite
- when the bug happend ? = after all the steallntis login changes madness.
- Does it persist after restarting the program? = yes
- Does it persist after recreate config by going to http://server_address:port/config? = yes
Environment (please complete the following information):
- OS: [e.g. Windows] = Docker on windows using WSL2
- Brand and model of car = peugeot e2008 2024 facelift
- Application version (commit number, branch or tag) = 3.5.0
Any help would be appreciated. Not sure if I'm chasing the correct py file and api result.
Can you provide the full result of http://localhost:5000/get_vehicleinfo/VR3XXXXXXXXX as text not a screenshot please ?
Hi, thanks for taking the time to reply. attached. VR3XXXXXXXXXXX.json
For me the soh shows 100% but was working fine few weeks ago. {"soh":100.0}
Small update.
Was looking at table structure and noticed there was a unique constraint on VIN and SOH. Removed that constraint and now I'm getting SOH value written to DB again, and can see them in web dashboard as well. Cool.
Thing is, now the car is not responding and needs a reset of 12v battery. These stellantis cars have the worst infotainment/computer software I've ever seen (after MS teams). Is there possibly no way on facelift e2008 to reset modem without resetting whole car?