[Nut-upsuser] Incorrect battery.runtime.low being reported?

Charles Lepple clepple at gmail.com
Wed Mar 9 04:13:05 UTC 2016


On Mar 8, 2016, at 12:54 PM, Mike Lee <curby+forums at cur.by> wrote:
> 
> On Mon, Mar 7, 2016 at 9:00 PM, Charles Lepple <clepple at gmail.com> wrote:
>> If you stop and start the driver, it should refresh.
> 
> Hi Charles, thanks for the reply!  Pardon the dead horse beating, but
> I just want to clarify/confirm two things:
> 
> 1) I did my full power down test (including powering down UPS and NAS,
> and restarting them) after the change to 600s on the UPS.  Shouldn't
> this pass for restarting the driver, or do you mean that the driver
> has to be separately restarted after every boot (or perhaps after
> every on-UPS change)?

That should do it... strange.

You mentioned this briefly, but are there any special settings needed in ups.conf?

> 2) If I don't refresh NUT's cached value, so the UPS thinks 600 and
> NUT thinks 120, which value will be honored if the power goes out?  My
> understanding is that the UPS self-reports its low battery status, so
> it will report "OB LB" to NUT when it thinks there's 600s left.  In
> other words, the UPS value of 600s should "win."
> 

The UPS value should take precedence, but it is certainly strange that the UPS is not reporting the same value to NUT.

Note that there are two different HID strings that map to battery.runtime.low:

https://github.com/networkupstools/nut/blob/master/drivers/apc-hid.c#L309

I think that means that NUT will pick the first one that works (between "UPS.Battery.RemainingTimeLimit" and "UPS.PowerSummary.RemainingTimeLimit"), but there certainly have been discrepancies between the spec and what gets implemented.

If you want, we can take a look at the debug output of the driver. Not sure how that works in the NAS, but it involves killing the usbhid-ups process, and restarting it with other command-line arguments. You could also install NUT on a general-purpose Linux distro (even through a Live CD) and run the driver from there.

-- 
Charles Lepple
clepple at gmail






More information about the Nut-upsuser mailing list