[Nut-upsuser] APC smartups 1500 is broken with usbhid-ups

Arjen de Korte nut+users at de-korte.org
Sun Dec 2 07:40:16 UTC 2007


>>> The output of "upsrw ups2 at localhost":
>>> [battery.charge.low]
>>> Remaining battery level when UPS switches to LB (percent)
>>> Type: STRING
>>> Value: 10
>>>
>>> [battery.runtime.low]
>>> Remaining battery runtime when UPS switches to LB (seconds)
>>> Type: STRING
>>> Value: 120
>>>
>>> [ups.beeper.status]
>>> UPS beeper status
>>> Type: STRING
>>> Value: enabled
>>>
>>> [ups.delay.restart]
>>> Description unavailable
>>> Type: STRING
>>> Value: -1
>>>
>>> [ups.delay.shutdown]
>>> Interval to wait after shutdown with delay command (seconds)
>>> Type: STRING
>>> Value: -1
>>
>> This all looks good.
>>
> Why is this output not so elaborated like the apcsmart one?

Because the HID Power Devices specification protocol used by the APC USB
UPS'es, doesn't specify how to get enumerated values from the UPS. It
allows values to be set in 1 second increments for the underlying HID
values, but these can/may be rounded off by the UPS to a multiple of some
internal interval. There is no way to find that out without actually
setting the value (which we certainly don't want).

>>> After running "upsrw -u someuser -p somepass -s ups.delay.restart=60
>>> ups2 at localhost" the value of "ups.delay.restart" is 180. I tried all
>>> the values in APC manual, but the value stored in the variable is
>>> never the one i specified. "ups.delay.shutdown" has the same
>>> behaviour.
>>
>> The fact that the driver made these values writable, was a mistake.
>> These should be read-only. Since setting these values will start a timer
>> immediately, they should be changed through 'upscmd'. This was corrected
>> in the latest version available through SVN in either the 'trunk' or
>> 'branches/Testing'.
>
> So, could you explain me the strange behaviour? Why the value of the
> variable is never the one you set, and what kind of unit are used?
> Minutes? Hours?

See above.

>> That is not the meaning of the 'ups.delay.start'. This will only delay
>> startup if mains power is uninterrupted and you command the UPS to
>> shutdown with a delay and back on again with a delay. Broken in your
>> version.
>
> Now i'm confused. How can i set delays to the different ups? I need to
> boot my devices in one specific order, and the only way to do that is
> with boot delays at the ups.

At present, you can't.

> Powerchute from APC can do that, and as far i can remember, so can
> apcupsd.

That is something that currently isn't available for APC and the
'usbhid-ups' driver, simply because we don't have a HID variable that
allows setting that. The only setting that we have is a timer that is
started immediately when setting it, not one that is triggered by the
return of the mains. That doesn't mean such a variable isn't available
(manufacturers may define additional ones on top of the HID Power Devices
specification), we just don't know about it. One vendor I know supports
something like this, is MGE and for those devices, we support this.

As explained already, run the driver in debug mode and we may be able to
support this in the future.

Best regards, Arjen






More information about the Nut-upsuser mailing list