[Nut-upsuser] New batteries and another attempt to get nut running

Gene Heskett gheskett at wdtv.com
Mon Mar 2 01:57:49 UTC 2015



On Sunday 01 March 2015 19:16:47 Charles Lepple wrote:
> On Sun, Mar 1, 2015 at 2:23 PM, Gene Heskett <gheskett at wdtv.com> wrote:
> > Hi Charles; I hope this finds you well.
>
> Hi Gene,
>
> > Here is dmesg output:
> > gene at coyote:~$ dmesg |grep Belkin
> > [    3.315667] usb 2-3: Product: Belkin UPS
> > [    3.315669] usb 2-3: Manufacturer: Belkin
> > [    4.084258] generic-usb 0003:050D:0751.0009: hiddev0,hidraw4: USB
> > HID v1.11 Device [Belkin  Belkin UPS] on usb-0000:00:02.0-3/input
> >
> > I have configured it to use this generic-usb,
>
> Configured NUT, udev, or the kernel?
Udev & kernel are as installed except for the renumbering of the udebv 
rule, since reverted.
>
> (For most Linux distributions on PC hardware, the stock kernel should
> work, since NUT can kick out the hiddev and hidraw drivers at
> runtime.)
>
> > and probably made it less
> > secure by adding myself to /etc/group/nut and changing many of the
> > perms to 0660 or 0664 so I can edit this stuff as me.  Those of
> > course are fixable later if needed.  But I use dd-wrt here, and no
> > one has ever succeeded in getting past it to do anything but look
> > and dl from my web page (in sig)
>
> Just to be clear, the UPS is directly connected to the Debian wheezy
> box you mentioned before, correct? (This seems to have a much higher
> chance of success than dd-wrt, since the USB drivers for non-PC
> systems seem to be lacking in general.)

Yes, plugged into a usb2 port on this machine.

> > Then I setup some defaults as I can sort of recall them from
> > previous setups.
> >
> > Stepping into /etc/init.d and doing this, isn't getting me there
> > according to the response:
> >
> > gene at coyote:/etc/init.d$ sudo ./nut-server restart
> > [ ok ] Restarting NUT - power devices information server and
> > drivers: upsd (driver(s) failed)  (driver(s) failed). upsd.
> >
> > However:
> > gene at coyote:/etc/init.d$ ps axu|grep nut
> > nut      31366  0.0  0.0   2256   524 ?        Ss   14:01   0:00
> > /sbin/upsd gene     31740  0.0  0.0   3488   764 pts/6    S+   14:09
> >   0:00 grep nut
> >
> > says upsd is running.  From that I get that generic-usb is the wrong
> > driver.
>
> The generic-usb driver name seems to be coming from the kernel. It is
> somewhat disconnected from the NUT driver names, though.
>
> Unfortunately, Debian suppresses all the useful diagnostic messages.
> Since the driver failed to start, you can try starting it with the
> NUT-specific 'sudo /sbin/upsdrvctl start', which will show startup
> messages.
>
> Based on the USB IDs in the kernel message (the "050D:0751", which is
> what lsusb would print), the NUT driver I think you are looking for is
> "usbhid-ups".
>
More better:
gene at coyote:/etc/nut$ sudo /etc/init.d/nut-server restart
[ ok ] Restarting NUT - power devices information server and drivers: 
upsd (driver(s) failed)  driver(s). upsd.
gene at coyote:/etc/nut$ sudo /etc/init.d/nut-server stop
[ ok ] Stopping NUT - power devices information server and drivers: upsd 
driver(s).
gene at coyote:/etc/nut$ sudo /sbin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.6.4
Network UPS Tools - Generic HID driver 0.37 (2.6.4)
USB communication driver 0.32
Using subdriver: Belkin HID 0.15

And that looks a lot more promising.
Stop that, and restart nut-server, no errors this time.

And 
gene at coyote:/etc/nut$ upsc myups at localhost
battery.charge: 100
battery.charge.low: 30
battery.charge.warning: 30
battery.runtime: 120
battery.type: PbAc
battery.voltage: 27.8
battery.voltage.nominal: 24
device.mfr: Belkin 
device.model: Belkin UPS
device.serial:             
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyUSB0
driver.version: 2.6.4
driver.version.data: Belkin HID 0.15
driver.version.internal: 0.37
input.frequency: 60.0
input.frequency.nominal: 60
input.transfer.high: 140
input.transfer.high.max: 144
input.transfer.high.min: 140
input.transfer.low: 88
input.transfer.low.max: 88
input.transfer.low.min: 84
input.voltage: 123.8
input.voltage.nominal: 120
output.frequency: 59.9
output.voltage: 124.1
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.firmware: 1
ups.load: 21
ups.mfr: Belkin 
ups.model: Belkin UPS
ups.power.nominal: 1500
ups.productid: 0751
ups.serial:             
ups.status: OL CHRG
ups.test.result: No test initiated
ups.timer.shutdown: 0
ups.timer.start: 0
ups.type: offline
ups.vendorid: 050d

So thats working now.

Next, upsmon &  friends so I can look at it in iceweasal or ?

> If that works, we can try to tweak the text in the HCL, so that it is
> easier to look up based on the markings on the UPS:

Which, despite my shaving it with a strong LED flashlight looking for 
bumps that resemble text in that black on black environment. I can't 
find a model number on it.  Except for a previous battery change maybe 3 
years ago, its been sitting there, with me generally ignoring it for at 
least 6 years now.

HCL? Not a familiar acronym to me.  Ah, the link.
   
> http://www.networkupstools.org/stable-hcl.html?manufacturer=Belkin&con
>nection=USB

Which explains it, now its up to me to remember.. :(

Thanks Charles.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



More information about the Nut-upsuser mailing list