Open wawibu opened 1 month ago
I have the same behaviour with the battery SoC reading on my Velar P400e. I have assumed that the SoC coming over OBD is the 'real' SoC at a hardware level. Whereas that shown on the dash/app is the user friendly SoC reflecting the charge and discharge limits JLR have determined to preserve battery life (e.g. deep discharging would shorten battery life). In my application I have determined that 96% is "full" and 17% is "empty" so:
user_friendly_soc = obd_soc - 17 / ((96-17)/100)
The Kwh consumed by my car when charging is linearly proportional to the increase in user_friendly_soc calculated that way so it works for my charging application.
I am able to read odometer, I have added example code. On my car, the odometer value becomes unavailable after the ignition of the car has been off for a few hours, it seems like something in the car must 'go to sleep' after a period of time.
Hi, I try to follow your way as the API is no longer working :(
I'm able to read the PHEV Battery level as shown in your example - also that the number is off to the value reported by JLR. ODB reports 17.25% while JLR reports in the app and in the car only 1% - so maybe a digit shift. Could be as I own the Defender P400e PHEV and not a full EV. Will check that while I recharge the car coming weekend.
I also would like to read the ODO meter and used therefore the following command:
>>> odometer = OBDCommand("ODO_METER", "ODO Meter", b"01A6", 4, noop, ECU.ENGINE, True)
which provides that noop is not defined, also it is mentioned here -> https://github.com/dailab/python-OBD-wifi/blob/master/obd/decoders.py#L60Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'noop' is not defined
so I tried to use percent - to get a number to see if it works `>>> odometer = OBDCommand("ODO_METER", "ODO Meter", b"01A6", 4, percent, ECU.ENGINE, True)
but looks that A6 is not supported.
Are you able to read the ODO Meter?