nutdotnet / WinNUT-Client

WinForms-based client for monitoring your Uninterruptible Power Supply (UPS) connected to a Network UPS Tools (NUT) server.
GNU General Public License v3.0
209 stars 19 forks source link

Gauges clamping to minimum when variable is unavailable #136

Open masterwishx opened 7 months ago

masterwishx commented 7 months ago

Original post

updated from WinNUT Client v2.3.8800 to lasted version :

have Eaton 9E 2000i but seems don't have : battery.voltage variable and have 6V instead of 12V like was in versions before :

image

Problem

When WinNUT tries to query a UPS variable on the NUT server, and it encounters an error e.g the variable is missing, it used to substitute the value with a nominal/expected value. Recently, WinNUT was changed so that when a variable is unavailable, instead of being set to a believable default value, it will now be set to an obviously out-of-range value (-1.) It's been discovered that the gauges will clamp themselves to the gauge's minimum value instead of displaying the true value, which is also misleading.

Solutions

When value is beyond the gauge's displayable range:

When the value is unavailable:

image @ElGuillermo

See Also

gbakeman commented 7 months ago

Hello,

Is it the same way with pre-release 2.3.8824? I made several changes to how missing variables are handled in that one.

masterwishx commented 7 months ago

Hello,

Is it the same way with pre-release 2.3.8824? I made several changes to how missing variables are handled in that one.

Yes updated to this latest version

gbakeman commented 7 months ago

Ok, thank you for double checking. I think what I'd like to do is merge this issue with #116 since I intend to change how WinNUT interprets missing variables. I'll make a note of your particular situation (missing battery.voltage) in the OP, and feel free to make a comment if you want to provide any additional info. But in the meantime I think I'll look into #135 first.

masterwishx commented 7 months ago

Ok, thank you for double checking. I think what I'd like to do is merge this issue with #116 since I intend to change how WinNUT interprets missing variables. I'll make a note of your particular situation (missing battery.voltage) in the OP, and feel free to make a comment if you want to provide any additional info. But in the meantime I think I'll look into #135 first.

Sure, just wanted to inform of this case, becose had no this problem befor, as we all know most ups have 12v battery's :)

gbakeman commented 7 months ago

Sorry, it sounded like your NUT server/UPS just wasn't providing the variable to you, but now it sounds like there may be an underlying issue. Could you please upload two things for me:

masterwishx commented 7 months ago

Sorry, it sounded like your NUT server/UPS just wasn't providing the variable to you, but now it sounds like there may be an underlying issue. Could you please upload two things for me:

  • Variables list from the File menu output
  • Log file set to Debug mode

I'm using nut plugin in Unraid server, and I'm sure 100% I don't have value of voltage of the battery, only value of ampere 7A. I will upload soon...

masterwishx commented 7 months ago

From Nut plugin :

image

masterwishx commented 7 months ago

