Mike Lee
2016-Mar-08 17:54 UTC
[Nut-upsuser] Incorrect battery.runtime.low being reported?
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)? 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." Thanks again! --Mike
Charles Lepple
2016-Mar-09 04:13 UTC
[Nut-upsuser] Incorrect battery.runtime.low being reported?
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
Mike Lee
2016-Mar-09 07:14 UTC
[Nut-upsuser] Incorrect battery.runtime.low being reported?
On Tue, Mar 8, 2016 at 9:13 PM, Charles Lepple <clepple at gmail.com> wrote:> You mentioned this briefly, but are there any special settings needed in ups.conf?Here're the non-empty, non-comment lines from the config files: http://pastebin.com/KjynNds3 I didn't do anything special: I just used the NAS web interface and clicked four checkboxes: enable support for the UPS, start the NUT server so other computers could connect as clients, keep machines up until the UPS went to LB, and shut the UPS down after the NAS disks were remounted RO and the NAS was ready to go offline.> 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.I'll take a look at the docs to see if they mention restarting the driver in debug mode, but any pointers/tips would be great! That said, the NAS can be a bit touchy. Maybe I should connect up the UPS to another machine to let it query the UPS and see what it says. Thanks again! --Mike