WingNUT is a graphic Windows client for Network UPS Tools (NUT). Available at https://networkupstools.org/, NUT provides to other network-connected systems, access to Uninterruptible Power Supplies (and other power devices) which are physically connected to the system on which NUT runs, thereby allowing those systems to monitor the status of a UPS which is providing power to said systems, facilitating the timely shutdown of such systems prior to loss of power, in the case of the UPS going critical.
WingNUT runs on Windows systems, providing a graphic display of various aspects of the UPS being monitored, together with user-configurable parameters to cause the system to shut down when power loss is imminent. It is designed to monitor a single network-connected UPS, which may be providing power to several local systems concurrently. A typical scenario for a home user might be a few (or several) nearby computers (and other systems, such as NAS, network switch, etc.) being powered from a single UPS, which is physically connected either to one of the computers, or to the NAS, either of which runs the NUT server. The remaining systems run the NUT client; in this case, WingNUT.
WingNUT is provided with both 32-bit and 64-bit executables, as well as complete source code. It is written in AutoIt3, and developed under Windows 10 x64. It has not been tested on other versions of Windows, but is likely to run on versions 7, 8, and 8.1 as well.
|LICENSE||– WingNUT license|
|readme.txt||– this file|
|wingabt.bmp||– graphic for About dialog|
|wingnut.ini||– ini file|
|wingnut32.exe||– 32-bit executable|
|wingnut64.exe||– 64-bit executable|
Simply unzip wingnut.zip to your desired location. It
will create a WingNUT directory containing the above files.
Rename the executable of your choice (either
wingnut32.exe or wingnut64.exe) to wingnut.exe,
and optionally create any desired shortcuts. When executed,
WingNUT will create a wingnut.log file in the same
WingNUT does not create any Windows registry entries. The only exception is if the Start with Windows option is selected (see Configuration), it will then create a single registry entry to cause WingNUT to run when Windows is started.
All WingNUT settings are held in the wingnut.ini file, which
will be created if it does not exist. It is possible to edit the
wingnut.ini file manually, but it is much easier to use the
WingNUT Settings dialog.
A sample wingnut.ini file is included, and most of the default settings should be satisfactory. However, there are several settings which must be set by the user to match his NUT server, which are found on the Connections tab of the Settings dialog.
|UPS Name:||the name of your UPS, as configured in your NUT server.|
|UPS Host:||the IP address of the system running your NUT server.|
|UPS Port:||the port for which your NUT server is configured (default=3493).|
|UPS Username:||the username configured in your NUT server.|
|UPS Password:||the password configured in your NUT server.|
|Anonymous Connection:||connect anonymously (ignore username/password).|
UPS Name, UPS Host, and UPS Port are essential to establish a connection. If your NUT server is running on a NAS, you will need to SSH to the NAS and examine the appropriate configuration files, or consult your NAS documentation. If your NUT server is running on a (Winux) computer, then it is likely that you have configured that server, and are familiar with the settings; otherwise you will need to consult your system administrator.
If Anonymous Connection is checked, the username and password will be ignored, and the connection to your NUT server will be made anonymously. While operation is no different in this mode, it is not recommended for the following reason: When connected with credentials, the NUT server will track the connection, and should a power failure occur and the UPS become critical, the NUT server will wait a specified amount of time for your system to shut down, before it shuts itself down and causes the UPS to switch off, resulting in the loss of power to your system. However, if your system is connected anonymously, the NUT server will have no record of your connection, nor will it wait for your system to shut down before causing the UPS to switch off, quite possibly resulting in the loss of power to your system before it has cleanly shut down, thus completely negating the purpose of your UPS.
Credentials are stored in the wingnut.ini file, along with all other settings. Note that the password is not encrypted, but only masked!
NUT server software allows for a large number of UPS variables to be
monitored, only a limited subset of which will be made available by
any given manufacture and model of UPS. In addition to several
static data, WingNUT provides six graphic meters to monitor dynamic
data, and it maintains a list of the twelve most common dynamic
variables from which to choose. If your UPS provides less than
six of those variables, only the ones actually available will be
displayed by a meter. But if your UPS provides more than six,
the six chosen for display will be the first available six found in
WingNUT's list of twelve. The Meters tab allows the user
to re-order that list, to establish the order in which variables will
be searched for and applied to meters.
|Poll Frequency:||the time in seconds between polling of the UPS for status (default=10).|
|Alert Poll Frequency:||the time in seconds between polls, when an alert condition exits (default=5). Must be less than or equal to Poll Frequency.|
|Percent Charge Shutdown:||the percentage of remaining battery charge at which the system will be shut down (default=20). Set to zero to disable. This is a soft shutdown, which may be aborted by the user.|
|Remaining Runtime Shutdown:||the remaining available runtime in minutes at which the system will be shut down (default=3). Set to zero to disable. This is a soft shutdown, which may be aborted by the user.|
|Dead Time Poll Count:||the number of unanswered polls before the UPS is marked as dead (default=3).|
|Host Sync Poll Count:||the number of polls while a critical condition exists, before the system is forcibly shut down (default=2).|
|Final Delay:||the time in seconds between issuing the shutdown warning, and commencing the shutdown (default=5). Must be kept short.|
|Lost UPS Comms on Low Battery Shutdown:||If checked, the system will be forcibly shut down should the UPS be marked dead while the battery is low (default=checked).|
|Simulate Shutdown:||If checked, WingNUT will not actually shut down the system, but will simply notify the user that it would otherwise have been shut down (default=checked). This setting is originally checked while the user configures WingNUT, and should be unchecked once he is satisfied as to operation.|
WingNUT will poll the UPS every Poll Frequency seconds, or
more frequently (Alert Poll Frequency seconds) when an alert
UPS Not Connected (when previous connection is lost)
UPS Not On Line (on Mains)
UPS On Battery
UPS Battery Low
UPS Battery Requires Replacement
or when a poll goes unanswered. In the latter case, the UPS data is considered stale. If Dead Time Poll Count consecutive polls go unanswered, the UPS is considered dead. If this happens while the UPS was last known to be on battery, it is assumed to have gone to a low battery condition, and is critical. If Lost UPS Comms on Low Battery Shutdown is checked, the system will be forcibly shut down, otherwise it will begin a soft shutdown, which the user may abort.
When the UPS is on battery, and signals that the battery has become low, the condition is critical. WingNUT will wait Host Sync Poll Count polls to allow the NUT server to signal FSD (forced shut down), after which delay it will forcibly shut down the system if no FSD is received. The reason for Host Sync delay is to avoid a race condition, as per the NUT documentation.
If FSD is signaled by the NUT server at any time, the system will be immediately and forcibly shut down. This normally happens when a UPS which is on battery, reaches a critical condition, i.e. when battery charge reaches a critical point defined by the UPS, or when remaining runtime reaches a critical point defined by the UPS. When either of these conditions occur, the UPS battery is nearly depleted, and there is very little time left for the NUT server to signal FSD, wait for the client systems to cleanly shut down, and then for the NUT server to cleanly shut down and power off the UPS.
Because of this, WingNUT provides Percent Charge Shutdown and Remaining Runtime Shutdown settings, which the user may configure at slightly higher levels than those preset in the UPS, to allow sufficient time to save his work before the system shuts down, and to ensure that there is sufficient time for the system to shut down cleanly before power is lost.
|Start with Windows:||If checked (recommended), WingNUT will start with Windows.|
|Start Minimized:||If checked, WingNUT will start minimized.|
|Minimize to Tray:||If checked, WingNUT will minimize to the system tray.|
|Animate Icon:||If checked, WingNUT's icon will animate during each poll.|
Once WingNUT has been configured for your system, it is recommended that it be set to start with Windows, to ensure that the system is protected. The user may also wish to have WingNUT start in a minimized state, and to minimize to the system tray, to use the minimum amount of screen real estate.
The WingNUT icon (either on the main window, or in the system tray) portrays a UPS battery, and is normally green, but changes to red when an alert condition exists. During each poll, the icon will animate slightly by showing a yellow arc between the positive and negative terminals, to indicate when an update takes place. The animation may be disabled, if it is found to be distracting.
|1.0.1259||2019-11-29||Add executable's full path to wingnut.ini, wingnut.log, readme.txt, and license file, due when Start with Windows, was using Windows directory.|
|1.0.1256||2019-11-27||First public release.|
is available at
The author may be contacted at <>.
is distributed under the MIT license:
Copyright (c) 2019 qwerky
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.