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
226 stars 20 forks source link

WinNUT shuts down immediately when remaining battery time is "Unavailable", even if remaining time trigger set to 0 #195

Open GeraZsolt opened 4 days ago

GeraZsolt commented 4 days ago

WinNUT Version: v2.3.8988

Windows OS Version: Win10 22H2

Describe the bug My UPS (SPS-MID 1000 OnLine UPS) battery remaining time is unknown on the Synology DS420+ NAS, so the info transmitted to WinNUT Client also can not read the remaining time, so it is "Unavailable", and even if i set the "Shutdown if runtime lower than (sec)" is set to 0 (ZERO) the shutdown starts immediately. ZERO value should disable the check for remaining battery runtime!

OR

There should be a logical operator to be able to set this one: "Shutdown if battery lower than x%" OR "Shutdown if runtime lower than (sec)" will be the trigger (whichever comes true first) or this one: "Shutdown if battery lower than x%" AND "Shutdown if runtime lower than (sec)" will be the trigger if BOTH of them are true.

ZERO value disables the check for remaining battery percent, or battery remaining time.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'settings / shutdown options'
  2. Set runtime to '0'
  3. Test power outage
  4. Shutdown will be initiated when the UPS runtime is unavailable.

Expected behavior I expect that WinNUT ignores the unavailable remaining time if i set the trigger to 0 sec. (and also the same for the remaining percent, if a UPS can not communicate this attribute to the SNMP server)

Screenshots

Additional context