[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 20:24:27 UTC 2007


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 apc1 at localhost, I get the same values
> (low battery, etc)
> 
> upsc apc1 at localhost
> 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



More information about the Nut-upsuser mailing list