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