<div dir="ltr"><div dir="ltr">Hi Michael,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 26 Dec 2020 at 20:21, Michael Balzer <<a href="mailto:dexter@expeedo.de">dexter@expeedo.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>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.<br>
<br></div></blockquote><div><br></div><div>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.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
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.<br></div></blockquote><div><br></div><div>Yes - I did understand that live just meant that the OVMS was sending data.</div><div><br></div><div>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.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<br>
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.<br>
<br>
See <a href="https://docs.openvehicles.com/en/latest/protocol_v2/index.html" target="_blank">https://docs.openvehicles.com/en/latest/protocol_v2/index.html</a>
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.<br>
<br>
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.<br></div></blockquote><div><br></div><div>OK - thanks for all that.</div><div><br></div><div>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.</div><div><br></div><div>Regards,</div><div>Steve </div></div></div>