[Nut-upsuser] Problems with Unitek Alpha 1000 Ps

Arjen de Korte nut+users at de-korte.org
Tue Jan 27 18:27:08 UTC 2009


Citeren Jordi Moreno <jmoreno at cim.es>:

> Couldn't test SVN version. After downloading, autoreconf --install gives
> me the following output:
>
> # autoreconf --install
> aclocal: macro `NUT_OS_FUNCTIONS' required but not defined
> aclocal: configure.in: 65: macro `AM_PROG_CC_C_O' not found in library
> autoreconf: aclocal failed with exit status: 1

You probably don't have all the autoconf tools needed installed. I  
don't know how to fix this though.

> Maybe I'm missing something... However, I've tried last testing version
> (2.4.0-pre2), because it seems to include the same version of
> blazer_usb.c, blazer.c and blazer.h (checked with diff).

Indeed. That's a good alternative to running the SVN version, although  
it is a bit more difficult to get to any changes that I may need to  
commit to this driver based on your input.

> At first, it seems to detect the UPS properly:
>
> # bin/blazer_usb -a unitek -u root -x vendorid=0665 -x productid=5161
>
> Network UPS Tools - Megatec/Q1 protocol USB driver 0.02 (2.4.0-pre2)
> Supported UPS detected with megatec protocol
> Vendor information read in 1 tries

Good. Note that specifying vendorid and productid is useless without  
also specifying the subdriver that needs to be used. Since the driver  
already knows them, it is not needed to list these.

> But if I try to send a shutdown command:
>
> # bin/blazer_usb -a unitek -u root -x vendorid=0665 -x productid=5161 -k
> Network UPS Tools - Megatec/Q1 protocol USB driver 0.02 (2.4.0-pre2)
> Initiating UPS shutdown
> instcmd: command [shutdown.return] failed
> instcmd: command [shutdown.return] failed
> instcmd: command [shutdown.return] failed

That could be due to an unsupported ondelay and/or offdelay value. Try  
if different values help here. It could also be that your UPS responds  
with an unsupported return value. You may wish to run the driver as  
follows to debug this

     bin/blazer_usb -DDD -a unitek -x ondelay=3 -x offdelay=60 -k

This will make the driver run the shutdown command only with enough  
debugging info to see what is happening.

> And giving more debug information:
>
> # bin/blazer_usb -a unitek -u root -x vendorid=0665 -x productid=5161
> -DDDDD
> Network UPS Tools - Megatec/Q1 protocol USB driver 0.02 (2.4.0-pre2)
> debug level is '5'
> ...
> Checking device (0665/5161) (003/003)
> - VendorID: 0665
> - ProductID: 5161
> - Manufacturer: WayTech Development(S)
> - Product: WayTech USB-RS232 Interface (V1.0)
> Baud rate 2400bps
> - Serial Number: unknown
> - Bus: 003
> Trying to match device
> Device matches
> Trying megatec protocol...
> send: Q1
> read: (218.0 216.0 187.0 000 49.9 13.6 24.0 00001000
> send_to_all: SETINFO input.voltage "218.0"
> send_to_all: SETINFO input.voltage.fault "216.0"
> send_to_all: SETINFO output.voltage "187.0"
> send_to_all: SETINFO ups.load "0"
> send_to_all: SETINFO input.frequency "49.9"
> send_to_all: SETINFO battery.voltage "13.60"
> send_to_all: SETINFO ups.temperature "24.0"
> send_to_all: SETINFO beeper.status "disabled"
> send_to_all: SETINFO ups.type "offline / line interactive"
> send_to_all: SETINFO ups.status "OL"
> Status read in 1 tries

Looks good.

> Supported UPS detected with megatec protocol
> send: F
> read: #230.0 000 012.0 50.0
> send_to_all: SETINFO input.voltage.nominal "230"
> send_to_all: SETINFO input.current.nominal "0.0"
> send_to_all: SETINFO battery.packs "1"
> send_to_all: SETINFO battery.voltage.nominal "12.0"
> send_to_all: SETINFO input.frequency.nominal "50"
> Ratings read in 1 tries

Same here.

> send: I
> read: #UNITEK POWER    SCU8UPEG   V8.0
> send_to_all: SETINFO ups.mfg "UNITEK"
> send_to_all: SETINFO ups.model "POWER"
> send_to_all: SETINFO ups.firmware "SCU8UPEG"
> Vendor information read in 1 tries

I was already slightly worried about this. Your UPS has spaces in the  
manufacturer name, which is unexpected. It looks like I need to change  
this, to use fixed length values.

[...]

> And it seems to stand forever sending those Q1 commands...

That's correct, that's what you get in debugging mode.

> Well, it seems we've advanced somehow... at least I can read some values
> from the UPS now. But I really need the shutdown command to work...
>
> By the way, trying to execute upsd:
>
> # /usr/local/ups/sbin/upsd
> Network UPS Tools upsd 2.4.0-pre2
> listening on 127.0.0.1 port 3493
> Can't connect to UPS [unitek] (blazer_usb-unitek): No such file or directory

You need to use 'upsdrvctl' to start the driver.

Best regards, Arjen
-- 
Please keep list traffic on the list



More information about the Nut-upsuser mailing list