<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Jan 8, 2015, at 11:43 PM, Graham Menhennitt <<a href="mailto:graham@menhennitt.com.au">graham@menhennitt.com.au</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite">
  

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello Nutters,<br>
    <br>
    I'm running nut 2.7.2 on FreeBSD 10-stable (via the FreeBSD port)
    with an APC Back-UPS CS 350 connected via USB. I get persistent
    (every few minutes) messages logged "battery is low" but I don't
    understand why. I don't think it's for the reason described in the
    FAQ (but I'm not 100% sure).<br></div></blockquote><div bgcolor="#FFFFFF" text="#000000">
    <br></div><div bgcolor="#FFFFFF" text="#000000">I think that FAQ #39 ("My APC UPS keeps reporting OL LB, even after it’s been charging for many hours") refers to a continuous LB state. </div><div bgcolor="#FFFFFF" text="#000000"><br></div><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000">
    In the trace output I can see that UPS.PowerSummary.RunTimeToEmpty
    is usually around 150 - 170 seconds. Occasionally it drops to 105. I
    don't see any reason why the load would be changing significantly.
    In any case, I've set the threshold to 90 seconds in ups.conf.<br>
    <br>
    See below for debug info.<br>
    <br>
    If somebody could offer suggestions on how to fix it, I'd be very
    grateful.<br>
    <br>
    Thanks in advance,<br>
        Graham<br>
    <br>
    ups.conf:<br>
    <blockquote>[maxwell]<br>
              driver = usbhid-ups<br>
              port = auto<br>
              override.battery.runtime.low = 90<br>
    </blockquote></div></blockquote><div bgcolor="#FFFFFF" text="#000000">The information flow for the majority of the UPS status in NUT looks like this:</div><div bgcolor="#FFFFFF" text="#000000"><br></div><div bgcolor="#FFFFFF" text="#000000">UPS -> driver -> upsd -> client (upslog, upsmon, etc)</div><div bgcolor="#FFFFFF" text="#000000"><br></div><div bgcolor="#FFFFFF" text="#000000">The override.* settings get parsed by the driver, but by themselves, they don't affect the UPS - they modify values stored in the driver, and things "downstream". When the UPS provides the values for ups.status (in particular, the LB flag), then the UPS is using its internal value for battery.runtime.low (if it has one), and the UPS is not affected by the battery.runtime.low setting in the driver.</div><div bgcolor="#FFFFFF" text="#000000"><br></div><div bgcolor="#FFFFFF" text="#000000">There is an exception that is discussed in the apcsmart man page (and potentially applies to all Back-UPS models, USB or serial):</div><div bgcolor="#FFFFFF" text="#000000"><br></div><div bgcolor="#FFFFFF" text="#000000"></div></div><blockquote type="cite"><div><div bgcolor="#FFFFFF" text="#000000">""New" units have battery.runtime.low, but depending on battery quality, firmware</div>version, calibration and UPS load - this variable can be underestimated quite a bit -<br>especially right after going into OB state. This in turn can cause LB to be<br>asserted, which under normal conditions will cause <b>NUT</b> to initiate the<br>shutdown. You might want to disable this condition entirely, when relying on<br><b>ignorelb</b> option (this was actually the main motivation behind introduction of<br>such feature)."</div></blockquote><div><br></div><div>So you probably want to set "ignorelb" in order for the override to take effect-- although the apcsmart man page is effectively recommending the use of battery.charge, which is a percentage rather than a time. (That may not be an issue if the batteries are replaced proactively.)</div><div><div><br></div><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000">output of /usr/local/libexec/nut/usbhid-ups -a maxell -DD at a time
    when low battery is reported:<br></div></blockquote><div><br></div>hmm, are you sure that this log matches the time of the LB event?</div><div><br></div><div>The file drivers/usbhid-ups.c is looking for any of the following conditions to declare LB:</div><div><br></div><div>• STATUS(LOWBATT)</div><div>• STATUS(TIMELIMITEXP)</div><div>• STATUS(SHUTDOWNIMM)</div><div><br></div><div>The mapping to HID Path names will depend on the model, but STATUS(LOWBATT) can come from ...BelowRemainingCapacityLimit, which is 0 in both instances in your log. STATUS(TIMELIMITEXP) maps to ...RemainingTimeLimitExpired, which I don't see, and STATUS(SHUTDOWNIMM) would cause an ups.alarm message to show up in upsc.<br></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><div>-- </div><div>Charles Lepple</div><div>clepple@gmail</div><div><br></div></span><br class="Apple-interchange-newline">

</div>
<br></body></html>