Kona / e-Niro tyre pressures and odometer

I noticed in OVMS v3 that there has been some more effort in decoding e-Nero PID’s ( see https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/tree/master/vehicle/OVMS.V3 ). From this I’ve extracted tyre pressures, tyre temperatures and odometer.

Shared has usual.

58

( Guage averages are getting in the way a bit )

4 Likes

I got my Kona EV today and i dont get the correct Odometer Readings.
The Real Odometer is 260km but the reading is 67,108,864.
Do you got any Idea ?

In the library we have -

bytes_to_int(message.data[11:15])

I did wonder if this should be one less, ie

bytes_to_int(message.data[12:15])

1 Like

Thank you.
It works with: obd.query Odometer mode=22 pid=B002 header=7C6 bytes=64 formula=‘bytes_to_int(message.data[1
0:12])’ unit=km baudrate=500000 protocol=6 verify=false force=true

1 Like

Hi everyone, thanks for all your work!
I have one issue with the odometer reading on my E-niro. The reading works but only while driving, when parked I get an entry in my logg every minute:
Recurring exception (994 times) in worker thread ‘pid_logger_30.0sec’ while running workflow for message: {‘filter’: ‘alternating_readout’, ‘handler’: ‘query’, ‘returner’: ‘cloud’, ‘args’: [‘Odometer’], ‘kwargs’: {‘formula’: ‘bytes_to_int(message.data[10:12])’, ‘pid’: ‘B002’, ‘force’: True, ‘mode’: 22, ‘header’: ‘7C6’}}
Anyone has any hints on where I go wrong?
And why every minute and not every 30 s if it’s the pid_logger_30.0sec worker that fails?

Hi Johan, it might not mean that you are doing anything wrong.
It may just be that the PID is only available when driving/when the bus is connected or maybe the module responsible for responding with the odometer is not responding to anything when the car is not driving.

I can’t say exactly why you only get the exception once per minute when the interval is set to 30 seconds though. I will check up on it.

Best regards
/Malte

Hi Malte,
I think you’re correct in assuming that the odometer is only available when the car is switched on (Niro EV), that is consistent with my experiments writing custom code.
The question is then: how can I get the odometer to the dashboard without the exceptions? Is it even possible? The only way to get something on the dashboard is via library+logger, right?

I’ve changed the interval to 600 s, there’s no need for the dashboard to update any quicker than that and that will reduce the number of exceptions and make the log a bit more readable.

I think setting the interval to a higher value is a perfectly fine solution.

Don’t worry about it causing an exception, it will not negatively affect the device.
At some point we will probably make it so that a PID/CANMessage will have info about when the data is available, and then have the device not request it unless the state matches the state where we expect data to be available.

Best regards
/Malte

OK, thanks for a quick reply.
For an EV, at least the Niro, the state machine is a bit tricky, I’ve fiddled around with it for a few days but I think I’ve got it working for my custom code now. The last issue was to moving from On -> Driving -> Stopped (e.g. traffic light) -> Driving -> Parked. Testing is a pain when the time is limited and the car has to be driven to test it!
Trips are still not working and I cannot create a command/PID called ‘RPM’ (Name must be unique!) but this is probably not the right thread for that issue…