<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Please email nut-upsuser@alioth-lists rather than nut-upsuser-owner, thanks!<br class="">
<div><br class=""><blockquote type="cite" class=""><div class="">On Jan 10, 2023, at 12:58 PM, Alex Rydzewski <<a href="mailto:arydzewski@elyland.net" class="">arydzewski@elyland.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
  
  <div class=""><p class="">Yes, You right) battery.voltage</p><p class="">I found these data among other</p><p class="">   0.522942     [D5] hid_lookup_path: 00840004 -> UPS<br class="">
         0.522950     [D5] hid_lookup_path: 00840024 -> PowerSummary<br class="">
         0.522958     [D5] hid_lookup_path: 00840030 -> Voltage<br class="">
         0.522967     [D1] Path: UPS.PowerSummary.Voltage, Type:
      Feature, ReportID: 0x12, Offset: 0, Size: 16, Value: 220</p><p class="">   0.558943     [D5] hid_lookup_path: 00840004 -> UPS<br class="">
         0.558950     [D5] hid_lookup_path: 00840012 -> Battery<br class="">
         0.558958     [D5] hid_lookup_path: 00850066 ->
      RemainingCapacity<br class="">
         0.558966     [D1] Path: UPS.Battery.RemainingCapacity, Type:
      Feature, ReportID: 0x18, Offset: 0, Size: 8, Value: 100<br class="">
         0.558973     [D4] Entering libusb_get_report<br class="">
         0.563880     [D3] Report[get]: (3 bytes) => 19 dc 00<br class="">
         0.563899     [D5] PhyMax = 0, PhyMin = 0, LogMax = 12288,
      LogMin = 3072<br class="">
         0.563911     [D5] Unit = 00000000, UnitExp = 0<br class="">
         0.563920     [D5] Exponent = 0<br class="">
         0.563927     [D5] hid_lookup_path: 00840004 -> UPS<br class="">
         0.563934     [D5] hid_lookup_path: 00840012 -> Battery<br class="">
         0.563942     [D5] hid_lookup_path: 00840040 -> ConfigVoltage<br class="">
         0.563951     [D1] Path: UPS.Battery.ConfigVoltage, Type:
      Feature, ReportID: 0x19, Offset: 0, Size: 16, Value: 3072<br class="">
         0.563958     [D4] Entering libusb_get_report<br class="">
         0.568883     [D3] Report[get]: (3 bytes) => 1a 02 15<br class="">
         0.568902     [D5] PhyMax = 0, PhyMin = 0, LogMax = 9216, LogMin
      = 2304<br class="">
         0.568914     [D5] Unit = 00000000, UnitExp = 0<br class="">
         0.568924     [D5] Exponent = 0<br class="">
         0.568931     [D5] hid_lookup_path: 00840004 -> UPS<br class="">
         0.568939     [D5] hid_lookup_path: 00840012 -> Battery<br class="">
         0.568946     [D5] hid_lookup_path: 00840030 -> Voltage<br class="">
         0.568955     [D1] Path: UPS.Battery.Voltage, Type: Feature,
      ReportID: 0x1a, Offset: 0, Size: 16, Value: 5378</p><p class="">But the real level of battery.voltage is 79.7 Perhaps the data
      interpret somehow?</p><p class="">Do You mean the "Report Descriptor" when speak about reports from
      USB?<br class="">
    </p>
    <div class="moz-cite-prefix">On 10.01.23 19:14, Jim Klimov wrote:<br class="">
    </div>
    <blockquote type="cite" cite="mid:CAJYg8v+ELkYEvPBYooeWWK=bkuw7z_biOs7bpCjQ_-LJMxLwSA@mail.gmail.com" class="">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
      <div dir="auto" class="">I suppose that should have read "correct
        battery.voltage" ;)
        <div dir="auto" class=""><br class="">
        </div>
        <div dir="auto" class="">Not sure really - this is the standard endpoint
          for that info, so firmware is broken for USB HID power device
          support.</div>
        <div dir="auto" class=""><br class="">
        </div>
        <div dir="auto" class="">If you start the driver with higher debug
          verbosity, it prints the reports from USB. If you can decipher
          those (online tools exist but I don't have a link handy),
          maybe some other field (possibly with an untranslated hex
          name) conveys data that looks like what you need.</div>
        <div dir="auto" class=""><br class="">
        </div>
        <div dir="auto" class="">Jim</div>
      </div>
      <br class="">
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, Jan 10, 2023, 18:09
          Alex Rydzewski <<a href="mailto:arydzewski@elyland.net" moz-do-not-send="true" class="moz-txt-link-freetext">arydzewski@elyland.net</a>>
          wrote:<br class="">
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div class=""><p class="">Thank You for your attention, Jim!<br class="">
              I compiled and ran the 2.8.0 version with this part
              uncomment<br class="">
               *    { "battery.voltage", 0, 0,
              "UPS.PowerSummary.Voltage", NULL, "%.2f", 0, NULL },<br class="">
               *    { "battery.voltage", 0, 0, "UPS.Battery.Voltage",
              NULL, "%.2f", 0, NULL },<br class="">
               *    { "battery.voltage.nominal", 0, 0,
              "UPS.PowerSummary.ConfigVoltage", NULL, "%.0f",
              HU_FLAG_STATIC, NULL },<br class="">
               *    { "battery.voltage.nominal", 0, 0,
              "UPS.Battery.ConfigVoltage", NULL, "%.0f", HU_FLAG_STATIC,
              NULL },<br class="">
              from powercom-hid.c, and it is so, it is duplicates for
              output.voltage.<br class="">
              <br class="">
              Is there anything I can do to find the correct
              output.voltage?<br class="">
            </p>
            <div class="">On 10.01.23 14:12, Jim Klimov wrote:<br class="">
            </div>
            <blockquote type="cite" class="">
              <div dir="ltr" class="">
                <div class="">Hello,</div>
                <div class=""><br class="">
                </div>
                <div class="">  One thing that pops out in your report is that
                  NUT 2.7.2 is used, which is pretty old now. If you
                  have a chance to install 2.8.0 or newer (custom build
                  of current git master) to confirm if the problem is
                  still there, it could be helpful.</div>
                <div class=""><br class="">
                </div>
                <div class="">  Other than that, current source says at <a href="https://github.com/networkupstools/nut/blob/1deab1638322e9e64a0cf3200dadc93dbe3a3f41/drivers/powercom-hid.c#L362-L368" target="_blank" rel="noreferrer" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/networkupstools/nut/blob/1deab1638322e9e64a0cf3200dadc93dbe3a3f41/drivers/powercom-hid.c#L362-L368</a>
                  that "battery.voltage" is served in USB reports, but
                  is not useful (same as output voltage). Nearby,
                  "battery.runtime" and "battery.mfr.date" do come from
                  USB reports, but per <a href="https://github.com/networkupstools/nut/issues/1644" target="_blank" rel="noreferrer" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/networkupstools/nut/issues/1644</a>
                  the latter was previously wrongly reported as
                  "battery.date" (for replacement). Note that generally
                  fixes are based on user reports about devices which
                  misbehaved; if a vendor has multiple devices with
                  different behaviors (including bug fixes in newer
                  firmwares) it can get messy and need some more
                  elaborate fixes :-\<br class="">
                </div>
                <div class=""><br class="">
                </div>
                <div class="">  Something in your question does ring a bell -
                  please revise <a href="https://github.com/networkupstools/nut/issues?q=+label%3APowercom" target="_blank" rel="noreferrer" moz-do-not-send="true" class="">https://github.com/networkupstools/nut/issues?q=label%3APowercom</a>
                  and/or <a href="https://github.com/networkupstools/nut/issues?q=powercom" target="_blank" rel="noreferrer" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/networkupstools/nut/issues?q=powercom</a>
                  to see if that was discussed earlier in more detail.<br class="">
                </div>
                <div class=""><br class="">
                </div>
                <div class="">Hope this helps,</div>
                <div class="">Jim Klimov<br class="">
                </div>
                <div class=""><br class="">
                </div>
              </div>
              <br class="">
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Tue, Jan 10, 2023
                  at 11:42 AM Alex Rydzewski <<a href="mailto:arydzewski@elyland.net" target="_blank" rel="noreferrer" moz-do-not-send="true" class="moz-txt-link-freetext">arydzewski@elyland.net</a>>
                  wrote:<br class="">
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">Hello!<br class="">
                  <br class="">
                  I have not been able to get the battery.voltage data
                  from the Powercom <br class="">
                  Macan MRT-3000, although there is data in the log that
                  does not match <br class="">
                  the value I see on the device's display. Please tell
                  me how I can <br class="">
                  control this. And please tell me, if possible, how to
                  get the absolute <br class="">
                  value of the load on this device.<br class="">
                  Debug log is attached<br class="">
                  <br class="">
                  ~ # upsc 004-0D9F-000<br class="">
                  Init SSL without certificate database<br class="">
                  battery.charge: 100<br class="">
                  battery.charge.low: 10<br class="">
                  battery.charge.warning: 30<br class="">
                  battery.date: 2014/01/15             I'm not sure that
                  it is right<br class="">
                  battery.runtime: 800                    Is this data
                  from the device or <br class="">
                  from the driver?<br class="">
                  battery.type: PbAc<br class="">
                  battery.voltage.high: 81.60<br class="">
                  battery.voltage.low: 63.60<br class="">
                  battery.voltage.nominal: 75.60<br class="">
                  device.mfr: POWERCOM Co.,LTD<br class="">
                  device.model: HID UPS Battery<br class="">
                  device.serial: 004-0D9F-000<br class="">
                  device.type: ups<br class="">
                  <a href="http://driver.name/" rel="noreferrer
                    noreferrer" target="_blank" moz-do-not-send="true" class="">driver.name</a>:
                  usbhid-ups<br class="">
                  driver.version: 2.7.2<br class="">
                  driver.version.data: PowerCOM HID 0.4<br class="">
                  driver.version.internal: 0.38<br class="">
                  ...<br class="">
                  <br class="">
                  -- <br class="">
                  З найкращими побажаннями, Олександр Ридзевський |With
                  best regards, Mr. Alexander Rydzewski,    |С
                  наилучшими пожеланиями, Александр Рыдзевский<br class="">
                  Системний та мережевий інженер, Elyland ltd.   
                  |System and Network Engineer at Elyland ltd.   
                  |Системный и сетевой инженер, Elyland ltd.<br class="">
                </blockquote>
              </div>
            </blockquote>
            <pre cols="72" class="">-- 
З найкращими побажаннями, Олександр Ридзевський       |With best regards, Mr. Alexander Rydzewski,    |С наилучшими пожеланиями, Александр Рыдзевский
Системний та мережевий інженер, Elyland ltd. |System and Network Engineer at Elyland ltd.    |Системный и сетевой инженер, Elyland ltd.</pre>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
З найкращими побажаннями, Олександр Ридзевський       |With best regards, Mr. Alexander Rydzewski,    |С наилучшими пожеланиями, Александр Рыдзевский
Системний та мережевий інженер, Elyland ltd. |System and Network Engineer at Elyland ltd.    |Системный и сетевой инженер, Elyland ltd.</pre>
  </div>

</div></blockquote></div><br class=""></body></html>