[Nut-upsdev] belkin-hid:

Arjen de Korte nut+devel at de-korte.org
Thu Aug 2 09:16:42 UTC 2007

> Currently either the OL or OB status is shown, because of the following
> lines in usbhid-ups:
> 	if (ups_status & STATUS_ONLINE) {
> 		status_set("OL");		/* on line */
> 	} else {
> 		status_set("OB");               /* on battery */
> Historically, most (if not all) drivers treat these this way.

I already found there are exceptions to this rule. We certainly need to
improve the documentation on when to set (or not set) the status flags, as
looking at the driver sources, there is a lot of confusion resulting in
drivers needlessly masking out status information.

> Basically, what OL/OB only say something about the UPS input only, not
> about the output.

After peeking in some sources, I found that some drivers actually don't
display these values if the output is switched off. Personally I feel this
is counter productive. Even if the output is switched off, it can still be
worthwile to know whether the mains is present or not (a typical UPS
should be powered regularly in order not to damage the batteries). You
don't want to find out that after installing a UPS in a remote location,
you forgot to plug in the mains. :-)

Best regards, Arjen

More information about the Nut-upsdev mailing list