[Nut-upsdev] RFC: new variable driver.data.age (seconds since the driver last got data from the device)

Edgar Fuß ef at math.uni-bonn.de
Tue Nov 17 11:38:22 GMT 2026


> To me the key point is that when a driver makes a report, that report
> should only include information which is "not stale"
Yes.  But it should, in my opinion, also include an option to explicitly mark a value as unavailable.

> I always lean to the simplest reasonable approach.
Me too (in principle).

>   I would like drivers to be able to report "unavailable" for a value,
>   and drivers should manage timeouts (that they understand because it's
>   device behavior) and report them as unavailable.
Why should the driver manage the timeout instead of enabling upsd to do so?  The latter would not only (or so I think) avoid code duplication, but also catch the case where the driver reports no or incomplete information.

> which is mostly what you said, but not pushing timeouts to upsd.
Yes.  I still differ on the latter.

> and we should not agonize over shades of grey of not ok
When upsd would use a default timeout (or a set of default timeouts), then there would be no need to agonize over shades of grey, but still the possibility to do so.  The driver could still tell upsd that battery ageing can only be obtained once per day or that there's something wrong if load is not updated every second.



More information about the Nut-upsdev mailing list