[Ovmsdev] Car lost GPRS connection notification

Mark Webb-Johnson mark at webb-johnson.net
Tue May 15 13:14:39 HKT 2012


Rafael has suggested that we add a car-lost-gprs-connection notification to the OVMS system. The idea being that when your car loses GPRS connection (cellular coverage, fault, whatever), you get a notification to your app to let you know. And, presumably, another notification should it come back.

It is common for a car to lose cellular connection for a minute or so, then re-establish.
It is also reasonably common to lose connectivity when the GSM signal is lost.
It does seem a nice idea, and not too hard to do.

The way it would work would be to have a threshold in the server. A notification time, presumably in seconds.

If a car disconnected (or 20 minute timeout was force disconnected), we would put a record in a pending table, timestamped NOW()+thresholdseconds.
If the car connected, and the pending table has a record for that car, we would just remove the record.
If the car connected, and there was no pending table record for that car, we would send a push notification for all apps on that car to tell them that the car is connected.
Periodically, we check the pending table and if any records have timed out, we (a) send a push notification for all the apps on that car to tell them that the car has disconnected, and (b) remove the record.

The result of this is that if the car disconnects for a short time, then reconnects, no notification is raised. But, if the car disconnects for a long time, you get a notification both when we find it has disconnected and when we see it reconnect. This can all be done from the server, irrespective of version of firmware in the car/apps.

The questions are: (a) what do people think, (b) what should a reasonable timeout be, and (c) could this be _on_ for everyone.

Would anyone here _not_ want this?

I would suggest a reasonable timeout, to alert after, would be an hour or so.

It is easier to code this if it is universally on for everyone - we can just have a single timeout in the server. If we want individual control, we'd have to have a setting per-vehicle and provide the users a mechanism to change that setting. That would be much more work.

Regards, Mark.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.teslaclub.hk/pipermail/ovmsdev/attachments/20120515/47d01e83/attachment.html>


More information about the OvmsDev mailing list