Javier Miqueleiz
2010-Nov-11 17:39 UTC
[Nut-upsuser] Setting offdelay and ondelay in Smart-UPS 1500 RM units
Hello there. Have been experimenting with an APC Smart-UPS 1500 RM and would like to share the results of my research. I hope this could be of help to people having this kind of units. I would also like to give something back to the NUT community. :) Here are the details of the unit in question (a 1500 VA rack mountable one): Model: Smart-UPS 1500 RM Firmware revision: 617.3.I USB firmware revision: 1.5 Manufacturing date: 2003/06/03 The unit can be monitored with NUT, no problem at this. But when turning it off an back on, the "offdelay" and "ondelay" parameters from "ups.conf" aren't honored. This unit uses a different HID path than the stardard one for sending a "load.on.delay" command. As the driver (usbhid-ups) can't find this command, it has to revert to rebooting the UPS. The HID paths involved are: - "UPS.PowerSummary.DelayBeforeStartup": the standard command for triggering a "load.on.delay" in USB units. - "UPS.Output.DelayBeforeStartup": used in this unit for triggering a "load.on.delay". The former doesn't exist. If you add the HID path "UPS.PowerSummary.DelayBeforeStartup" to "apc-hid.c", the driver will be able to use the "load.on.delay" command. And it will send a "load.on.delay", "load.off.delay" at shutdown. This way, the "offdelay" parameter will be honored. (The patch for this is trivial. Could post it if someone is interested). With regards to "ondelay", the unit doesn't fully honor it. Seems to have its quirks on this. Here are my results. - offdelay>=0, ondelay=-1: the unit will shut down the load at the specified delay. And it will remain off. To turn it back on, the power-on button on the front panel must be pressed. - offdelay>=0, ondelay>offdelay: the unit will shut down the load at the specified delay. The UPS will turn it back on as soon as the external power is on. The "ondelay" is not honored in this case. Hope this could be of help. Kind regards to all. ;) -- ---- Javier Miqueleiz <javier.PLEASE.DONT at SEND.ME.SPAM.miqueleiz.com> ---------- "There's nothing to it. You just have to press the right keys with the right force at the right time, and the organ will produce the nicest music all by itself." --------------------------------------------------------------------------------
Arjen de Korte
2010-Nov-11 18:57 UTC
[Nut-upsuser] Setting offdelay and ondelay in Smart-UPS 1500 RM units
Citeren Javier Miqueleiz <javier op miqueleiz.com>:> This unit uses a different HID path than the stardard one for sending a > "load.on.delay" command. As the driver (usbhid-ups) can't find this command, > it has to revert to rebooting the UPS. The HID paths involved are: > > - "UPS.PowerSummary.DelayBeforeStartup": the standard command for triggering > a "load.on.delay" in USB units. > - "UPS.Output.DelayBeforeStartup": used in this unit for triggering a > "load.on.delay". The former doesn't exist.Please run the following command /path/to/usbhid-ups -DDD -a upsname > Smart-UPS1500RM.log 2>&1 Make sure to kill any usbhid-ups drivers lingering in the background before running this command. Wait 15 seconds and then kill it with Ctrl-C. Gzip the log file that is created and post it here.> If you add the HID path "UPS.PowerSummary.DelayBeforeStartup" to "apc-hid.c", > the driver will be able to use the "load.on.delay" command. And it > will send a "load.on.delay", "load.off.delay" at shutdown.We already have this mapping. Could it be that you actually meant "UPS.Output.DelayBeforeStartup"? Posting the logs is sufficient, it will provide us with all the information we need.> With regards to "ondelay", the unit doesn't fully honor it. Seems to have its > quirks on this.We only support it if we can find the corresponding HID mapping.> - offdelay>=0, ondelay=-1: the unit will shut down the load at the specified > delay. And it will remain off. To turn it back on, the power-on button on the > front panel must be pressed. > > - offdelay>=0, ondelay>offdelay: the unit will shut down the load at the > specified delay. The UPS will turn it back on as soon as the external power > is on. The "ondelay" is not honored in this case.This is how it is supposed to work. The ondelay timer is only used in case the power is present, otherwise the unit will switch on as soon as the power returns. See also 'man 8 usbhid-ups' and the USB HID PDC specifications. The only thing the driver can do is to set the timers. It is up to the UPS how it deals with them (we can't control the UPS when the power is out). Best regards, Arjen -- Please keep list traffic on the list (off-list replies will be rejected)