networkupstools / nut

The Network UPS Tools repository. UPS management protocol Informational RFC 9271 published by IETF at https://www.rfc-editor.org/info/rfc9271 Please star NUT on GitHub, this helps with sponsorships!
https://networkupstools.org/
Other
1.96k stars 348 forks source link

Eaton 9E Model (bypass and Eco) Low/High Voltage Transfer is missing however present when usbhid-usb debug Driver #2492

Closed masterwishx closed 3 weeks ago

masterwishx commented 3 months ago

lsusb.txt usbhid-ups.txt

masterwishx commented 3 months ago

using Unraid NUT plugin v2.8.2 , posted from old version from https://github.com/networkupstools/nut/issues/1925 if need new will post again .

values present in usbhid debug but not in UPS variables:

usbhid-ups

  ECO Transfer

   4.830228 [D5] hid_lookup_path: 00840004 -> UPS
   4.830232 [D5] hid_lookup_path: 00840016 -> PowerConverter
   4.830236 [D5] hid_lookup_path: 0084001c -> Output
   4.830240 [D5] hid_lookup_path: ffff005c -> FrequencyRangeEcoTransfer
   4.830245 [D1] Path: UPS.PowerConverter.Output.FrequencyRangeEcoTransfer, Type: Feature, ReportID: 0x67, Offset: 0, Size: 8, Value: 5
   4.830249 [D4] Entering libusb_get_report
   4.850325 [D3] Report[get]: (3 bytes) => 46 08 01
   4.850338 [D5] PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
   4.850351 [D5] Unit = 00f0d121, UnitExp = 7
   4.850355 [D5] Exponent = 0

4.870484    [D5] hid_lookup_path: 00840004 -> UPS
   4.870487 [D5] hid_lookup_path: 00840016 -> PowerConverter
   4.870490 [D5] hid_lookup_path: 0084001c -> Output
   4.870493 [D5] hid_lookup_path: ffff005b -> HighVoltageEcoTransfer
   4.870498 [D1] Path: UPS.PowerConverter.Output.HighVoltageEcoTransfer, Type: Feature, ReportID: 0x68, Offset: 0, Size: 16, Value: 241
   4.870501 [D4] Entering libusb_get_report
   4.892707 [D3] Report[get]: (5 bytes) => 51 2c 01 64 00
   4.892719 [D5] PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
   4.892723 [D5] Unit = 00f0d121, UnitExp = 7
   4.892725 [D5] Exponent = 0

4.952657    [D5] hid_lookup_path: 00840004 -> UPS
   4.952662 [D5] hid_lookup_path: 00840016 -> PowerConverter
   4.952668 [D5] hid_lookup_path: 0084001c -> Output
   4.952674 [D5] hid_lookup_path: ffff005a -> LowVoltageEcoTransfer
   4.952682 [D1] Path: UPS.PowerConverter.Output.LowVoltageEcoTransfer, Type: Feature, ReportID: 0x69, Offset: 0, Size: 16, Value: 218
   4.952690 [D3] Report[buf]: (5 bytes) => 51 2c 01 64 00
   4.952695 [D5] PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
   4.952700 [D5] Unit = 00f0d121, UnitExp = 7
   4.952704 [D5] Exponent = 0

