[Nut-upsdev] RunTimeToEmpty is in minutes or seconds?

Kelly Byrd kbyrd at memcpy.com
Tue Jan 2 18:49:36 GMT 2024


Looking through a bunch of the code for drivers using HID, It looks like
everyone is using "ups.powersummary.runtimetoempty" to map to NUT's
"battery.runtime" variable.

My question for you all is what units ups.powersummary.runtimetoempty is
supposed to be in? This doc from USB.org:
https://www.usb.org/sites/default/files/hut1_4.pdf (Section 31.2) says
minutes, but the NUT developer docs:
https://networkupstools.org/docs/developer-guide.chunked/apas02.html
(Section A.3) says battery.runtime is in seconds.

Is this just a case where real world UPS' are using seconds so we're stuck
with it now? I guess it's being pedantic, but IMO trying to measure a UPS
remaining runtime with accuracy is sort of silly. I noticed this because
I'm cobbling together a personal project that has absurd capacity for the
load, somewhere around 2-3 days from a fully charged battery and I'm using
NUT's Arduino driver to report things. It's not critical that I be able to
communicate that much remaining time, but I wanted to ask here about the
difference.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20240102/f54f21f9/attachment.htm>


More information about the Nut-upsdev mailing list