[Nut-upsuser] blazer megatec drivers

2011-04-12 Thread Pavel Selivanov

Hi,

I've being using nut 2.2.2 (Debian Lenny) via megatec_usb driver for 
IPPON Back UPS 600.

Then I upgraded to nut 2.4.3 (Debian Squeeze) with broken megatec_usb.
I moved to blazer_usb, it connected IPPON.

[myups]
driver = blazer_usb
port = /dev/usb/hiddev0
desc = Local UPS
#from megatec.c: batteries[] = {{ 12.0,  9.0, 16.0,  9.7, 13.7,  0.0 },
default.battery.voltage.high=13.70
default.battery.voltage.low=9.70

But there are no battlow=% option available in blazer, so, I can't 
change Low battery condition to be a bit more safer...
I've seen battery.charge.low option in trunk, but it seems it must be 
implemented in driver, and it's not implemented in blazer.

Am I right ?

Offcourse, I can workaround this problem:
NOTIFYCMD /usr/local/sbin/check_lowbatt

/usr/local/sbin/check_lowbatt
uspc myups | grep battery.charge
res=$?
...

But it's an ugly hack...
Is there any better solution ?
I missed something ?

--
Thanks in advance.
Pavel Selivanov


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


Re: [Nut-upsuser] blazer megatec drivers

2011-04-12 Thread Arjen de Korte

Citeren Pavel Selivanov biohumanoid.li...@gmail.com:

I've being using nut 2.2.2 (Debian Lenny) via megatec_usb driver for  
IPPON Back UPS 600.

Then I upgraded to nut 2.4.3 (Debian Squeeze) with broken megatec_usb.
I moved to blazer_usb, it connected IPPON.

[myups]
driver = blazer_usb
port = /dev/usb/hiddev0
desc = Local UPS
#from megatec.c: batteries[] = {{ 12.0,  9.0, 16.0,  9.7, 13.7,  0.0 },
default.battery.voltage.high=13.70
default.battery.voltage.low=9.70


Checkout the 'runtimecal' option from 'man 8 blazer' to give a  
slightly better way to determine the state of charge on the UPS  
(provided it reports the load).


But there are no battlow=% option available in blazer, so, I can't  
change Low battery condition to be a bit more safer...
I've seen battery.charge.low option in trunk, but it seems it must  
be implemented in driver, and it's not implemented in blazer.

Am I right ?

Offcourse, I can workaround this problem:
NOTIFYCMD /usr/local/sbin/check_lowbatt

/usr/local/sbin/check_lowbatt
uspc myups | grep battery.charge
res=$?
...

But it's an ugly hack...
Is there any better solution ?
I missed something ?


See 'man 8 clone' which will do just what you want. The development  
version allows you to override the build in low battery detection  
altogether and set your own levels.


Best regards, Arjen
--
Please keep list traffic on the list (off-list replies will be rejected)


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


Re: [Nut-upsuser] GE EP series UPS

2011-04-12 Thread Danilo Godec
The short story - it seems that GE EP series is (somewhat) supported by
the *blazer_ser* driver (haven't tried the USB connection yet). I had to
use the 'cablepower = none' option as GE only uses TX and RX.


The longer story - I 'sniffed' the RS232 communication between the GE
supplied Java software 'upspilot' and UPS. From that I found out the
baud rate (2400) and I learned about a couple of commands (not knowing
what they mean):

* CB24
* WH
* Q1
* Q4
* Q7
* QS
* ...

Then I user 'minicom' to try these commands out and this is what I got:

Q1 - (232.0 140.0 220.0 001 50.0 2.27 31.0 
Q4 - (232.0 243.0 000.0 001 220.0 49.9 001 50.0 342 343 273.0 31.0 LM
Q7 - 07102218014 V_01

OK, I'm getting somewhere - but I have to figure out what all of this
means. So decide to unpack some .jar files and have a look in there. A
friend helped by 'de-compiling' all .class files and using 'grep' I
searched for these commands.

There is a file named 'UpsProt.class', which (de-compiled) contains this:

/*  25 */ Santak1Class.command[0] = Q;
/*  30 */ Santak1Class.command[1] = Q1;
/*  35 */ Santak1Class.command[2] = Q4;
/*  40 */ Santak1Class.command[3] = QF;
/*  45 */ Santak1Class.command[4] = MD;
/*  50 */ Santak1Class.command[5] = QP;
/*  55 */ Santak1Class.command[6] = PSmGnLpHqEDxxx;
/*  60 */ Santak1Class.command[7] = PF;
/*  65 */ Santak1Class.command[8] = T;
/*  70 */ Santak1Class.command[9] = TL;
/*  75 */ Santak1Class.command[10] = T;
/*  80 */ Santak1Class.command[11] = S;
/*  85 */ Santak1Class.command[12] = SR;
/*  90 */ Santak1Class.command[13] = C;
/*  95 */ Santak1Class.command[14] = CT;
/* 100 */ Santak1Class.command[15] = CB;
/* 105 */ Santak1Class.command[16] = PE;
/* 110 */ Santak1Class.command[17] = PD;
/* 116 */ Santak1Class.command[18] = QMT;
/* 122 */ Santak1Class.command[19] = F;
/* 128 */ Santak1Class.command[20] = WH;
/* 134 */ Santak1Class.command[21] = Q2;
/* 140 */ Santak1Class.command[22] = WA;
/* 145 */ Santak1Class.command[23] = WH;
/* 150 */ Santak1Class.command[24] = QA;
/* 156 */ Santak1Class.command[25] = FLT;
/* 162 */ Santak1Class.command[26] = FLT,00;
/* 170 */ Santak1Class.command[27] = QS;
/* 176 */ Santak1Class.command[28] = CTL;
/* 182 */ Santak1Class.command[29] = LT?;

A list of commands but no description. Interestingly, the Q7 which
produces some output is not mentioned. .

Due to my limited programming skills I was soon stuck, so I decided to
look at Nut drivers source to find out if there are any that use similar
commands. After a bit of experimenting I found that 'blazer_ser' pretty
much does what it's supposed to do. Also most of the 'upsc' output looks
reasonable:

battery.voltage: 252.00
battery.voltage.nominal: 240.0
beeper.status: disabled
device.type: ups
driver.name: blazer_ser
driver.parameter.cablepower: none
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS0
driver.version: 2.6.0
driver.version.internal: 1.51
input.current.nominal: 27.0
input.frequency: 50.0
input.frequency.nominal: 50
input.voltage: 236.0
input.voltage.fault: 140.0
input.voltage.nominal: 220
output.voltage: 220.0
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 1
ups.status: OL
ups.temperature: 31.5
ups.type: online


  Danilo

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