Bypass Transfer

 4.811105   [D5] hid_lookup_path: 00840004 -> UPS
   4.811108 [D5] hid_lookup_path: 00840016 -> PowerConverter
   4.811111 [D5] hid_lookup_path: 0084001c -> Output
   4.811113 [D5] hid_lookup_path: ffff0059 -> FrequencyRangeBypassTransfer
   4.811118 [D1] Path: UPS.PowerConverter.Output.FrequencyRangeBypassTransfer, Type: Feature, ReportID: 0x44, Offset: 0, Size: 8, Value: 10
   4.811120 [D4] Entering libusb_get_report
   4.830200 [D3] Report[get]: (2 bytes) => 67 05
   4.830215 [D5] PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
   4.830219 [D5] Unit = 00000000, UnitExp = 0
   4.830223 [D5] Exponent = 0

   4.850360 [D5] hid_lookup_path: 00840004 -> UPS
   4.850365 [D5] hid_lookup_path: 00840016 -> PowerConverter
   4.850369 [D5] hid_lookup_path: 0084001c -> Output
   4.850373 [D5] hid_lookup_path: ffff0058 -> HighVoltageBypassTransfer
   4.850381 [D1] Path: UPS.PowerConverter.Output.HighVoltageBypassTransfer, Type: Feature, ReportID: 0x46, Offset: 0, Size: 16, Value: 264
   4.850385 [D4] Entering libusb_get_report
   4.870463 [D3] Report[get]: (3 bytes) => 68 f1 00
   4.870475 [D5] PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
   4.870478 [D5] Unit = 00f0d121, UnitExp = 7
   4.870480 [D5] Exponent = 0

    4.932351    [D5] hid_lookup_path: 00840004 -> UPS
   4.932356 [D5] hid_lookup_path: 00840016 -> PowerConverter
   4.932360 [D5] hid_lookup_path: 0084001c -> Output
   4.932365 [D5] hid_lookup_path: ffff0057 -> LowVoltageBypassTransfer
   4.932372 [D1] Path: UPS.PowerConverter.Output.LowVoltageBypassTransfer, Type: Feature, ReportID: 0x45, Offset: 0, Size: 16, Value: 184
   4.932377 [D4] Entering libusb_get_report
   4.952621 [D3] Report[get]: (3 bytes) => 69 da 00
   4.952640 [D5] PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
   4.952646 [D5] Unit = 00f0d121, UnitExp = 7
   4.952650 [D5] Exponent = 0

image

masterwishx commented 3 months ago

@jimklimov @arnaudquette-eaton can you please confirm if this issue can be fixed ?

arnaudquette-eaton commented 3 months ago

to me, it's just another variation of the missing model name. As long as this issue is not fixed, all these data will continue to be missing

masterwishx commented 3 months ago

As long as this issue is not fixed, all these data will continue to be missing

Thanks for answer, so @jimklimov should add the model 9E or add all those vars of model to fix it ?

masterwishx commented 3 months ago

@jimklimov can you please check it , it seems same other vars also is missing ...

jimklimov commented 3 months ago

To keep things cross-linked and context visible, this post (and the bit on model naming improvements) is related to at least:

masterwishx commented 4 weeks ago

to me, it's just another variation of the missing model name. As long as this issue is not fixed, all these data will continue to be missing

Now as the iProduct and etc was fixed by #2604 those (and more) values still is missing ... @jimklimov @tormodvolden if this need more code in usblib or in mge-hid or its blocked by firmware ?

tormodvolden commented 4 weeks ago

Unless you provide libusb debug output, I cannot help. Do the manufacturer/product strings show up in xusb?

masterwishx commented 4 weeks ago

Unless you provide libusb debug output, I cannot help. Do the manufacturer/product strings show up in xusb?

I will post new libusb debug here tomorrow , the old one Is here above in this page, the first comment and here https://github.com/networkupstools/nut/issues/2492#issuecomment-2191108335 Do you mean xusb for Eaton 9E 0463/ffff? Nont sure if I posted when compiled xusb befor, but can check it...

masterwishx commented 4 weeks ago

Here is the new log after the fix #2604 : nut debug log.txt

masterwishx commented 4 weeks ago

libusb debug from xusb (with code to check langid) is same as here : https://github.com/libusb/libusb/issues/1548#issuecomment-2308879614

libusb 1.0.27 debug log.txt

tormodvolden commented 4 weeks ago

I see in your nut_debug_log.txt that the device is identified with Manufacturer: EATON and Product: Eaton 9E. I also see HighVoltageTransfer with value 300 and LowVoltageTransfer with value 100. So I guess there is nothing wrong with the USB communication and nothing I can help you with.

masterwishx commented 4 weeks ago

