Entries in GUI for ups.conf aux parameters causes failure of UPS driver

Status
Not open for further replies.

SkyMonkey

Contributor
Joined
Mar 13, 2013
Messages
102
FreeNAS Version: FreeNAS-9.3-STABLE-201503270027
UPS: Cyberpower 1350PFCLCD
UPS Driver: Cyber Power Systems ups 2 CP1000PFCLCD USB (usbhid-ups)

Issue:
I'm attempting to lengthen the shut off delay for my UPS, as the system doesn't quite seem to get to a power off state before the command to shut off the ups goes out. The resulting countdown on my ups is less than 5 seconds. I'm not sure of the intended behavior, but the screen on the ups shows a countdown starting with "0" and then shuts off almost immediately, and prior to the system completing shutdown. See the comment at the end of this bug report for more info on what seems to be happening: https://bugs.pcbsd.org/issues/7675

I attempted to follow Vagelis Savvas's guidance there to add the ups.delay.shutdown string to the aux parameters in the UPS service gui. Any entry in that area seems to cause the ups driver to fail to load, with the following message appearing in the console over and over:

Code:
Mar 27 16:23:20 freenas upsmon[34699]: Poll UPS [ups] failed - Driver not connected
Mar 27 16:23:20 freenas kernel: <118>Mar 27 16:23:20 freenas upsmon[34699]: Poll UPS [ups] failed - Driver not connected
Mar 27 16:23:25 freenas upsmon[34699]: Poll UPS [ups] failed - Driver not connected
Mar 27 16:23:25 freenas kernel: <118>Mar 27 16:23:25 freenas upsmon[34699]: Poll UPS [ups] failed - Driver not connected


I have verified that the file gets created correctly (in this example I was trying ups.timer.shutdown, to see if it would work where the ups.delay.shutdown did not...the behavior was identical):
Code:
[ups]
    driver = usbhid-ups
    port = /dev/ugen0.3
    desc = ""
ups.timer.shutdown = 60


I am not sure if this a freenas issue, nut issue, or particular isssue with my ups to be honest....

It seems like it'd be wise to at very least allow the user to prevent nut from issuing the power off command to the ups, as not all ups's might support overriding the shutdown delay (which could be my problem, though I'm not 100% sure...)
 

SkyMonkey

Contributor
Joined
Mar 13, 2013
Messages
102
Nope, never did. I only have the one configuration to test with, so no real way to narrow it down on my setup.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
Some ups.conf values are only defined in the driver man pages. For instance, using the usbhid-ups driver with my APC UPS I use (for a similar purpose) a parameter called offdelay which I have set to 300. However, this only works when entered without any spaces around the equals sign, otherwise it is ignored. Thus:

offdelay=300

I didn't find this documented anywhere, so perhaps your driver behaves in a similar way.

Edit: on reflection this is perhaps not clear. I am suggesting omitting the spaces around the equals sign, but using your driver's parameters.
 
Last edited:

SkyMonkey

Contributor
Joined
Mar 13, 2013
Messages
102
Had a few minutes to take a look at this again, and I can report that it was a case of PEBKAC.

Thanks SweetAndLow and rogerh for putting me on the right track, I was using the wrong parameters. The driver man page I was looking at was for an APC specific driver, while I am using usbhid-ups. Using the value "offdelay" as specified at http://www.networkupstools.org/docs/man/usbhid-ups.html made things work as expected.

Thanks again folks.
 
Status
Not open for further replies.
Top