<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 13/01/2015 00:39, Charles Lepple
      wrote:<br>
    </div>
    <blockquote
      cite="mid:DD298E89-E06A-4AF6-A926-D5FF070F9FFF@gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      On Jan 11, 2015, at 11:48 PM, Graham Menhennitt <<a
        moz-do-not-send="true" href="mailto:graham@menhennitt.com.au">graham@menhennitt.com.au</a>>

      wrote:<br>
      <div><br class="Apple-interchange-newline">
        <blockquote type="cite">
          <div bgcolor="#FFFFFF" text="#000000">
            <blockquote
              cite="mid:4975C8CE-754A-48F6-9869-A6590331D264@gmail.com"
              type="cite" style="font-family: Helvetica; font-size:
              14px; font-style: normal; font-variant: normal;
              font-weight: normal; letter-spacing: normal; line-height:
              normal; orphans: auto; text-align: start; text-indent:
              0px; text-transform: none; white-space: normal; widows:
              auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
              <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>
            </blockquote>
            <br style="font-family: Helvetica; font-size: 14px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;">
            <span style="font-family: Helvetica; font-size: 14px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255); float: none;
              display: inline !important;">I've done a bit more
              investigating. I added a diagnostic printf("%x",
              ups_status) at the point where LB is set. It shows that
              it's RemainingTimeLimitExpired that's causing the LB
              condition. Below is a bit more of the driver log which
              shows RemainingTimeLimitExpired changing to 1 and then
              back to 0 again. What does that variable mean?</span><br
              style="font-family: Helvetica; font-size: 14px;
              font-style: normal; font-variant: normal; font-weight:
              normal; letter-spacing: normal; line-height: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;">
          </div>
        </blockquote>
        I still think the combination of override.battery.runtime.low
        and the ignorelb setting should get you the shutdown trigger you
        are looking for. You might also need to set pollfreq to a lower
        value than its default of 30 seconds, since the
        RemainingTimeLimit value is not requested during the Quick
        update every two seconds. <br>
      </div>
    </blockquote>
    <br>
    Thanks, Charles.<br>
    <br>
    I've changed the usb.conf entry to be:<br>
    <blockquote>[maxwell]<br>
              driver = usbhid-ups<br>
              port = auto<br>
              ignorelb<br>
              override.battery.charge.low = 5<br>
              override.battery.runtime.low = 10<br>
    </blockquote>
    but I'm still getting the messages. They're much less frequent now -
    maybe every few hours instead of every few minutes. It's not
    actually causing a shutdown, so it's just the inconvenience of the
    messages. I can try reducing the values above even more.<br>
    <br>
    Thanks again for your help,<br>
        Graham<br>
  </body>
</html>