[Nut-upsuser] Support of & amp; quot; shutdown.return& amp; quot; on a APC Back-UPS CS 500

Arjen de Korte nut+users at de-korte.org
Tue Jan 18 13:15:48 UTC 2011


Citeren Kevin <bakdong op gmail.com>:

>    0.686325     Initiating UPS shutdown
>    0.686340     upsdrv_shutdown...
>    0.686365     instcmd(shutdown.return, [NULL])
>    0.686382     find_nut_info: unknown info type: shutdown.return

This is normal. Some UPS'es (models that have a HID layer around an  
essential serial interface) support a command that will result in what  
NUT calls 'shutdown.return', so that's what we try first. A true HID  
PDC UPS (like the APC models you have) don't, so this command is not  
found. This is exactly what we expect.

>    0.686398     instcmd(load.on.delay, 30)
>    0.686433     Unit = 00001001, UnitExp = 0
>    0.686450     Exponent = 0
>    0.686464     PhyMax = 0, PhyMin = 0, LogMax = 32767, LogMin = -1
>    0.690437     Report[set]: (3 bytes) => 28 1e 00
>    0.690437     Set report succeeded
>    0.690437     instcmd: SUCCEED

In a HID PDC UPS, you need to set both the timer for shutdown and  
(re)start independently. They start counting down immediately after  
setting the report, so we set the (re)start timer...

>    0.690437     instcmd(load.off.delay, 20)
>    0.690437     Unit = 00001001, UnitExp = 0
>    0.690437     Exponent = 0
>    0.690437     PhyMax = 0, PhyMin = 0, LogMax = 32767, LogMin = -1
>    0.695437     Report[set]: (3 bytes) => 12 14 00
>    0.695437     Set report succeeded
>    0.695437     instcmd: SUCCEED

...before the stop timer, so that we don't get stuck if the power is  
lost. In that case, the (re)start timer will have expired and a UPS  
will not start again.

> APC CS 500
> This shuts down the APC CS 500 after 20 seconds.  (and it stays shutdown)

This probably means the driver called 'load.off.delay 20', which is  
the last resort option for the usbhid-ups. It looks like it doesn't  
have a mapping for 'shutdown.reboot', which the logs you have produced  
should reveal.

> APC Smart-UPS 1000
> If the power is left on, switches to battery and back online after 2 seconds.

Either the HID PDC implementation in this UPS is broken or what you're  
seeing is 'shutdown.reboot'. The timers are in seconds and with mains  
present, the UPS should stop 20 seconds after running this command and  
resume again 10 (30-20) seconds later.

> If the power is off, goes to sleep after 90 seconds. (and comes back  
> on when the power is connected)

This is broken either way. There is nothing we can do about that.

Best regards, Arjen
-- 
Please keep list traffic on the list (off-list replies will be rejected)




More information about the Nut-upsuser mailing list