[Nut-upsuser] I can't make changes to ups.delay.shutdown to stick

Charles Lepple clepple at gmail.com
Sat Apr 5 15:28:24 UTC 2014


On Apr 5, 2014, at 10:39 AM, Charles Lepple wrote:

> On Apr 5, 2014, at 8:52 AM, Mick <michaelkintzios at gmail.com> wrote:
> 
>>> The upsrw command was designed for changing variables that are typically
>>> stored in non-volatile memory on the UPS. Unfortunately, your UPS doesn't
>>> seem to do that.
>> 
>> Well, if it doesn't do that, how come upsc reports the changed value?  It is 
>> only after I reboot the PC (not the UPS) or restart the driver that the 
>> default value of 20s is shown again.
> 
> I'd have to check the code, but I'm fairly certain that writing a variable invalidates at least part of the HID cache in the driver.
> 
> However, it is possible that something in the driver initialization is resetting that variable. Are there any extra settings in ups.conf? Can you please send a driver log with -DDDD, gzipped and attached (so as not to wrap the lines)? Same length of time as before is good.


Mick, hold that thought.

  1.006824	Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, 
ReportID: 0x0f, Offset: 0, Size: 24, Value: 60
  1.010820	Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, 
ReportID: 0x11, Offset: 0, Size: 24, Value: 0

Arnaud, is HU_FLAG_ABSENT the right flag here? That seems to indicate that the variable is not actually implemented on the UPS:

drivers/idowell-hid.c:99:
        { "ups.delay.start", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.PowerSummary.DelayBeforeStartup", NULL, DEFAULT_ONDELAY, HU_FLAG_ABSENT, NULL},
        { "ups.delay.shutdown", ST_FLAG_RW | ST_FLAG_STRING, 10, "UPS.PowerSummary.DelayBeforeShutdown", NULL, DEFAULT_OFFDELAY, HU_FLAG_ABSENT, NULL},

It is not clear how this value is being used.

-- 
Charles Lepple
clepple at gmail






More information about the Nut-upsuser mailing list