On Thu, 2007-11-08 at 14:19 +0000, Carlos Rodrigues wrote:
> Try "megatec_usb". If it doesn't work, it may be possible to add support.

Wow, that worked right away (after recompiling 2.2 for etch):

# cat /etc/nut/ups.conf
[Pro]
driver=megatec_usb
port=/dev/usb/hiddev0

# ./megatec_usb -a Pro -DDD -u root
Network UPS Tools 2.2.0 - Megatec protocol driver 1.5.4 [megatec_usb]
Carlos Rodrigues (c) 2003-2007

Serial-over-USB transport layer for Megatec protocol driver [megatec_usb]

debug level is '3'
[snip other usb]
Checking device (0665/5161) (003/002)
- VendorID: 0665
- ProductID: 5161
- Manufacturer: Cypress Semiconductor
- Product: USB to Serial
- Serial Number: unknown
- Bus: 003
Trying to match device
Device matches
failed to claim USB device, trying 2 more time(s)...
detaching kernel driver from USB device...
trying again to claim USB device...
Starting UPS detection process...
Attempting to detect the UPS...
Sending "Q1" command...
"Q1" command successful.
Attempting to detect the UPS...
Sending "Q1" command...
"Q1" command successful.
Attempting to detect the UPS...
Sending "Q1" command...
"Q1" command successful.
Attempting to detect the UPS...
Sending "Q1" command...
"Q1" command successful.
Attempting to detect the UPS...
Sending "Q1" command...
"Q1" command successful.
0 out of 5 detection attempts failed (minimum failures: 2).
Asking for UPS information ("I" command)...
UPS doesn't return any information about itself.
Megatec protocol UPS detected.
Asking for UPS power ratings ("F" command)...
UPS power ratings: #240.0 003 12.00 50.0
Asking for UPS status ("Q1" command)...
UPS status: (245.2 245.1 245.1 035 50.0 13.3 25.0 00001000
12.0V battery, interval [9.7V, 13.7V].
Done setting up the UPS.
Asking for UPS status ("Q1" command)...
UPS doesn't return any information about its status.
dstate_init: sock /var/run/nut/megatec_usb-Pro open on fd 5
Asking for UPS status ("Q1" command)...
UPS status: (245.1 245.1 245.1 034 50.0 13.3 25.0 00001000
Charge: 90.0%
Asking for UPS status ("Q1" command)...
UPS status: (245.1 245.1 245.1 035 50.1 13.3 25.0 00001000
Charge: 90.0%
Asking for UPS status ("Q1" command)...
UPS status: (245.1 245.0 245.1 035 50.1 13.3 25.0 00001000
Charge: 90.0%

The charge is wrong, it's fully charged, but I guess that's what the
battvolts override is for.

Thanks, that was much less painful than I thought it was going to be.

James Andrewartha

_______________________________________________
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Reply via email to