[Nut-upsuser] battery.voltage Powercom Macan MRT-3000
Charles Lepple
clepple at gmail.com
Wed Jan 11 01:55:30 GMT 2023
Please email nut-upsuser at alioth-lists rather than nut-upsuser-owner, thanks!
> On Jan 10, 2023, at 12:58 PM, Alex Rydzewski <arydzewski at elyland.net> wrote:
>
> Yes, You right) battery.voltage
>
> I found these data among other
>
> 0.522942 [D5] hid_lookup_path: 00840004 -> UPS
> 0.522950 [D5] hid_lookup_path: 00840024 -> PowerSummary
> 0.522958 [D5] hid_lookup_path: 00840030 -> Voltage
> 0.522967 [D1] Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x12, Offset: 0, Size: 16, Value: 220
>
> 0.558943 [D5] hid_lookup_path: 00840004 -> UPS
> 0.558950 [D5] hid_lookup_path: 00840012 -> Battery
> 0.558958 [D5] hid_lookup_path: 00850066 -> RemainingCapacity
> 0.558966 [D1] Path: UPS.Battery.RemainingCapacity, Type: Feature, ReportID: 0x18, Offset: 0, Size: 8, Value: 100
> 0.558973 [D4] Entering libusb_get_report
> 0.563880 [D3] Report[get]: (3 bytes) => 19 dc 00
> 0.563899 [D5] PhyMax = 0, PhyMin = 0, LogMax = 12288, LogMin = 3072
> 0.563911 [D5] Unit = 00000000, UnitExp = 0
> 0.563920 [D5] Exponent = 0
> 0.563927 [D5] hid_lookup_path: 00840004 -> UPS
> 0.563934 [D5] hid_lookup_path: 00840012 -> Battery
> 0.563942 [D5] hid_lookup_path: 00840040 -> ConfigVoltage
> 0.563951 [D1] Path: UPS.Battery.ConfigVoltage, Type: Feature, ReportID: 0x19, Offset: 0, Size: 16, Value: 3072
> 0.563958 [D4] Entering libusb_get_report
> 0.568883 [D3] Report[get]: (3 bytes) => 1a 02 15
> 0.568902 [D5] PhyMax = 0, PhyMin = 0, LogMax = 9216, LogMin = 2304
> 0.568914 [D5] Unit = 00000000, UnitExp = 0
> 0.568924 [D5] Exponent = 0
> 0.568931 [D5] hid_lookup_path: 00840004 -> UPS
> 0.568939 [D5] hid_lookup_path: 00840012 -> Battery
> 0.568946 [D5] hid_lookup_path: 00840030 -> Voltage
> 0.568955 [D1] Path: UPS.Battery.Voltage, Type: Feature, ReportID: 0x1a, Offset: 0, Size: 16, Value: 5378
>
> But the real level of battery.voltage is 79.7 Perhaps the data interpret somehow?
>
> Do You mean the "Report Descriptor" when speak about reports from USB?
>
> On 10.01.23 19:14, Jim Klimov wrote:
>> I suppose that should have read "correct battery.voltage" ;)
>>
>> Not sure really - this is the standard endpoint for that info, so firmware is broken for USB HID power device support.
>>
>> 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.
>>
>> Jim
>>
>> On Tue, Jan 10, 2023, 18:09 Alex Rydzewski <arydzewski at elyland.net <mailto:arydzewski at elyland.net>> wrote:
>> Thank You for your attention, Jim!
>> I compiled and ran the 2.8.0 version with this part uncomment
>> * { "battery.voltage", 0, 0, "UPS.PowerSummary.Voltage", NULL, "%.2f", 0, NULL },
>> * { "battery.voltage", 0, 0, "UPS.Battery.Voltage", NULL, "%.2f", 0, NULL },
>> * { "battery.voltage.nominal", 0, 0, "UPS.PowerSummary.ConfigVoltage", NULL, "%.0f", HU_FLAG_STATIC, NULL },
>> * { "battery.voltage.nominal", 0, 0, "UPS.Battery.ConfigVoltage", NULL, "%.0f", HU_FLAG_STATIC, NULL },
>> from powercom-hid.c, and it is so, it is duplicates for output.voltage.
>>
>> Is there anything I can do to find the correct output.voltage?
>>
>> On 10.01.23 14:12, Jim Klimov wrote:
>>> Hello,
>>>
>>> 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.
>>>
>>> Other than that, current source says at https://github.com/networkupstools/nut/blob/1deab1638322e9e64a0cf3200dadc93dbe3a3f41/drivers/powercom-hid.c#L362-L368 <https://github.com/networkupstools/nut/blob/1deab1638322e9e64a0cf3200dadc93dbe3a3f41/drivers/powercom-hid.c#L362-L368> 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 https://github.com/networkupstools/nut/issues/1644 <https://github.com/networkupstools/nut/issues/1644> 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 :-\
>>>
>>> Something in your question does ring a bell - please revise https://github.com/networkupstools/nut/issues?q=label%3APowercom <https://github.com/networkupstools/nut/issues?q=+label%3APowercom> and/or https://github.com/networkupstools/nut/issues?q=powercom <https://github.com/networkupstools/nut/issues?q=powercom> to see if that was discussed earlier in more detail.
>>>
>>> Hope this helps,
>>> Jim Klimov
>>>
>>>
>>> On Tue, Jan 10, 2023 at 11:42 AM Alex Rydzewski <arydzewski at elyland.net <mailto:arydzewski at elyland.net>> wrote:
>>> Hello!
>>>
>>> I have not been able to get the battery.voltage data from the Powercom
>>> Macan MRT-3000, although there is data in the log that does not match
>>> the value I see on the device's display. Please tell me how I can
>>> control this. And please tell me, if possible, how to get the absolute
>>> value of the load on this device.
>>> Debug log is attached
>>>
>>> ~ # upsc 004-0D9F-000
>>> Init SSL without certificate database
>>> battery.charge: 100
>>> battery.charge.low: 10
>>> battery.charge.warning: 30
>>> battery.date: 2014/01/15 I'm not sure that it is right
>>> battery.runtime: 800 Is this data from the device or
>>> from the driver?
>>> battery.type: PbAc
>>> battery.voltage.high: 81.60
>>> battery.voltage.low: 63.60
>>> battery.voltage.nominal: 75.60
>>> device.mfr: POWERCOM Co.,LTD
>>> device.model: HID UPS Battery
>>> device.serial: 004-0D9F-000
>>> device.type: ups
>>> driver.name <http://driver.name/>: usbhid-ups
>>> driver.version: 2.7.2
>>> driver.version.data: PowerCOM HID 0.4
>>> driver.version.internal: 0.38
>>> ...
>>>
>>> --
>>> З найкращими побажаннями, Олександр Ридзевський |With best regards, Mr. Alexander Rydzewski, |С наилучшими пожеланиями, Александр Рыдзевский
>>> Системний та мережевий інженер, Elyland ltd. |System and Network Engineer at Elyland ltd. |Системный и сетевой инженер, Elyland ltd.
>> --
>> З найкращими побажаннями, Олександр Ридзевський |With best regards, Mr. Alexander Rydzewski, |С наилучшими пожеланиями, Александр Рыдзевский
>> Системний та мережевий інженер, Elyland ltd. |System and Network Engineer at Elyland ltd. |Системный и сетевой инженер, Elyland ltd.
> --
> З найкращими побажаннями, Олександр Ридзевський |With best regards, Mr. Alexander Rydzewski, |С наилучшими пожеланиями, Александр Рыдзевский
> Системний та мережевий інженер, Elyland ltd. |System and Network Engineer at Elyland ltd. |Системный и сетевой инженер, Elyland ltd.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20230110/cfc2391f/attachment-0001.htm>
More information about the Nut-upsuser
mailing list