Discussion:
[Nut-upsuser] Installing NUT for PowerWalker VI 1500 LCD
Danijel Šili
2013-11-28 21:10:31 UTC
Permalink
Since the provided drivers come with absolutely no installation
instructions, I turned to NUT.

The compatibility list says "blazer_usb" should be used for PowerWalker's
devices, so that's what I put in my conf:

[pwvi]
driver = blazer_usb
port = auto
desc = "PowerWalker VI 1500 LCD"

Since I use Ubuntu Server 13.10 so I installed nut from apt.

The product information PDF for the device in quesetion is
http://www.powerwalker.com/datasheet/Line-Interactive/PowerWalker%20VI%201500%20LCD.pdf

Below is the output from several commands:
I tried to look through the maillist archives but found nothing useful.

$ sudo upsdrvctl

Network UPS Tools - UPS driver controller 2.6.4
Network UPS Tools - Megatec/Q1 protocol USB driver 0.08 (2.6.4)
No supported devices found. Please check your device availability with
'lsusb'
and make sure you have an up-to-date version of NUT. If this does not help,
try running the driver with at least 'subdriver', 'vendorid' and 'productid'
options specified. Please refer to the man page for details about these
options
(man 8 blazer).

Driver failed to start (exit status=1)

$ sudo /lib/nut/blazer_usb -DD -a pwvi

Network UPS Tools - Megatec/Q1 protocol USB driver 0.08 (2.6.4)
0.000000 debug level is '2'
0.162399 Checking device (1D6B/0001) (003/001)
0.226303 - VendorID: 1d6b
0.226814 - ProductID: 0001
0.227249 - Manufacturer: unknown
0.227696 - Product: unknown
0.228174 - Serial Number: unknown
0.228621 - Bus: 003
0.229088 Trying to match device
0.229544 Device does not match - skipping
0.230051 Checking device (1D6B/0002) (002/001)
0.254327 - VendorID: 1d6b
0.254361 - ProductID: 0002
0.254372 - Manufacturer: unknown
0.254382 - Product: unknown
0.254392 - Serial Number: unknown
0.254402 - Bus: 002
0.254412 Trying to match device
0.254425 Device does not match - skipping
0.254450 Checking device (1D6B/0002) (001/001)
0.254529 - VendorID: 1d6b
0.254541 - ProductID: 0002
0.254551 - Manufacturer: unknown
0.254561 - Product: unknown
0.254571 - Serial Number: unknown
0.254581 - Bus: 001
0.254590 Trying to match device
0.254602 Device does not match - skipping
0.254616 No appropriate HID device found
0.254636 No supported devices found. Please check your device
availability with 'lsusb'
and make sure you have an up-to-date version of NUT. If this does not help,
try running the driver with at least 'subdriver', 'vendorid' and 'productid'
options specified. Please refer to the man page for details about these
options
(man 8 blazer).

$ lsusb

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 006: ID 0665:5161 Cypress Semiconductor USB to Serial
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


Thanks for any help or guidance you can give me,
Shinhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20131128/3abb3282/attachment.html>
Charles Lepple
2013-12-02 13:25:18 UTC
Permalink
[Please subscribe to the mailing list: http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser ]
Since the provided drivers come with absolutely no installation instructions, I turned to NUT.
[pwvi]
driver = blazer_usb
port = auto
desc = "PowerWalker VI 1500 LCD"
The configuration file looks good.
Since I use Ubuntu Server 13.10 so I installed nut from apt.
What is the exact NUT package version (including the Ubuntu-specific version number)?
The product information PDF for the device in quesetion is http://www.powerwalker.com/datasheet/Line-Interactive/PowerWalker%20VI%201500%20LCD.pdf
[...]
$ lsusb
[...]
Bus 004 Device 006: ID 0665:5161 Cypress Semiconductor USB to Serial
^ This is most likely your UPS.

Josu Lazkano just emailed this list last month with a similar problem (NUT 2.6.4 on Debian):

http://thread.gmane.org/gmane.comp.monitoring.nut.user/8180

There should be an entry in /lib/udev/rules.d/52-nut-usbups.rules for 0665:5161, but apparently the one in the Debian 2.6.4 package wasn't working:

ATTR{idVendor}=="0665", ATTR{idProduct}=="5161", MODE="664", GROUP="nut"

Josu said that creating this udev rule solves the issue:

SUBSYSTEM=="usb", ATTRS{idVendor}=="0665", ATTRS{idProduct}=="5161", GROUP="nut"

But given the additional "goto" statements in the NUT udev file, those should be equivalent.

What version of udev and the Linux kernel do you have on your system?
--
Charles Lepple
clepple at gmail
Danijel Šili
2013-12-02 16:01:00 UTC
Permalink
Post by Charles Lepple
[Please subscribe to the mailing list: http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser ]
Since the provided drivers come with absolutely no installation instructions, I turned to NUT.
[pwvi]
driver = blazer_usb
port = auto
desc = "PowerWalker VI 1500 LCD"
The configuration file looks good.
Since I use Ubuntu Server 13.10 so I installed nut from apt.
What is the exact NUT package version (including the Ubuntu-specific version number)?
$ apt-cache policy nut

