<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    Debug output of driver is attached, started with OpenUPS2 input feed
    online @ 12V and going offline at 15th second of debug run.<br>
    <br>
    Second attached file is debug output of unsuccessful UPS shutdown
    captured with command:<br>
    <br>
    /lib/nut/usbhid-ups -a openups -x productid=d005 -u root -DDD <b>-k</b>
    2>&1 |tee openups-d005-shut.log<br>
    <br>
    <br>
    I believe input voltage on my earlier upsc run was around 16V, just
    in case, i'll dump another copy here @ approx 12,2V input<br>
    <br>
    # upsc openups<br>
    Init SSL without certificate database<br>
    battery.capacity: 100<br>
    battery.charge: 100<br>
    battery.charge.low: 5<br>
    battery.charge.warning: 20<br>
    battery.current: 0.000<br>
    battery.mfr.date: ?<br>
    battery.runtime: 3932100<br>
    battery.temperature: 24.59<br>
    battery.type: ?<br>
    battery.voltage: 10.10<br>
    device.mfr: Mini-Box.Com<br>
    device.model: OPEN-UPS2<br>
    device.serial: LI-ION<br>
    device.type: ups<br>
    driver.name: usbhid-ups<br>
    driver.parameter.pollfreq: 30<br>
    driver.parameter.pollinterval: 2<br>
    driver.parameter.port: auto<br>
    driver.parameter.productid: d005<br>
    driver.version: 2.7.2<br>
    driver.version.data: openUPS HID 0.1<br>
    driver.version.internal: 0.38<br>
    input.current: 0.000<br>
    input.voltage: 432.74<br>
    output.current: 0.000<br>
    output.voltage: 315.08<br>
    ups.mfr: Mini-Box.Com<br>
    ups.model: OPEN-UPS2<br>
    ups.productid: d005<br>
    ups.serial: LI-ION<br>
    ups.status: OL<br>
    ups.vendorid: 04d8<br>
    <br>
    <blockquote type="cite">On Nov 4, 2014, at 4:36 PM, Toomas Suurmets
      (Priv) <toomas at suurmets.com> wrote:<br>
      <br>
      > Hi Charles,<br>
      > <br>
      > I tried your suggestion with OpenUPS2 (on Raspberry PI,
      Debian Jessie), it works.<br>
      <br>
      Thanks for the update. We can add the ID to the driver, but I
      noticed a few inconsistencies (indicated below).<br>
      <br>
      > OpenUPS2 Configuartion variables modification would be very
      welcome....<br>
      <br>
      I'm assuming these are exposed via USB HID? If so, we need a debug
      log. Start the driver like so:<br>
      <br>
      /path/to/usbhid-ups -a openups -x productid=d005 -u root -DDD
      2>&1 |tee openups-d005.log<br>
      <br>
      Please gzip the log before attaching it, and send to either this
      list, or nut-upsdev@<br>
      <br>
      > # upsc openups<br>
      > Init SSL without certificate database<br>
      > battery.capacity: 100<br>
      > battery.charge: 98<br>
      > battery.charge.low: 5<br>
      > battery.charge.warning: 20<br>
      > battery.current: 655.290<br>
      <br>
      The current seems to be a units conversion issue, as most of the
      NUT drivers return amps.<br>
      <br>
      > battery.mfr.date: ?<br>
      > battery.runtime: 52860<br>
      > battery.temperature: 25.43<br>
      > battery.type: ?<br>
      > battery.voltage: 10.01<br>
      > device.mfr: Mini-Box.Com<br>
      > device.model: OPEN-UPS2<br>
      > device.serial: LI-ION<br>
      > device.type: ups<br>
      > driver.name: usbhid-ups<br>
      > driver.parameter.pollfreq: 30<br>
      > driver.parameter.pollinterval: 2<br>
      > driver.parameter.port: auto<br>
      > driver.parameter.productid: d005<br>
      > driver.version: 2.7.2<br>
      > driver.version.data: openUPS HID 0.1<br>
      > driver.version.internal: 0.38<br>
      > input.current: 0.000<br>
      > input.voltage: 606.62<br>
      > output.current: 1.192<br>
      > output.voltage: 308.16<br>
      <br>
      Input and output voltage do not seem consistent with the battery
      voltage. What do the real values look like?<br>
      <br>
      > ups.mfr: Mini-Box.Com<br>
      > ups.model: OPEN-UPS2<br>
      > ups.productid: d005<br>
      > ups.serial: LI-ION<br>
      > ups.status: OB DISCHRG<br>
      > ups.vendorid: 04d8<br>
      > <br>
      > # cat /etc/nut/ups.conf<br>
      > [openups]<br>
      >    driver = usbhid-ups<br>
      >    port = auto<br>
      >    productid = d005<br>
      >    desc = "OpenUPS2"<br>
      > <br>
      > On Sep 8, 2014, at 7:08 PM, Charles Lepple <clep... at
      gmail.com> wrote:<br>
      > <br>
      >> On Sep 8, 2014, at 5:46 PM, John Thurston
      <john.thurs... at alaska.gov> wrote:<br>
      >> <br>
      >>> I bought a very nice little, self contained, UPS from
      mini-box:<br>
      >>> <a class="moz-txt-link-freetext" href="http://www.mini-box.com/OpenUPS2">http://www.mini-box.com/OpenUPS2</a><br>
      >>> thinking it would be handled by NUT.<br>
      >>> I think I misread or misinterpreted the HCL<br>
      >>> <a class="moz-txt-link-freetext" href="http://www.networkupstools.org/stable-hcl.html">http://www.networkupstools.org/stable-hcl.html</a><br>
      >> <br>
      >> Correct, we only knew about the original openUPS (USB ID
      04d8:d004) at the<br>
      >> time that was written.<br>
      >> <br>
      >>> The OpenUPS UPS is listed as supported under
      usbhid-ups, and I had assumed<br>
      >>> that OpenUPS2 would be as well. Bzzzzt. I get a
      unknown device ID for d005<br>
      >>> <br>
      >>> Is adding (or hacking) support for this device into
      the HID driver something<br>
      >>> simple which can be done without a recompile?<br>
      >> <br>
      >> As a first test, start upsd (let us know if you need more
      details, but this<br>
      >> depends on how your OS/distribution packages things up)
      and then run the<br>
      >> usbhid-ups driver manually, as root, with an extra
      option:<br>
      >> <br>
      >>  path/to/usbhid-ups -u root -x productid=d005 -a
      name-of-ups<br>
      >> <br>
      >> If everything is the same under the hood, you can add
      "productid=d005" to<br>
      >> ups.conf. You will also want to copy the line in<br>
      >> /etc/udev/52-nut-usbups.rules that looks like this:<br>
      >> <br>
      >> ATTR{idVendor}=="04d8", ATTR{idProduct}=="d004",
      MODE="664", GROUP="nobody"<br>
      >> <br>
      >> and change the "d004" to "d005".<br>
      >> <br>
      >> If that works, let us know and we will add it to the
      driver.<br>
      > <br>
      > John,<br>
      > <br>
      > Did this work when adding "-x productid=d005"? If so, we can
      update the driver<br>
      > so that it matches automatically.<br>
      > <br>
      > The output of "upsc" would also be handy, for future
      reference.<br>
      > <br>
      > -- <br>
      > Charles Lepple<br>
      > clepple at gmail<br>
      > <br>
      > <br>
      > <br>
      <br>
      -- <br>
      Charles Lepple<br>
      clepple at gmail<br>
    </blockquote>
    <br>
  </body>
</html>