[Nut-upsuser] Powercom issues in NUT (was: PowerCom BNT2000AT ups on nut 2.6.0 - second try)

Arnaud Quette aquette.dev at gmail.com
Thu May 19 09:13:43 UTC 2011


Hi Angela,

as I understand, your issue is now fixed (confirmed?).
thanks a lot to Keven for addressing this.

cheers,
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/


2011/5/18 Angela Williams <angierfw at gmail.com>

> Hi All and Keven in particular!
>
> On Tuesday 17 May 2011 at 18:38 Keven L. Ates :-
>
> > Hmmm...
> > I patched the "BNT-other" driver.  You may want to try using that as
> > an alternative driver, since you can specify ALL the settings for your
> > UPS.
> >
> > But to address your problem, we can look at the system and its
> > settings. The BNT type defaults as follows:
> >
> > /*             Type */ "BNT",
> > /*  Number of Bytes */ 16,
> > /*     Flow Control */ {  "no_flow_control", no_flow_control },
> > /* Validation Bytes */ { { 11U, 0x42U }, { 8U, 0U }, { 8U, 0U } },
> > /* Power Kill Delay */ { { 1U, 30U }, 'y' },
> > /*        Frequency */ {  0.00020803, 0.0 },
> > /*           Load % */ {  1.4474,     0.0,   0.8594,  0.0 },
> > /*        Battery % */ {  5.0000,  0.3268,  -825.00,  0.46511, 0 },
> > /*          Voltage */ {  1.9216, -0.0977,  0.82857,  0.0000 },
> >
> > You have:
> >
> > driver = powercom
> > type = BNT
> > port = /dev/ttyS1
> > numOfBytesFromUPS = 16
> > methodOfFlowControl = no_flow_control
> > validationSequence = {{11,0x42},{8,0},{8,0}}
> > shutdownArguments = {{1,30},y}
> > modelname = BNT2000APT
> > serialnumber = 2233445566
> > Desc = Computer Room Small UPS
> >
> > So, the "numOfBytesFromUPS", "methodOfFlowControl",
> > "validationSequence", and "shutdownArguments" are all defaults for
> > "BNT" and can be commented out of the config file. You can also let
> > NUT attempt to figure it all out by commenting out the "type" as well.
> This I did with the settings below!
>
> > However, I would simplify the config file as follows:
> > >> > >  [APC1]
> > >> > >
> > >> > >        driver = powercom
> > >> > >        port = /dev/ttyS1
> > >> > >        modelname = BNT2000APT
> > >> > >        serialnumber = 2233445566
> > >> > >        desc = Computer Room Small UPS
>
> Result was worse with only 11 bytes!
>
> > and then, if that doesn't give you what you need, add "type =
> > BNT-other", repeat test, and add other elements as needed until you
> > get what you want.
> > Using "BNT-other", you can tweak all the settings to what you need for
> > display. The defaults for "BNT-other" will choose between BNT, KIN,
> > and IMP based on raw values.  Especially, if you have a 120 volt (US)
> > model, use "BNT-other" or set "linevoltage = 240". I use KNutClient to
> > check that my values are being reported accurately and tweak them
> > until they are correct (assuming there isn't a problem with the UPS).
> > An example "BNT-other" config:
> >
> > [BNT1500AP]
> >     driver = powercom
> >     port = /dev/ttyS0
> >     desc = "PowerCom BNT 1500 AP"
> >     manufacturer = PowerCom
> >     modelname = BNT1500AP
> >     serialnumber = 13245678900
> >     type = BNT-other
> > #   linevoltage = 120
> > #   numOfBytesFromUPS = 16
> > #   methodOfFlowControl = no_flow_control
> > #   validationSequence = {{8,0},{8,0},{8,0}}
> > #   shutdownArguments = {{1,30},y}
> > #   frequency = {0.00027778,0.0000}
> > #   loadPercentage = {1.0000,0.0,1.0000,0.0}
> > #   batteryPercentage = {1.0000,0.0000,0.0000,1.0000,0.0000}
> > #   voltage = {2.0000,0.0000,2.0000,0.0000}
>
> I just added the type as suggest of BNT-other and would you believe that it
> worked!
>
> Here is the debug output!
>
> gatekeeper nut #  /lib/nut/powercom -a APC1 -DDDDDDDDDD
> Network UPS Tools - PowerCom protocol UPS driver 0.13 (2.6.0-r2984)
>   0.000000     debug level is '10'
>    0.001862     Flow control disable
>   0.002045     Num of bytes requested for reading from UPS: 16
>   0.147783     Num of bytes received from UPS: 16
> Raw data from UPS:
>  0 0x0f ( )
>  1 0x64 (d)
>  2 0x70 (p)
>  3 0x70 (p)
>  4 0x32 (2)
>  5 0xff (ÿ)
>  6 0x32 (2)
>  7 0x00 ( )
>  8 0x00 ( )
>  9 0x04 ( )
> 10 0x00 ( )
> 11 0x4b (K)
> 12 0x98 ()
> 13 0x00 ( )
> 14 0x00 ( )
> 15 0x00 ( )
>    0.147958     Detected: BNT-other-2000AP , 220V
>   0.148042     Values of arguments:
>   0.148065      manufacturer            : 'PowerCom'
>   0.148085      model name              : 'BNT2000APT'
>   0.148105      serial number           : '2233445566'
>   0.148125      line voltage            : '220'
>   0.148144      type                    : 'BNT-other'
>   0.148164      number of bytes from UPS: '16'
>   0.148183      method of flow control  : 'no_flow_control'
>   0.148206      validation sequence: '{{8,0},{8,0},{8,0}}'
>   0.148227      shutdown arguments: '{{1,30},y}'
>   0.148264      frequency calculation coefficients: '{0.000278,0.000000}'
>   0.148292      load percentage calculation coefficients:
> '{1.000000,0.000000,1.000000,0.000000}'
>   0.148321      battery percentage calculation coefficients:
> '{1.000000,0.000000,0.000000,1.000000,0.000000}'
>   0.148345      voltage calculation coefficients: '{2.000000,0.000000}'
>   0.148387     send_to_all: SETINFO device.type "ups"
>   0.148415     send_to_all: SETINFO driver.version "2.6.0-r2984"
>   0.148442     send_to_all: SETINFO driver.version.internal "0.13"
>   0.148469     send_to_all: SETINFO driver.name "powercom"
>   0.148497     send_to_all: SETINFO ups.mfr "PowerCom"
>   0.148523     send_to_all: SETINFO ups.model "BNT2000APT"
>   0.148550     send_to_all: SETINFO ups.serial "2233445566"
>   0.148576     send_to_all: SETINFO ups.model.type "BNT-other"
>   0.148603     send_to_all: SETINFO input.voltage.nominal "220"
>   0.148628     send_to_all: ADDCMD test.battery.start
>   0.148650     send_to_all: ADDCMD shutdown.return
>   0.148673     send_to_all: ADDCMD shutdown.stayoff
>   0.148811     Num of bytes requested for reading from UPS: 16
>   0.301784     Num of bytes received from UPS: 16
> Raw data from UPS:
>  0 0x0e ( )
>  1 0x64 (d)
>  2 0x70 (p)
>  3 0x70 (p)
>  4 0x32 (2)
>  5 0xff (ÿ)
>  6 0x32 (2)
>  7 0x00 ( )
>  8 0x00 ( )
>  9 0x01 ( )
> 10 0x04 ( )
> 11 0x4b (K)
> 12 0x98 ()
> 13 0x00 ( )
> 14 0x00 ( )
> 15 0x00 ( )
>    0.301948     input.frequency   (raw data): [raw: 50]
>   0.301996     send_to_all: SETINFO input.frequency "72.00"
>   0.302020     input.frequency: 72.00
>   0.302040     output.frequency   (raw data): [raw: 50]
>   0.302070     send_to_all: SETINFO output.frequency "72.00"
>   0.302091     output.frequency: 72.00
>   0.302110     ups.load  (raw data): [raw: 14]
>   0.302140     send_to_all: SETINFO ups.load "14.0"
>   0.302161     ups.load: 14.0
>   0.302180     battery.charge (raw data): [raw: 100]
>   0.302211     send_to_all: SETINFO battery.charge "100.0"
>   0.302232     battery.charge: 100.0
>   0.302251     input.voltage (raw data): [raw: 112]
>   0.302281     send_to_all: SETINFO input.voltage "224.0"
>   0.302303     input.voltage: 224.0
>   0.302322     output.voltage (raw data): [raw: 112]
>   0.302352     send_to_all: SETINFO output.voltage "224.0"
>   0.302373     output.voltage: 224.0
>   0.302403     send_to_all: SETINFO ups.status "OB TEST"
>   0.302425     STATUS: OB TEST
>   0.302445     send_to_all: DATAOK
>   0.302723     dstate_init: sock /var/lib/nut/powercom-APC1 open on fd 5
>   0.302833     send_to_all: SETINFO driver.parameter.pollinterval "2"
>   0.302872     send_to_all: SETINFO device.mfr "PowerCom"
>   0.302900     send_to_all: SETINFO device.model "BNT2000APT"
>   0.302928     send_to_all: SETINFO device.serial "2233445566"
>
>
> > I hope that clears up any problems,
>
> It certainly seems to have! If you want me to try anything else give me a
> shout! I'm sure my customer will be happier that the firewall/front-end
> mail-
> server will be shudown on a power outage! They are in a sightly rural
> industrial area. Power demands is at the supply capability level. But then
> that's quite common here in South Africa at the moment! We are expecting
> rolling blackouts again this winter until the new power stations come on
> line!
> 2012 and onwards should see things improve!
>
> Cheers
> Ang!
>
> --
> Angela Williams
> angierfw at gmail dot com
> Linux/Networking Hacker
> Blog http://angierfw.wordpress.com
>
> Smile! Jesus Loves You!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20110519/7e4ed966/attachment.htm>


More information about the Nut-upsuser mailing list