I see in your nut_debug_log.txt that the device is identified with Manufacturer: EATON and Product: Eaton 9E

Sure ,you already make amazing work to fix langid from unknown 2000 to Eaton 2000i in #2604.

HighVoltageTransfer with value 300 and LowVoltageTransfer with value 100

Thouse values already was avalibe in UPS variables befor the fix , as input.transfer.low = 100 and input.transfer.high = 300

but the question is about other values that avalibe in debug but not in variables like :

FrequencyRangeBypassTransfer, FrequencyRangeEcoTransfer, HighVoltageBypassTransfer, HighVoltageEcoTransfer and etc ...

Sep  7 11:34:10 myserver rc.nut:    4.660490#011[D5:3982] hid_lookup_path: 00840004 -> UPS
Sep  7 11:34:10 myserver rc.nut:    4.660492#011[D5:3982] hid_lookup_path: 00840016 -> PowerConverter
Sep  7 11:34:10 myserver rc.nut:    4.660494#011[D5:3982] hid_lookup_path: 0084001c -> Output
Sep  7 11:34:10 myserver rc.nut:    4.660497#011[D5:3982] hid_lookup_path: ffff0059 -> FrequencyRangeBypassTransfer
Sep  7 11:34:10 myserver rc.nut:    4.660501#011[D1:3982] Path: UPS.PowerConverter.Output.FrequencyRangeBypassTransfer, Type: Feature, ReportID: 0x44, Offset: 0, Size: 8, Value: 10
Sep  7 11:34:10 myserver rc.nut:    4.660504#011[D4:3982] Entering libusb_get_report
Sep  7 11:34:10 myserver rc.nut:    4.679563#011[D3:3982] Report[get]: (2 bytes) => 67 05
Sep  7 11:34:10 myserver rc.nut:    4.679573#011[D5:3982] PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
Sep  7 11:34:10 myserver rc.nut:    4.679576#011[D5:3982] Unit = 00000000, UnitExp = 0
Sep  7 11:34:10 myserver rc.nut:    4.679578#011[D5:3982] Exponent = 0
Sep  7 11:34:10 myserver rc.nut:    4.679581#011[D5:3982] hid_lookup_path: 00840004 -> UPS
Sep  7 11:34:10 myserver rc.nut:    4.679583#011[D5:3982] hid_lookup_path: 00840016 -> PowerConverter
Sep  7 11:34:10 myserver rc.nut:    4.679585#011[D5:3982] hid_lookup_path: 0084001c -> Output
Sep  7 11:34:10 myserver rc.nut:    4.679587#011[D5:3982] hid_lookup_path: ffff005c -> FrequencyRangeEcoTransfer
Sep  7 11:34:10 myserver rc.nut:    4.679590#011[D1:3982] Path: UPS.PowerConverter.Output.FrequencyRangeEcoTransfer, Type: Feature, ReportID: 0x67, Offset: 0, Size: 8, Value: 5
Sep  7 11:34:10 myserver rc.nut:    4.679593#011[D4:3982] Entering libusb_get_report
Sep  7 11:34:10 myserver rc.nut:    4.699716#011[D3:3982] Report[get]: (3 bytes) => 46 08 01
Sep  7 11:34:10 myserver rc.nut:    4.699727#011[D5:3982] PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
Sep  7 11:34:10 myserver rc.nut:    4.699730#011[D5:3982] Unit = 00f0d121, UnitExp = 7
Sep  7 11:34:10 myserver rc.nut:    4.699732#011[D5:3982] Exponent = 0
Sep  7 11:34:10 myserver rc.nut:    4.699735#011[D5:3982] hid_lookup_path: 00840004 -> UPS
Sep  7 11:34:10 myserver rc.nut:    4.699737#011[D5:3982] hid_lookup_path: 00840016 -> PowerConverter
Sep  7 11:34:10 myserver rc.nut:    4.699739#011[D5:3982] hid_lookup_path: 0084001c -> Output
Sep  7 11:34:10 myserver rc.nut:    4.699741#011[D5:3982] hid_lookup_path: ffff0058 -> HighVoltageBypassTransfer
Sep  7 11:34:10 myserver rc.nut:    4.699745#011[D1:3982] Path: UPS.PowerConverter.Output.HighVoltageBypassTransfer, Type: Feature, ReportID: 0x46, Offset: 0, Size: 16, Value: 264
Sep  7 11:34:10 myserver rc.nut:    4.699748#011[D4:3982] Entering libusb_get_report
Sep  7 11:34:10 myserver rc.nut:    4.720694#011[D3:3982] Report[get]: (3 bytes) => 68 f1 00
Sep  7 11:34:10 myserver rc.nut:    4.720705#011[D5:3982] PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
Sep  7 11:34:10 myserver rc.nut:    4.720707#011[D5:3982] Unit = 00f0d121, UnitExp = 7
Sep  7 11:34:10 myserver rc.nut:    4.720709#011[D5:3982] Exponent = 0
Sep  7 11:34:10 myserver rc.nut:    4.720712#011[D5:3982] hid_lookup_path: 00840004 -> UPS
Sep  7 11:34:10 myserver rc.nut:    4.720715#011[D5:3982] hid_lookup_path: 00840016 -> PowerConverter
Sep  7 11:34:10 myserver rc.nut:    4.720717#011[D5:3982] hid_lookup_path: 0084001c -> Output
Sep  7 11:34:10 myserver rc.nut:    4.720719#011[D5:3982] hid_lookup_path: ffff005b -> HighVoltageEcoTransfer
Sep  7 11:34:10 myserver rc.nut:    4.720723#011[D1:3982] Path: UPS.PowerConverter.Output.HighVoltageEcoTransfer, Type: Feature, ReportID: 0x68, Offset: 0, Size: 16, Value: 241
Sep  7 11:34:10 myserver rc.nut:    4.720726#011[D4:3982] Entering libusb_get_report
Sep  7 11:34:10 myserver rc.nut:    4.742891#011[D3:3982] Report[get]: (5 bytes) => 51 2c 01 64 00
Sep  7 11:34:10 myserver rc.nut:    4.742901#011[D5:3982] PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
Sep  7 11:34:10 myserver rc.nut:    4.742903#011[D5:3982] Unit = 00f0d121, UnitExp = 7
Sep  7 11:34:10 myserver rc.nut:    4.742905#011[D5:3982] Exponent = 0
Sep  7 11:34:10 myserver rc.nut:    4.742908#011[D5:3982] hid_lookup_path: 00840004 -> UPS
Sep  7 11:34:10 myserver rc.nut:    4.742910#011[D5:3982] hid_lookup_path: 00840016 -> PowerConverter
Sep  7 11:34:10 myserver rc.nut:    4.742912#011[D5:3982] hid_lookup_path: 0084001c -> Output
Sep  7 11:34:10 myserver rc.nut:    4.742914#011[D5:3982] hid_lookup_path: 00840054 -> HighVoltageTransfer
Sep  7 11:34:10 myserver rc.nut:    4.742918#011[D1:3982] Path: UPS.PowerConverter.Output.HighVoltageTransfer, Type: Feature, ReportID: 0x51, Offset: 0, Size: 16, Value: 300
Sep  7 11:34:10 myserver rc.nut:    4.742921#011[D4:3982] Entering libusb_get_report
Sep  7 11:34:10 myserver rc.nut:    4.761989#011[D3:3982] Report[get]: (2 bytes) => 6a 0a
Sep  7 11:34:10 myserver rc.nut:    4.761999#011[D5:3982] PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
Sep  7 11:34:10 myserver rc.nut:    4.762005#011[D5:3982] Unit = 00f0d121, UnitExp = 7
Sep  7 11:34:10 myserver rc.nut:    4.762006#011[D5:3982] Exponent = 0
Sep  7 11:34:10 myserver rc.nut:    4.762009#011[D5:3982] hid_lookup_path: 00840004 -> UPS
Sep  7 11:34:10 myserver rc.nut:    4.762012#011[D5:3982] hid_lookup_path: 00840016 -> PowerConverter
Sep  7 11:34:10 myserver rc.nut:    4.762014#011[D5:3982] hid_lookup_path: 0084001c -> Output
Sep  7 11:34:10 myserver rc.nut:    4.762016#011[D5:3982] hid_lookup_path: ffff009c -> HysteresysVoltageTransfer
Sep  7 11:34:10 myserver rc.nut:    4.762019#011[D1:3982] Path: UPS.PowerConverter.Output.HysteresysVoltageTransfer, Type: Feature, ReportID: 0x6a, Offset: 0, Size: 8, Value: 10
Sep  7 11:34:10 myserver rc.nut:    4.762022#011[D4:3982] Entering libusb_get_report
Sep  7 11:34:10 myserver rc.nut:    4.782155#011[D3:3982] Report[get]: (3 bytes) => 45 b8 00
Sep  7 11:34:10 myserver rc.nut:    4.782165#011[D5:3982] PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
Sep  7 11:34:10 myserver rc.nut:    4.782168#011[D5:3982] Unit = 00f0d121, UnitExp = 7
Sep  7 11:34:10 myserver rc.nut:    4.782169#011[D5:3982] Exponent = 0
Sep  7 11:34:10 myserver rc.nut:    4.782172#011[D5:3982] hid_lookup_path: 00840004 -> UPS
Sep  7 11:34:10 myserver rc.nut:    4.782175#011[D5:3982] hid_lookup_path: 00840016 -> PowerConverter
Sep  7 11:34:10 myserver rc.nut:    4.782177#011[D5:3982] hid_lookup_path: 0084001c -> Output
Sep  7 11:34:10 myserver rc.nut:    4.782179#011[D5:3982] hid_lookup_path: ffff0057 -> LowVoltageBypassTransfer
Sep  7 11:34:10 myserver rc.nut:    4.782183#011[D1:3982] Path: UPS.PowerConverter.Output.LowVoltageBypassTransfer, Type: Feature, ReportID: 0x45, Offset: 0, Size: 16, Value: 184
Sep  7 11:34:10 myserver rc.nut:    4.782186#011[D4:3982] Entering libusb_get_report
Sep  7 11:34:10 myserver rc.nut:    4.802262#011[D3:3982] Report[get]: (3 bytes) => 69 da 00
Sep  7 11:34:10 myserver rc.nut:    4.802271#011[D5:3982] PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
Sep  7 11:34:10 myserver rc.nut:    4.802283#011[D5:3982] Unit = 00f0d121, UnitExp = 7
Sep  7 11:34:10 myserver rc.nut:    4.802284#011[D5:3982] Exponent = 0
Sep  7 11:34:10 myserver rc.nut:    4.802287#011[D5:3982] hid_lookup_path: 00840004 -> UPS
Sep  7 11:34:10 myserver rc.nut:    4.802290#011[D5:3982] hid_lookup_path: 00840016 -> PowerConverter
Sep  7 11:34:10 myserver rc.nut:    4.802292#011[D5:3982] hid_lookup_path: 0084001c -> Output
Sep  7 11:34:10 myserver rc.nut:    4.802294#011[D5:3982] hid_lookup_path: ffff005a -> LowVoltageEcoTransfer
Sep  7 11:34:10 myserver rc.nut:    4.802297#011[D1:3982] Path: UPS.PowerConverter.Output.LowVoltageEcoTransfer, Type: Feature, ReportID: 0x69, Offset: 0, Size: 16, Value: 218
Sep  7 11:34:10 myserver rc.nut:    4.802301#011[D3:3982] Report[buf]: (5 bytes) => 51 2c 01 64 00
Sep  7 11:34:10 myserver rc.nut:    4.802303#011[D5:3982] PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
Sep  7 11:34:10 myserver rc.nut:    4.802305#011[D5:3982] Unit = 00f0d121, UnitExp = 7
masterwishx commented 4 weeks ago

