Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

help with nut & ups

531 views
Skip to first unread message

Roland Latour

unread,
Aug 4, 2018, 2:14:16 PM8/4/18
to
I have a new UPS, AmazonBasics 800VA, connected via USB.
I installed nut, did some configuration to files in
/etc/nut, and it seems to be partially working.

When I check the system menu=>Settings=>PwrMgr=>Devices
it shows the UPS, fully charged, 1hr.2mins. so there
is some communication going on.

But when I run: $ NUT-Monitor
Traceback (most recent call last):
File "/usr/bin/NUT-Monitor", line 910, in <module>
gui = interface()
File "/usr/bin/NUT-Monitor", line 222, in __init__
self.connect_to_ups()
File "/usr/bin/NUT-Monitor", line 694, in connect_to_ups
commands = self.__ups_handler.GetUPSCommands( self.__current_ups )
File "/usr/lib/python2.7/dist-packages/PyNUT.py", line 180, in
GetUPSCommands
raise PyNUTError( result.replace( "\n", "" ) )
PyNUT.PyNUTError: ERR DRIVER-NOT-CONNECTED

When I pull the plug on the UPS, shouldn't I get some
warning on the screen? The nut documentation hasn't been
very helpful. Standalone mode, one PC, one UPS.

$ cat ups.conf
[AmazonBasics]
driver = "usbhid-ups"
port = "auto"
vendorid = "0764"
productid = "0501"
product = "ABST800"
vendor = "CPS"
bus = "005"
desc = "Amazon Basics UPS 800VA"

But I can't find usbhid-ups on my system or via apt-cache search.
There is no /usr/local/ups/bin. Where are these drivers? Do I have
the wrong one?

$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
No matching HID UPS found
Driver failed to start (exit status=1)

Thanks for any help you can give.

Ivan Shmakov

unread,
Aug 4, 2018, 3:05:46 PM8/4/18
to
>>>>> Roland Latour <no-...@nowhere.com> writes:

> I have a new UPS, AmazonBasics 800VA, connected via USB. I installed
> nut, did some configuration to files in /etc/nut, and it seems to be
> partially working.

> When I check the system menu=>Settings=>PwrMgr=>Devices it shows the
> UPS, fully charged, 1hr. 2mins. so there is some communication going on.

I'm not familiar with the DE you use, but could it be that it
interacts with your UPS by some other means than NUT?

Also, could it be showing some other value (something like
laptop's battery charge, for example) instead?

> But when I run: $ NUT-Monitor
> Traceback (most recent call last):

[...]

> File "/usr/lib/python2.7/dist-packages/PyNUT.py", line 180, in
> GetUPSCommands
> raise PyNUTError( result.replace( "\n", "" ) )
> PyNUT.PyNUTError: ERR DRIVER-NOT-CONNECTED

To me, that seems to indicate that NUT isn't, in fact, working.

> When I pull the plug on the UPS, shouldn't I get some warning on the
> screen?

Depends. For instance, my preference is for such warnings to be
issued by software with wall(1), so they will appear on the
(otherwise little used) window 0 of my "primary" Screen session.
So it will only go to screen /iff/ that window is displayed.

> The nut documentation hasn't been very helpful. Standalone mode,
> one PC, one UPS.

> $ cat ups.conf
> [AmazonBasics]
> driver = "usbhid-ups"
> port = "auto"
> vendorid = "0764"
> productid = "0501"
> product = "ABST800"
> vendor = "CPS"
> bus = "005"
> desc = "Amazon Basics UPS 800VA"

> But I can't find usbhid-ups on my system

How, exactly, did you search? Did you try, e. g.:

$ dpkg-query -S -- usbhid-ups

> or via apt-cache search. There is no /usr/local/ups/bin.

/usr/local is intended to be used for software installed from
sources /other/ than distribution's own repositories and packages.

> Where are these drivers?

These drivers apparently belong to the nut-server package, which
seems to be installed (as per the upsdrvctl command availability
below.) You can inspect the list of files a package provides with:

$ dpkg-query -- nut-server
...
/lib/nut/upscode2
/lib/nut/upsd
/lib/nut/usbhid-ups
/lib/nut/victronups
...
$

Alternatively, you can refer to http://packages.debian.org/, like:

http://packages.debian.org/stretch/all/nut/filelist
http://packages.debian.org/stretch/amd64/nut-client/filelist
http://packages.debian.org/stretch/all/nut-monitor/filelist
http://packages.debian.org/stretch/amd64/nut-server/filelist

> Do I have the wrong one?

> $ sudo upsdrvctl start
> Network UPS Tools - UPS driver controller 2.7.4
> Network UPS Tools - Generic HID driver 0.41 (2.7.4)
> USB communication driver 0.33
> No matching HID UPS found
> Driver failed to start (exit status=1)

I suppose you may have wrong identifiers in ups.conf. How does
the UPS appear in the $ lsusb list?

--
FSF associate member #7257 http://am-1.org/~ivan/

Roland Latour

unread,
Aug 4, 2018, 4:53:47 PM8/4/18
to
On Sat, 04 Aug 2018 19:05:44 +0000, Ivan Shmakov wrote:

>>>>>> Roland Latour <no-...@nowhere.com> writes:
>
> > I have a new UPS, AmazonBasics 800VA, connected via USB. I installed
> > nut, did some configuration to files in /etc/nut, and it seems to be
> > partially working.
>
> > When I check the system menu=>Settings=>PwrMgr=>Devices it shows the
> > UPS, fully charged, 1hr. 2mins. so there is some communication going
> > on.
>
> I'm not familiar with the DE you use, but could it be that it
interacts
> with your UPS by some other means than NUT?
>
> Also, could it be showing some other value (something like
laptop's
> battery charge, for example) instead?

No, this is a devuan desktop, using XFCE.
-----------------------------------------------------------------------
Thanks for that last tip. "Cyber Power System, Inc. CP1500 AVR UPS" which
is on the compatibility list:
https://networkupstools.org/stable-hcl.html
and it uses the usbhid-ups driver. But some older documentation:
https://networkupstools.org/docs/man/usbhid-ups.html
says: "This driver is not built by default. You can build it by using:
"configure --with-usb=yes"

WTF? Thanks also for dpkg-query stuff, the driver is in /lib/nut. I
will work on it a bit & see what happens.
0 new messages