[Ovmsdev] Brown outs, power cuts, connectivity problems

Nikolay Shishkov nshishkov at yahoo.com
Sat Jun 7 20:52:25 HKT 2014

I am trying to understand how is the ovms supposed to handle brownouts, power interruptions and connectivity problems.
The reason is that I think I am getting power cut from the obd port after some time of innactivity.

Looking at the code for the logging function it seems (to me) that all variables are held in memory and if the power is cut while logging there is no way to recover the historical data. My quick test today while on a drive confirmed this.

Another scenario I am considering is the following 
 - the car has powered down the obd port leaving the ovms with no power.
 - the driver gets in powering the car and driving off. 
 - this powers up the ovms, but it takes some time to get network access, lock on the gps, etc.

One more scenario - loosing GPRS connectivity, and then powering the car down. The car can switch off the power to the obd port and then the log is forgotten. 

And another observation - the ovms seems to be holding the last known gps position, with no indication of whether the position is valid or not - or maybe the accuracy or/and the time the position was obtained. Any ideas for improvements? Or have I missed something in the logs?

Is there any way to make the logging more robust - say store the initial values when changing state in a non volitale memory together with some king of timestamp or another marker? This way if there is a power interruption and the power is restored within say 1 minute the logging could continue the counters like nothing has happened.

Any other ideas? Maybe all of the above is addressed in the code and I am just missing it?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20140607/daa3fec2/attachment.htm>

More information about the OvmsDev mailing list