gawindx / WinNUT-Client

This is a NUT windows client for monitoring your ups hooked up to your favorite linux server.
GNU General Public License v3.0
386 stars 70 forks source link

Fix gawindx/WinNUT-Client#100: Send LOGIN message during login #101

Closed dylan-kerr closed 2 years ago

dylan-kerr commented 2 years ago

I have implemented this as non-optional behaviour, though as mentioned in the issue you might prefer to make this configurable - let me know if so and I can make the change.

I have tested this on my machine against a server running https://github.com/networkupstools/nut/ and it worked mostly as I'd expect: setting the FSD flag on the server caused WinNUT to start a shutdown, and upsmon on the server waited for WinNUT to disconnect before shutting itself down. The only surprising behaviour was that the FSD shutdown follows the same timing options (grace period, etc.) as a normal shutdown. I originally had WinNUT configured to show the shutdown GUI with a 5 minute timer as soon as the UPS goes onto battery, but this also causes a 5 minute delay during an FSD shutdown. For now I have changed my config to run an immediate shutdown and just decreased the battery/runtime thresholds, so I'm relying on beeping UPS to warn the user instead of the shutdown GUI!

dylan-kerr commented 2 years ago

Per https://github.com/gawindx/WinNUT-Client/issues/100#issuecomment-922504874, closing as this will be superseded by ongoing refactoring.