Okay I’ve been playing using the AutoPi in an MG HS PHEV and have started by setting up a few basic OBD PIDS.
The first problem is that RPM is meaningless for deciding whether the Vehicle is active, however I have found a BMS Status which has various states, the interesting ones are Running and Charging.
I have a log event for the BMS_STATUS, I have yet to see if it logs correctly, but it should. What I need to do is go to sleep within a few seconds of the status not been “3” (i.e. not running), can anyone advise how I can do this. This leads to a second problem, which is that when the car finishes charging, for whatever reason the 12v battery appears to get a charge, or atleast the voltage goes up enough to wake the AutoPi, and trigger the alarm. Is it possible to wake up on something other than voltage.
And finally is it possible to test certain PIDs when the unit is sleeping, my reason is that if unit is awake, and the vehicle is locked, the alarm triggers, however I want to monitor the state of charge, and obviously charging is normally done with the vehicle locked.
Any advice would be most welcome