[Ovmsdev] Keeping OBD-II alive

Michael Balzer dexter at expeedo.de
Sun Dec 27 02:21:00 HKT 2020


Steve,

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.

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.

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.

Regards,
Michael


Am 26.12.20 um 16:00 schrieb Steve Davies:
>
>
> On Sat, 26 Dec 2020 at 16:35, Steve Davies <steve at telviva.co.za 
> <mailto:steve at telviva.co.za>> wrote:
>
>     My car's OBD currently goes off after a while whenever it's not
>     READY (to drive) (whether charging or not),
>
>
> Trying not to spam with questions - but ...
>
> If the car is off and not responding on OBD then obviously information 
> going through to the apps becomes stale.
>
> But the apps still show "Live" in the corner and it's not obvious that 
> the info is out of date.
>
> Is there a way to show how many minutes old the data is or something 
> like that?
>
> Does this interact with the autostale stuff in some way? I'm not 
> really understand the effect of this - I changed the metrics for 12v 
> current to SM_STALE_MID and it must be stale by now but the misleading 
> 8.9A figure is still showing in the OVMS web "status" page.  Also in 
> "metrics list".  Is it supposed to disappear when it goes stale.
>
> Thanks,
> Steve
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20201226/8a5252e0/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20201226/8a5252e0/attachment-0001.sig>


More information about the OvmsDev mailing list