and here is nut details :

battery.capacity: 7.00
battery.charge: 100
battery.charge.low: 20
battery.charge.restart: 0
battery.protection: yes
battery.runtime: 3444
battery.runtime.low: 180
battery.type: PbAc
battery.voltage: 83.0
battery.voltage.nominal: 72
device.mfr: EATON
device.model: 9E2000i
device.serial:  xxxxxxxxxxxx                   #REDACTED by me # !!! serial is shown now !!!
device.type: ups
driver.debug: 0
driver.flag.allow_killpower: 0
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: auto
driver.state: updateinfo
driver.version: 2.8.2.1
driver.version.data: MGE HID 1.48
driver.version.internal: 0.56
driver.version.usb: libusb-1.0.26 (API: 0x1000108)
input.bypass.frequency: 49.9
input.bypass.voltage: 232.0
input.frequency: 49.9
input.frequency.nominal: 50
input.transfer.high: 300
input.transfer.low: 100
input.voltage: 232.0
input.voltage.nominal: 231
outlet.1.status: on
outlet.desc: Main Outlet
outlet.id: 0
outlet.switchable: no
output.current: 1.60
output.frequency: 49.9
output.frequency.nominal: 50
output.voltage: 229.0
output.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.firmware: 00.02.000
ups.load: 19
ups.load.high: 105
ups.mfr: EATON
ups.model: 9E2000i
ups.power: 393
ups.power.nominal: 2000
ups.productid: ffff
ups.realpower: 261
ups.realpower.nominal: 1600
ups.serial:  xxxxxxxxxxxx                   #REDACTED by me # !!! serial is shown now !!!
ups.shutdown: enabled
ups.start.auto: yes
ups.start.battery: yes
ups.start.reboot: yes
ups.status: OL
ups.temperature: 24.9
ups.test.interval: 604800
ups.test.result: Done and passed
ups.timer.shutdown: -1
ups.timer.start: -1
ups.type: online
ups.vendorid: 0463
masterwishx commented 3 weeks ago

