[Nut-upsuser] APC Back-UPS CS 650 offdelay and startdelay

Charles Lepple
Thu, 23 Aug 2018 00:16:07 -0000

On Aug 22, 2018, at 1:20 PM, Karol Olszewski <karol.olszewski at
ipflow.pl> wrote:
>
> W dniu 22.08.2018 o 14:41, Charles Lepple pisze:
>> /lib/nut/usbhid-ups -a apc -DDD -k
> Please see attachement.

   1.872180	Report[buf]: (2 bytes) => 40 00
   1.872196	Path: UPS.Output.APCDelayBeforeReboot, Type: Feature, ReportID:
0x40, Offset: 0, Size: 8, Value: 0
[...]
   1.872439	Initiating UPS shutdown
   1.872455	upsdrv_shutdown...
   1.872470	instcmd(shutdown.return, [NULL])
   1.884650	Report[set]: (2 bytes) => 40 01

For some reason, this is being hardcoded to 1:

drivers/apc-hid.c-  /* used by APC BackUPS CS */
drivers/apc-hid.c:  { "shutdown.return", 0, 0,
"UPS.Output.APCDelayBeforeReboot", NULL, "1", HU_TYPE_CMD,
NULL },

Can you rebuild the NUT drivers as described here?