EVNotify/EVNotiPi

Constant readouts prevent the Kona EV 2020 from going to sleep, draining the 12V battery

Closed this issue · 6 comments

I have an issue with my Kona EV (2020).
Situation:
I use EVNotiPi + CAN to read main battery status. After problems with draining the 12 V battery by having the Pi on direct battery power, I connected the Pi to the radio USB interface for power, this is the one source of power that should be on while charging and driving only. I use the overlay file system to prevent SD problems due to abruptly turning off the Pi.
Problem:
The radio USB interface does not turn off after the end of the charging now. It did before (I checked with a LED tester).
Probable cause:
EVNotiPi keeps polling the battery status even after charging is complete and this keeps the CAN busses and car controllers ticking when they should go into deep sleep after 20 minutes or so. The combined current draw (Pi + busses + controllers) is enough to sometimes drain the battery overnight.
Note:
Kona has an idiotic way of topping up the 12 V battery. It only checks the voltage every few hours and it will only top up the battery a few times and then stop doing it altogether. So I'm forced into some pretty extreme power saving strategies while having 64 kWh of energy on board ...

I tested my assumption by stopping the EVNotiPi service after charging was done when the Pi should have turned off. Five minutes afterwards the USB interface power (and the Pi) turned off.
So my assumption seems to be correct: EVNotiPi service keeps polling for charging data after charge is completed and this prevents the USB interface and the car controllers from turning off to save the 12V battery from draining.
Importantly, this seems to only happen after charging. Just turning off the car without charging but with EVNotiPi running turns the USB/Pi off after a few minutes.

I see that the project is inactive, so I tried solving the problem myself.
It seems that if you set the ODB read interval to 30 seconds instead of the default 1 second, the "go to sleep" in the Kona works OK. But you will get some false alarms about stopped charging every now and then. And the reporting just stops sometimes.

The project is not inactive. There are a few modes and the use case for this project is the standalone device, that has a hardware watchdog (as mentioned in readme). The hardware watch the 12v status, so as soon as car is off, the device turns off too so this is not a use case. EVNotify itself has a software standby handling, if you are interested, you can look there

Ok, thank you, good to know.
But it would still make sense to make the software not drain the battery unnecessarily until the watchdog fires. It wears the stupid lead battery down really quickly.

I do understand the issue. The EVNotify app has a mechanism to detect invalid data (happens when car is off) and sends the dongle into Standby Mode and stops polling. The issue with that is, that you are not allowed to send a new command, otherwise it will drain the battery again. So the app simply goes to a kind of deep sleep state in order to prevent such scenario. You need to restart then, once you record again. But on a standalone device, a raspberry pi, you (normally) don't have an interface to do so , so you'll need to re-plug the device, so you can directly plug it out, once you don't need it. Or, if you want to automatically handle it, you can use a hardware voltage watcher to handle this. This is also the common use case. Software detection is risky, at least this was my experience and the only reliable way to not drain the battery was to fall into a deep sleep, but this is then not really useful for headless devices, is it?

But of course, I'm open for suggestions.

I can sympathise, there are so many pieces to the puzzle. The hardware watchdog does seem to be the best option, considering. Thank you for taking the time!