UPS, Network UPS Tools and UPD(4)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

UPS, Network UPS Tools and UPD(4)

Lawrence Wieser
I have a CyberPower UPS that my OpenBSD 5.8 system sees just fine at uhidev0
on upd0. But the `usbhid-ups` driver for NUT is unable to talk to it.

There are a handful of older comments in the lists that offer a couple of
alternatives. One involved disabling the upd driver and messing with usb
quirks. The other involved a revised NUT driver that talked directly to upd.
If there’s a way for NUT to talk directly to UPD I haven’t found it.
What’s the current preferred approach? Or am I better off with a serial
cable?

Thanks for any insight

[demime 1.01d removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]

Reply | Threaded
Open this post in threaded view
|

Re: UPS, Network UPS Tools and UPD(4)

Todd C. Miller
On Sun, 11 Sep 2016 21:35:46 -0400, Lawrence Wieser wrote:

> I have a CyberPower UPS that my OpenBSD 5.8 system sees just fine at uhidev0
> on upd0. But the `usbhid-ups` driver for NUT is unable to talk to it.

I'm successfully using a CyberPower CP1000PFCLCD with NUT and have
no problems with the `usbhid-ups` driver.

Did you set the group to _ups on /dev/usb0 (or whichever USB bus
the upd attached to)?  If not, that would explain the problem.  E.g.

% ls -l /dev/usb0
crw-rw----  1 root  _ups   61,   0 Jun 30 09:33 /dev/usb0

 - todd

Reply | Threaded
Open this post in threaded view
|

Re: UPS, Network UPS Tools and UPD(4)

Stuart Henderson
In reply to this post by Lawrence Wieser
On 2016-09-12, Lawrence Wieser <[hidden email]> wrote:

> I have a CyberPower UPS that my OpenBSD 5.8 system sees just fine at uhidev0
> on upd0. But the `usbhid-ups` driver for NUT is unable to talk to it.
>
> There are a handful of older comments in the lists that offer a couple of
> alternatives. One involved disabling the upd driver and messing with usb
> quirks. The other involved a revised NUT driver that talked directly to upd.
> If there’s a way for NUT to talk directly to UPD I haven’t found it.
> What’s the current preferred approach? Or am I better off with a serial
> cable?
>
> Thanks for any insight

Did you follow the instructions in the pkg-readme file that pkg_add
pointed you at after it installed the package?

Reply | Threaded
Open this post in threaded view
|

Re: UPS, Network UPS Tools and UPD(4)

Lawrence Wieser
In reply to this post by Lawrence Wieser
Todd/Stuart, thanks for the responses. Permissions set correctly on
/dev/usb1 -- the device the UPS is connected to. And I had  been through
the package readme. A couple of times!

As is often the case I was making this much more complicated than it was.
The NUT package installer created the directory /etc/nut:

drwxr-x---  2 root  wheel

When `upsd` was trying to read the `ups.conf` file in /etc/nut it was
getting a permissions error. Fixed now and upsd is running fine.


On Sun, Sep 11, 2016 at 9:35 PM, Lawrence Wieser <[hidden email]>
wrote:

> I have a CyberPower UPS that my OpenBSD 5.8 system sees just fine at
> uhidev0 on upd0. But the `usbhid-ups` driver for NUT is unable to talk to
> it.
>
> There are a handful of older comments in the lists that offer a couple of
> alternatives. One involved disabling the upd driver and messing with usb
> quirks. The other involved a revised NUT driver that talked directly to
> upd. If there’s a way for NUT to talk directly to UPD I haven’t found
it.
> What’s the current preferred approach? Or am I better off with a serial
> cable?
>
> Thanks for any insight

Reply | Threaded
Open this post in threaded view
|

Re: UPS, Network UPS Tools and UPD(4)

Stuart Henderson
On 2016-09-12, Lawrence Wieser <[hidden email]> wrote:

> Todd/Stuart, thanks for the responses. Permissions set correctly on
> /dev/usb1 -- the device the UPS is connected to. And I had  been through
> the package readme. A couple of times!
>
> As is often the case I was making this much more complicated than it was.
> The NUT package installer created the directory /etc/nut:
>
> drwxr-x---  2 root  wheel
>
> When `upsd` was trying to read the `ups.conf` file in /etc/nut it was
> getting a permissions error. Fixed now and upsd is running fine.

Ah - I'm guessing you were running with a umask like 027 when running
pkg_add, this isn't quite handled correctly at the moment when there
are files or directories which are "@sample'd" in the packing list.
 
http://marc.info/?t=142598500400001&r=1&w=2