hanji wrote:

> Thanks for replying to my email. I updated to 2.2.0, and I'm running
> into the same problem, but also encountered other issues. After
> upgrading to 2.2.0 and using the usbhid-ups driver, I was not able to
> get a clean restart of upsd.
> 
> /etc/init.d/upsd restart
>  * Stopping upsd ...                                              [ ok ]
>  * Starting upsd ...
> Network UPS Tools upsd 2.2.0-
> listening on 0.0.0.0 port 3493
> Can't connect to UPS [apc1] (usbhid-ups-apc1): Connection refused [ ok ]
> 
> The only way to get this to work was by firing up the driver first,
> then starting upsd...

You probably need to put a delay in the /etc/init.d/upsd script for
restart. Stopping a driver is an asynchronous process, which means that
the actual stopping of the driver will be sometime later. Assuming this
script looks something like

  restart)
        $0 stop
        $0 start
        ;;

you'd need to sleep for a second or two between stopping and starting like

  restart)
        $0 stop
        sleep 2
        $0 start
        ;;

> /lib/nut/usbhid-ups -a apc1
> Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30
> (2.2.0-) Detected a UPS: American Power Conversion/Back-UPS XS 1200
> FW:8.g1 .D USB FW:g1 Using subdriver: APC/CyberPower HID 0.9
> 
> /etc/init.d/upsd start
>  * Starting upsd ...
> Network UPS Tools upsd 2.2.0-
> listening on 0.0.0.0 port 3493
> Connected to UPS [apc1]: usbhid-ups-apc1 
> 
> But, now when I issue the upsc [EMAIL PROTECTED], I get the same values
> (low battery, etc)
> 
> upsc [EMAIL PROTECTED]
> battery.charge: 1
> battery.charge.low: 1
> battery.charge.warning: 1
> battery.date: 2001/00/00
> battery.mfr.date: 1980/00/01
> battery.runtime: 1
> battery.runtime.low: 1
> battery.temperature: -272
> battery.type: Back-UPS XS 1200 FW
> battery.voltage: 1.0
> battery.voltage.nominal: 1.0
> driver.name: usbhid-ups
> driver.parameter.pollinterval: 2
> driver.parameter.port: auto
> driver.version: 2.2.0-
> driver.version.data: APC/CyberPower HID 0.9
> driver.version.internal: 0.30
> input.transfer.high: 1
> input.transfer.low: 1
> input.voltage: 1.0
> input.voltage.nominal: 1
> output.voltage: 1.0
> output.voltage.nominal: 1.0
> ups.beeper.status: disabled
> ups.delay.restart: 1
> ups.delay.shutdown: 1
> ups.firmware: 8.g1 .D
> ups.firmware.aux: g1
> ups.load: 1.0
> ups.mfr: American Power Conversion
> ups.mfr.date: 1980/00/01
> ups.model: Back-UPS XS 1200
> ups.power.nominal: 1
> ups.productid: 0002
> ups.serial: JB0612018831
> ups.status: OL LB OVER RB BOOST
> ups.test.result: Done and passed
> ups.vendorid: 051d

>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.

> So not sure about the startup issue. I guess we'll need to proceed to
> driver debug?

See above.

Best regards, Arjen

_______________________________________________
Nut-upsuser mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Reply via email to