[Nut-upsuser] NUT with Cyber Power 700 AVR

Thomas Jensen tom.jensen at digitaltoolbox-inc.com
Wed Feb 24 03:28:20 UTC 2010


On Tue, 23 Feb 2010 12:49:03 +0100, Arjen de Korte
<nut+users at de-korte.org>
wrote:
> Citeren Thomas Jensen <tom.jensen at digitaltoolbox-inc.com>:
> 
>> server:#
>> upsdrvctl start
>>
>> Network UPS Tools - UPS driver controller 2.2.2
>>
>> Network
>> UPS Tools - CyberPower driver 1.00 (2.2.2)
> 
> Try running the powerpanel driver. The cyberpower driver is no longer  
> maintained and has no provisions for debugging the communication with  
> the UPS.
> 
> [server]
>      driver = powerpanel
>      port = /dev/ttyS0
>      desc = "Server"
> 
> If this fails to detect the UPS, try running the *driver* in debug mode:
> 
>      /path/to/powerpanel -DDD -a server
> 
> The first 10 seconds worth of output might give a clue why it isn't  
> working. After that you should kill it with Ctrl-C (otherwise it will  
> keep spitting out debug information forever).
> 
> If this works, you'll probably want to upgrade to nut-2.4.1 (or  
> better) since there have been some changes in the interpretation of  
> the readings from the UPS since nut-2.2.2 was released almost two  
> years ago.
> 
> Best regards, Arjen

I had installed the distro version of NUT for Debian Lenny.  That is why I
was on version 2.2.2.  I removed that version, downloaded the source from
the NUT website, and compiled and installed that version.  I am now running
version 2.4.3.  To install, I followed all of the instructions in the
INSTALL file.

I selected nut:nut for the user and group in the "Prepare your System"
section of the INSTALL file.  I used the user and group for the configure
command.  I did not use any other flags for the configure command other
than "with-user" and "with-group".

In step 6, I departed from the INSTALL file slightly.  There is a How To
on the NUT website for Debian Lenny.  It shows how to create a udev rule to
set the group for ttyS0.  I confirmed the settings after triggering the
udev rule.  Here is the output:

server:# ls -l /dev | grep ttyS
crw-rw---- 1 root nut       4,  64 2010-02-23 21:34 ttyS0
crw-rw---- 1 root dialout   4,  65 2010-02-22 23:16 ttyS1
crw-rw---- 1 root dialout   4,  66 2010-02-22 21:47 ttyS2
crw-rw---- 1 root dialout   4,  67 2010-02-22 21:47 ttyS3

In step 7, I created the following in ups.conf:

[server]
       driver = powerpanel
       port = /dev/ttyS0
       desc = "Server"

When I attempted step 8, I received the nearly the same error I was
receiving last night with version 2.2.2.  The only difference is that with
the powerpanel driver, I received the experimental driver warning.

server:~# /usr/local/ups/bin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.4.3
Network UPS Tools - CyberPower text/binary protocol UPS driver 0.25
(2.4.3)
Warning: This is an experimental driver.
Some features may not function correctly.

CyberPower UPS not found on /dev/ttyS0
Driver failed to start (exit status=1)

I then followed the advice to try to start the driver manually with
debugging.  Here is the result:

server:# /usr/local/ups/bin/powerpanel -DDD -a server
Network UPS Tools - CyberPower text/binary protocol UPS driver 0.25
(2.4.3)
Warning: This is an experimental driver.
Some features may not function correctly.

   0.000000     debug level is '3'
   0.014816     Trying binary protocol...
   0.222802     send: (2 bytes) => 46 0d
   0.678827     read: timeout
   0.782803     send: (2 bytes) => 46 0d
   1.238833     read: timeout
   1.342822     send: (2 bytes) => 46 0d
   1.798838     read: timeout
   1.822848     Trying text protocol...
   1.926817     send: (2 bytes) => 0d 0d
   2.282857     read: timeout
   2.438895     send: (3 bytes) => 50 34 0d
   2.794898     read: timeout
   2.950842     send: (3 bytes) => 50 34 0d
   3.306846     read: timeout
   3.462844     send: (3 bytes) => 50 34 0d
   3.818850     read: timeout
   3.830840     CyberPower UPS not found on /dev/ttyS0

I don't know if it helps at all or not.  I did install the CyberPower
software for Linux on the machine last night.  I thought this would help
verify if the UPS was communicating with my machine on the serial port.  I
was able to issue commands and get status from the UPS.  I therefore
assumed that both the port and the UPS were working correctly.  I think the
following confirms that.

server:# lsof /dev/ttyS0
COMMAND    PID USER   FD   TYPE DEVICE SIZE NODE NAME
pwrstatd 20687 root    4u   CHR   4,64      1365 /dev/ttyS0

Any additional help would be appreciated.



More information about the Nut-upsuser mailing list