[Nut-upsuser] Incorrect 'low battery' detected with Back-UPS XS 1200 (usbhid-ups)

Arjen de Korte nut+users at de-korte.org
Sat Nov 17 21:24:01 UTC 2007


hanji wrote:

> Strange. Looks like my init script already does this:
> 
> start() {
>         ebegin "Starting upsd"
>         # clean up first
>         pkill -u root -x upsd
>         sleep 1s
>         rm -f ${pidfile}
>         # now start up
>         start-stop-daemon --start --quiet --exec /usr/sbin/upsd
>         eend $?
> }

No, that's the server. It is the driver that is causing the problems:

Can't connect to UPS [apc1] (usbhid-ups-apc1): Connection refused [ ok ]

As I already wrote before, stopping a driver is an asynchronous process,
which may take some time. On a reasonably fast system (almost all
systems nowadays) the driver may not have stopped, so a new driver won't
start. But the driver is already scheduled to stop, so it will suddenly
dissappear.

[...]

>> From looking at the above, I have my doubts about your UPS'es. Basically
>> all it is responding is 0 or 1. Nevertheless, post the first few seconds
>> worth of output from the command
>>
>> 	/lib/nut/usbhid-ups -DD -a apc1
>>
>> and we'll see what we can do. This will hopefully provide enough
>> information to tell what the heck is going on.
> 
> Here is my output:
> 
> upsdrv_updateinfo...
> dstate_init: sock /var/lib/nut/usbhid-ups-apc1 open on fd 5
> upsdrv_updateinfo...
> Waiting for notifications...
> 
> =>Got 2 HID Objects...
> battery.charge = 100
> battery.runtime = 1387
> upsdrv_updateinfo...
> Waiting for notifications...
> 
> =>Got 3 HID Objects...
> ups.status = !chrg
> ups.status = !dischrg
> ups.status = !off
> upsdrv_updateinfo...
> Waiting for notifications...
> 
> =>Got 2 HID Objects...
> battery.charge = 100
> battery.runtime = 1387
> upsdrv_updateinfo...
> Waiting for notifications...
> 
> =>Got 3 HID Objects...
> ups.status = !chrg
> ups.status = !dischrg
> ups.status = !off
> upsdrv_updateinfo...
> Waiting for notifications...
> 
> =>Got 2 HID Objects...
> battery.charge = 100
> battery.runtime = 1417
> upsdrv_updateinfo...
> Waiting for notifications...
> 
> =>Got 3 HID Objects...
> ups.status = !chrg
> ups.status = !dischrg
> ups.status = !off
> upsdrv_updateinfo...
> Waiting for notifications...
> 
> =>Got 2 HID Objects...
> battery.charge = 100
> battery.runtime = 1447
> upsdrv_updateinfo...
> Waiting for notifications...
> 
> =>Got 3 HID Objects...
> ups.status = !chrg
> ups.status = !dischrg
> ups.status = !off
> Signal 2: exiting
> Closing device

You trimmed off the initial (and most interesting) part of the startup
of this driver. Don't do that, unless we ask you to do so.

Best regards, Arjen



More information about the Nut-upsuser mailing list