@jimklimov @tormodvolden

after a little research it seems thouse values are missing in Data lookup table (HID <-> NUT) https://github.com/masterwishx/nut/blob/64435823ac369f3906cefe20b9b19d27bec8c96d/drivers/mge-hid.c#L1251

but present in /* Eaton / MGE HID usage table */ https://github.com/masterwishx/nut/blob/64435823ac369f3906cefe20b9b19d27bec8c96d/drivers/mge-hid.c#L872

masterwishx commented 3 weeks ago

So I can try to add thouse values to table, but seems its more complicated to add ECO Mode to NUT in #2495 for Eaton ups

arnaudquette-eaton commented 3 weeks ago

indeed @masterwishx , as you found, not all HID data are mapped to NUT variables. Some may not to extend NUT namespace, but I should have paved the road enough to make it easy...

masterwishx commented 3 weeks ago

indeed @masterwishx , as you found, not all HID data are mapped to NUT variables. Some may not to extend NUT namespace, but I should have paved the road enough to make it easy...

I can try to add thouse missing values but still need some way to activate bypass or eco mode in code...

masterwishx commented 3 weeks ago

but I should have paved the road enough to make it easy...

Thanks for amazing work for we can use NUT and upgrade it :)

masterwishx commented 3 weeks ago

indeed @masterwishx , as you found, not all HID data are mapped to NUT variables. Some may not to extend NUT namespace, but I should have paved the road enough to make it easy...

input.transfer.high already avaliable but why it's not output.transfer.high?


{ "input.transfer.high", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Output.HighVoltageTransfer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL },```
masterwishx commented 3 weeks ago

indeed @masterwishx , as you found, not all HID data are mapped to NUT variables. Some may not to extend NUT namespace, but I should have paved the road enough to make it easy...

input.transfer.high already avaliable but why it's not output.transfer.high?

{ "input.transfer.high", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerConverter.Output.HighVoltageTransfer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL },```

Oh or it's mean like input to ups from wall socket power?