Kona EV setup & sleep

First of all thanks to the team for this great project!

My intention is quiet easy: Get battery & charging status on my phone
and it took some time to collect all needed information from different threads.

After basic setup of AutoPi and sim card and disabling voice
i got SOC_BMS and Charging_Power from the library, added the loggers and got a widget in the dashboard which is fine and running.

Next step was to get the custom code running, to get telegram notifications of charging events on my mobile from https://github.com/plord12/autopi-tools - thank you very much @plord for this great work !

My main current issue is: AutoPi never sleeps and drains 12v batterie

  • all sleep timers are default
  • no matter with or without custom code (which handles enable/disable sleep)
  • finally AutoPi runs into safety cut-off at 12.2v (where kona then starts to charge 12v battery from the driving battery again)

I followed the discussions since dec18 - the main problem that AutoPi relies on Engine RPM which is not available at all for EV - and this still seems to be unsolved - but anyway i expect AutoPi to just fall into sleep after 300s even if custom code enables sleep while the car is neither charging or driving.

From my point of view EngineRPM should only wake up Autopi and does not prevent sleep - or is the current solution for BEV “as wakeup does not work autopi never sleeps” until this is finally fixed ?

Maybe i just missed quite a simple issue why the sleep timer does not work at all ?

Thanks for any hints on this.

Other details still has to be worked out:

  1. AutoPi power consumption: i was wondering not to find any information about this (rpi zero w + obd + gps + 4g chip) ? - my impression currently is “all this uses much more power than thought” - as rpi temperature is between 50 and 60deg - which is quite hot for a small device … the more “getting autopi to sleep” is quite important for me. I found different information about this:
    a) It seems to use up around 100mA when idling (not in sleep, just not doing much)
    and goes up to about 200mA when the CPU and, presumably, modem are doing more work.
    It’s at about 100-150mA most of the time when awake.
    b) During sleep the AutoPi uses about 100mA and in hibernation less than 5mA
    My current impression is a power consumption of “much more than 10-12w” as the widget shows how fast the 12v battery (with at least 600Wh) drains - i reach cut-off within less than 24hours - but this needs to get measured - just wondering why the AutoPi specs miss “power consumption” (?)

  2. Releasing AutoPi put Kona into the already described “invalid obd state” in which the car does not start at all any more (solution is to disconnect 12v battery for few minutes to reset the car) - following Unplugging whilst driving: Not recommended!
    my car is configured as “BEV” but this still seems to unsolved - so always be prepared to have a tool with you to disconnect the battery when unplugging AutoPi … this occured even if the car was off.

  3. Logging from custom code: i’ve put logging to info level in settings - but i still don’t get any logs from custom code in the webui/events section - maybe i’m expecting these logs at the totally wrong place as “log” and “events” are different things ? (in this case the question would be: how to log events from custom code into web ui ?)

  4. Event Log shows every minute
    “bus_connected, event.vehicle.obd.protocol: ‘6’, event.vehicle.obd.autodetected: false”
    which results maybe in the cron job for the custom code - but does not seem to indicate any problem.

Finally: unable to find the ios+android app out there ? :slight_smile:


Yea … we are all waiting for the next release of autopi where there is full support for EV’s :slight_smile: thats when this should start to work as it should and these sleep work-arounds can be removed.

I have been tinkering a bit with the script and currently have for my kona -

# enable autopi sleep
def enable_sleep():
    args = ['sleep']
    kwargs = {
        'enable': True,
        'period': 300,
        'reason': 'charge status',

ie force the sleep period.

I find it takes time to test since the Kona takes so long to run low of charge !

You need to log into the device ( ssh / scp ) and retrieve /var/log/salt/minion or issue minionutil.last_logs in the console window.