[Nut-upsuser] Setting UPS values can be confusing

Kris Jordan nut01.kj at sagebrushnetworks.com
Tue Feb 25 00:02:03 UTC 2014


Windows 7 Pro x64, NUT 2.6.5-4 (interim release)
Product: Back-UPS RS 1200 FW:8.g3 .D USB FW:g3

Setting UPS values can be confusing. For example, battery.charge.low and 
battery.runtime.low.

Using upsrw, the values will be retained after restarting the OS, but 
not if the UPS is turned off/restarted.

In the driver log (below), it looks like the values are obtained from 
the UPS, but if I set default.<variable> in ups.conf, those get used 
instead, indicating that the UPS isn't providing those values (per the 
man page).

I did some tests to see how the UPS responds after using upsrw...

battery.charge.low --> LB reported by NUT, UPS beeper doesn't indicate LB.
battery.runtime.low --> LB reported by NUT, UPS beeper indicates LB.

The lowbatt option changes the value in upsc, but otherwise doesn't do 
anything, I saw it get reset back to 10 after running upscmd.

So I guess it would be best to use ignorelb and override.<variable>?

---
    0.624002    hid_lookup_usage: UPS -> 00840004
    0.624002    hid_lookup_usage: PowerSummary -> 00840024
    0.624002    hid_lookup_usage: RemainingCapacityLimit -> 00850029
    0.624002    string_to_path: depth = 3
    0.624002    Report[buf]: (2 bytes) => 11 0a
    0.624002    PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 1
    0.624002    Unit = 00000000, UnitExp = 0
    0.624002    Exponent = 0
    0.624002    Path: UPS.PowerSummary.RemainingCapacityLimit, Type: 
Feature, ReportID: 0x11, Offset: 0, Size: 8, Value: 10
    0.624002    send_to_all: SETINFO battery.charge.low "10"
    0.624002    send_to_all: SETFLAGS battery.charge.low RW STRING
    0.624002    send_to_all: SETAUX battery.charge.low 10

    0.624002    hid_lookup_usage: UPS -> 00840004
    0.624002    hid_lookup_usage: Battery -> 00840012
    0.624002    hid_lookup_usage: RemainingTimeLimit -> 0085002a
    0.624002    string_to_path: depth = 3
    0.624002    Report[buf]: (3 bytes) => 24 78 00
    0.624002    PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
    0.624002    Unit = 00001001, UnitExp = 0
    0.624002    Exponent = 0
    0.624002    Path: UPS.Battery.RemainingTimeLimit, Type: Feature, 
ReportID: 0x24, Offset: 0, Size: 16, Value: 120
    0.624002    send_to_all: SETINFO battery.runtime.low "120"
    0.624002    send_to_all: SETFLAGS battery.runtime.low RW STRING
    0.624002    send_to_all: SETAUX battery.runtime.low 10

   21.993257    setvar(battery.charge.low, 20)
   21.993257    Unit = 00000000, UnitExp = 0
   21.993257    Exponent = 0
   21.993257    PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 1
   21.998258    Report[set]: (2 bytes) => 11 14
   21.998258    Set report succeeded
   21.998258    setvar: SUCCEED

   30.217728    setvar(battery.runtime.low, 240)
   30.217728    Unit = 00001001, UnitExp = 0
   30.217728    Exponent = 0
   30.217728    PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
   30.222728    Report[set]: (3 bytes) => 24 f0 00
   30.222728    Set report succeeded
   30.222728    setvar: SUCCEED





More information about the Nut-upsuser mailing list