nut:
Installed: 2.6.4-2.3ubuntu2
Candidate: 2.6.4-2.3ubuntu2
Version table:
*** 2.6.4-2.3ubuntu2 0
500 http://cz.archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
100 /var/lib/dpkg/status
Post by Charles Lepple
The product information PDF for the device in quesetion is http://www.powerwalker.com/datasheet/Line-Interactive/PowerWalker%20VI%201500%20LCD.pdf
[...]
$ lsusb
[...]
Bus 004 Device 006: ID 0665:5161 Cypress Semiconductor USB to Serial
^ This is most likely your UPS.
Yea, I disconnected the cable to check and there are also no other USB
devices on that computer. I also tried to plug it in some other port,
just in case that would help.
Post by Charles Lepple
http://thread.gmane.org/gmane.comp.monitoring.nut.user/8180
ATTR{idVendor}=="0665", ATTR{idProduct}=="5161", MODE="664", GROUP="nut"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0665", ATTRS{idProduct}=="5161", GROUP="nut"
But given the additional "goto" statements in the NUT udev file, those should be equivalent.
He said he had permission problems, so he basically just removed the MODE part.

I tried it out now and starts OK:

Supported UPS detected with mustek protocol
Vendor information unavailable
No values provided for battery high/low voltages in ups.conf

Using 'guestimation' (low: 20.800000, high: 26.000000)!
Battery runtime will not be calculated (runtimecal not set)

Also:

$ upsc pwvi at localhost

battery.charge: 100
battery.voltage: 27.40
battery.voltage.high: 26.00
battery.voltage.low: 20.80
battery.voltage.nominal: 24.0
device.type: ups
driver.name: blazer_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.6.4
driver.version.internal: 0.08
input.current.nominal: 7.0
input.frequency: 49.9
input.frequency.nominal: 50
input.voltage: 235.1
input.voltage.fault: 235.1
input.voltage.nominal: 230
output.voltage: 235.1
ups.beeper.status: enabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 36
ups.productid: 5161
ups.status: OL
ups.type: offline / line interactive
ups.vendorid: 0665
Post by Charles Lepple
What version of udev and the Linux kernel do you have on your system?
$ apt-cache policy udev

udev:
Installed: 204-0ubuntu19
Candidate: 204-0ubuntu19
Version table:
*** 204-0ubuntu19 0
500 http://cz.archive.ubuntu.com/ubuntu/ saucy-updates/main
amd64 Packages
100 /var/lib/dpkg/status
204-0ubuntu18 0
500 http://cz.archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages

$ cat /proc/version

Linux version 3.11.0-13-generic (buildd at roseapple) (gcc version 4.8.1
(Ubuntu/Linaro 4.8.1-10ubuntu8) ) #20-Ubuntu SMP Wed Oct 23 07:38:26
UTC 201


Since the permission change helped, I can now continue with the
configuration. Thanks for the help :)
--
Shinhan
Charles Lepple
2013-12-03 01:52:30 UTC
Permalink
Post by Danijel Å ili
Since the permission change helped, I can now continue with the
configuration. Thanks for the help :)
What are the final permissions?

If possible, we would like to fix the NUT package so that it works out of the box. Removing the MODE= line seems like it should either fail due to more restrictive default permissions, or it would work due to less-restrictive and possibly less secure permissions.
--
Charles Lepple
clepple at gmail
Danijel Šili
2013-12-03 06:10:59 UTC
Permalink
Post by Charles Lepple
Post by Danijel Å ili
Since the permission change helped, I can now continue with the
configuration. Thanks for the help :)
What are the final permissions?
Don't know which permissions are being checked. Can you tell me where
to check the permissions?

--
Shinhan
Charles Lepple
2013-12-04 00:11:51 UTC
Permalink
crw-rw-r-- 1 root nut 189, 257 Dec 3 18:04 /dev/bus/usb/003/002
... which is what the MODE=664 udev rule set.

Is there by chance some other udev rule which might match your ups? (There are a number of devices out there which use Cypress chips - maybe another package changed the permissions as well.)
Post by Danijel Å ili
Post by Charles Lepple
Post by Danijel Å ili
Since the permission change helped, I can now continue with the
configuration. Thanks for the help :)
What are the final permissions?
Don't know which permissions are being checked. Can you tell me where
to check the permissions?
Bus 004 Device 006: ID 0665:5161 Cypress Semiconductor USB to Serial
ls -l /dev/bus/usb/004/006
--
Charles Lepple
clepple at gmail
Charles Lepple
2013-12-04 12:59:25 UTC
Permalink
[please keep the list CC'd for future reference.]
Even if there is, I just checked and all of the rules have MODE=664.
I had concerns that the MODE parameter might need an explicit leading "0" for octal, but at least in the latest code, it is being parsed with strtol(..., 8).
Also, I don't know how to check which rules could match it.
Maybe 'grep -r 5161 /etc/udev/rules.d /lib/udev/rules.d'? That might produce a few false positives.
--
Charles Lepple
clepple at gmail
Danijel Šili
2013-12-04 15:23:20 UTC
Permalink
Post by Charles Lepple
[please keep the list CC'd for future reference.]
Even if there is, I just checked and all of the rules have MODE=664.
I had concerns that the MODE parameter might need an explicit leading "0" for octal, but at least in the latest code, it is being parsed with strtol(..., 8).
Also, I don't know how to check which rules could match it.
Maybe 'grep -r 5161 /etc/udev/rules.d /lib/udev/rules.d'? That might produce a few false positives.
/lib/udev/rules.d/52-nut-usbups.rules:ATTR{idVendor}=="0665",
ATTR{idProduct}=="5161", MODE="664", GROUP="nut"
/lib/udev/rules.d/52-nut-usbups.rules:SUBSYSTEM=="usb",
ATTRS{idVendor}=="0665", ATTRS{idProduct}=="5161", GROUP="nut"
/lib/udev/rules.d/40-libgphoto2-6.rules:ATTRS{idVendor}=="0fce",
ATTRS{idProduct}=="5161", ENV{ID_GPHOTO2}="1",
ENV{GPHOTO2_DRIVER}="proprietary", ENV{ID_MEDIA_PLAYER}="1",
MODE="0664", GROUP="plugdev"

First the old line, then the new line we added and then some other file...
Loading...