psa_car_controller icon indicating copy to clipboard operation
psa_car_controller copied to clipboard

Null SOH values in DB, but visible in API response

Open bennymamo opened this issue 9 months ago • 4 comments

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.

image

When checking api at http://localhost:5000/get_vehicleinfo/VR3XXXXXXXXX I get the following under battery section:

image

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:

  1. what command did you use = API calls as per above, and DB browser for sqlite
  2. when the bug happend ? = after all the steallntis login changes madness.
  3. Does it persist after restarting the program? = yes
  4. 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.

bennymamo avatar May 06 '24 13:05 bennymamo

Can you provide the full result of http://localhost:5000/get_vehicleinfo/VR3XXXXXXXXX as text not a screenshot please ?

flobz avatar May 16 '24 17:05 flobz

Hi, thanks for taking the time to reply. attached. VR3XXXXXXXXXXX.json

bennymamo avatar May 16 '24 19:05 bennymamo

For me the soh shows 100% but was working fine few weeks ago. {"soh":100.0}

Bushrider avatar May 23 '24 22:05 Bushrider

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?

image

bennymamo avatar Jun 23 '24 01:06 bennymamo