Eaton9E2000i (Eaton/unknown 2000/) battery.capacity (Battery capacity (Ah)) : 7.00 battery.charge (Battery charge (percent of full)) : 100 battery.charge.low (Remaining battery level when UPS switches to LB (percent)) : 20 battery.charge.restart (Minimum battery level for restart after power off (percent)) : 0 battery.protection (Prevent deep discharge of battery) : yes battery.runtime (Battery runtime (seconds)) : 3470 battery.runtime.low (Remaining battery runtime when UPS switches to LB (seconds)) : 180 battery.type (Battery chemistry) : device.mfr (Description unavailable) : Eaton device.model (Description unavailable) : unknown 2000 device.type (Description unavailable) : ups driver.debug (Current debug verbosity level of the driver program) : 0 driver.flag.allow_killpower (Safety flip-switch to allow the driver daemon to send UPS shutdown command (accessible via driver.killpower)) : 0 driver.name (Driver name) : usbhid-ups driver.parameter.pollfreq (Description unavailable) : 30 driver.parameter.pollinterval (Description unavailable) : 2 driver.parameter.port (Description unavailable) : auto driver.parameter.synchronous (Description unavailable) : auto driver.state (Description unavailable) : quiet driver.version (Driver version - NUT release) : 2.8.1 driver.version.data (Description unavailable) : MGE HID 1.46 driver.version.internal (Internal driver version) : 0.52 driver.version.usb (USB library version) : libusb-1.0.26 (API: 0x1000108) input.bypass.frequency (Description unavailable) : 50.0 input.bypass.voltage (Description unavailable) : 232.0 input.frequency (Input line frequency (Hz)) : 50.0 input.frequency.nominal (Nominal input line frequency (Hz)) : 50 input.transfer.high (High voltage transfer point (V)) : 300 input.transfer.low (Low voltage transfer point (V)) : 100 input.voltage (Input voltage (V)) : 232.0 input.voltage.nominal (Nominal input voltage (V)) : 233 outlet.1.status (Outlet switch status) : on outlet.desc (Outlet description) : Main Outlet outlet.id (Outlet system identifier) : 0 outlet.switchable (Outlet switch ability) : no output.current (Output current (A)) : 1.70 output.frequency (Output frequency (Hz)) : 50.0 output.frequency.nominal (Nominal output frequency (Hz)) : 50 output.voltage (Output voltage (V)) : 229.0 output.voltage.nominal (Nominal output voltage (V)) : 230 ups.beeper.status (UPS beeper status) : muted ups.delay.shutdown (Interval to wait after shutdown with delay command (seconds)) : 20 ups.delay.start (Interval to wait before (re)starting the load (seconds)) : 30 ups.firmware (UPS firmware) : ups.load (Load on UPS (percent of full)) : 20 ups.load.high (Load when UPS switches to overload condition (percent)) : 105 ups.mfr (UPS manufacturer) : Eaton ups.model (UPS model) : unknown 2000 ups.power (Current value of apparent power (VA)) : 412 ups.power.nominal (UPS power rating (VA)) : 2000 ups.productid (Product ID for USB devices) : ffff ups.realpower (Current value of real power (W)) : 283 ups.realpower.nominal (UPS real power rating (W)) : 1600 ups.shutdown (Description unavailable) : enabled ups.start.auto (UPS starts when mains is (re)applied) : yes ups.start.battery (Allow to start UPS from battery) : yes ups.start.reboot (UPS reboots when power returns during shutdown delay) : yes ups.status (UPS status) : OL ups.temperature (UPS temperature (degrees C)) : 24.9 ups.test.interval (Interval between self tests (seconds)) : 604800 ups.test.result (Results of last self test) : Done and passed ups.timer.shutdown (Time before the load will be shutdown (seconds)) : -1 ups.timer.start (Time before the load will be started (seconds)) : -1 ups.type (UPS type) : online ups.vendorid (Vendor ID for USB devices) : 0463

masterwishx commented 7 months ago

WinNUT-Client-2024-03-01.log

From the Log:

image

gbakeman commented 7 months ago

Thank you for the detailed amount of the info, I think I understand the issue now! :)

So we're on the same page that your UPS has never provided the battery.voltage variable before, that's all good. Up until recently, when WinNUT encounters an error retrieving a variable, it would be reported with a "fallback" or ideal value, which is why you used to see 12V reported as the battery voltage (even though I think UPS batteries are typically 14V?) At any rate, I recently changed how WinNUT handles errors retrieving variables, by setting the value to a more obvious out of range value (typically -1). But I think you've just discovered another bug, which is that the gauges themselves are clamping out of range values to their nearest minimum or maximum on the dial range. I think this is a problem which will need to be addressed either in #116 , or in the https://github.com/nutdotnet/AGauge project.

I'll keep this open as a reminder for those other items. Thanks again!

masterwishx commented 7 months ago

I think UPS batteries are typically 14V?

The model im Using Eaton 9E2000i have 6x 12V7A

masterwishx commented 7 months ago

image

gbakeman commented 7 months ago

Ah, 12V does make more sense! I'm surprised yours doesn't provide voltage monitoring considering it seems more advanced than most. Do you know if there might be a firmware update?

masterwishx commented 7 months ago

Ah, 12V does make more sense! I'm surprised yours doesn't provide voltage monitoring considering it seems more advanced than most. Do you know if there might be a firmware update?

Not sure , This 9E Model True online double-conversion but not the most advanced as Eaton have better 9SX Model . im using the most newer v2.8.1 of NUT for now. using NUT plugin in Unraid Server. i was not digging in this question about why its not monitoring 12v , but will try to check it ...

masterwishx commented 7 months ago

@gbakeman Also forgot to mention that i have the voltage shown in ups display but its like all battery pack voltage 6x12V =72V but still also NO this value in NUT .

20240305_110151