[Ovmsdev] Keeping OBD-II alive

Steve Davies steve at telviva.co.za
Sun Dec 27 03:49:10 HKT 2020


Hi Michael,

On Sat, 26 Dec 2020 at 20:21, Michael Balzer <dexter at expeedo.de> wrote:

> the V3 metrics framework has staleness for every metric. You can query the
> staleness by the command "metrics list -s". Values aren't supposed to
> disappear/clear when becoming stale.
>
>
Yes - thanks.  I did find that option in the code - many values seem to
report stale in the normal course of running even though the age might even
be 0 seconds.


> The "live" indicator on the App is showing if the App has received any
> update recently (i.e. within the last minute). It doesn't indicate that
> update had new values, just that the connection to the car is alive.
>

Yes - I did understand that live just meant that the OVMS was sending data.

I think that the "stale" attribute of a metric is a very nice idea - though
for my current issue it might be enough just to add a private metric saying
the last time I got data from the car overall - then in the apps etc I can
show the overall age of the displayed info.


>
> Regarding value staleness, the V2 protocol (which the Apps still use and
> probably will continue to use, as it's much more efficient than MQTT) only
> has support for staleness info on a handful of values, mostly the
> temperature readings. Those get grey when becoming stale.
>
> See https://docs.openvehicles.com/en/latest/protocol_v2/index.html for
> the protocol details. You can add some more staleness info to the V2
> message protocol quite easily, and adding support for greying out the
> values in the App also isn't hard. Add new data to messages at the end for
> compatibility. Think about which staleness actually matters. Up to now, the
> staleness indication for temperatures has been sufficient, as these also
> indicate general staleness. If you plan to add data to the V2 protocol,
> it's probably best to discuss that first here.
>
> The web UI currently doesn't care about staleness. If you miss that info,
> it isn't hard to add as well, just a bit of work to connect the dots.
>

OK - thanks for all that.

I think I will start by trying to find a way to keep the OBD awake when it
matters - like charging - and see how much of an issue this "staleness" is
after that is fixed.

Regards,
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20201226/b03d26df/attachment-0001.htm>


More information about the OvmsDev mailing list