[Nut-upsuser] Support of & amp; amp; quot; shutdown.return& amp; amp; quot; on a APC Back-UPS CS 500
Kevin
bakdong at gmail.com
Tue Jan 18 15:54:01 UTC 2011
Arjen de Korte <nut+users <at> de-korte.org> writes:
>
> Citeren Kevin <bakdong <at> 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
Thanks for the response.
I have to say that this is way beyond me. We know that the UPS models in
question support the function that we want (sleep/hibernate), and we know the
command that is needed to initiate that state. It's been working in previous
releases on at least the Smart-UPS 1000, and it was working with a small
amendment to the code on the old hidups module.
It's a shame that I can't seem to get the up to date releases working properly
on both of these UPS models, specially after seeing that it can be done,
apparently fairly simply, by sending the 0xff86007c code in both cases.
Anyway, at lease I have now shared the very limited knowledge that I have gained
from the exercise with the NUT user community, so maybe, hopefully, someone will
be able to benefit from it in the future.
Regards,
Kevin.
More information about the Nut-upsuser
mailing list