Skip to content

Modernize and introduce new statuses#10

Merged
jimklimov merged 10 commits intonetworkupstools:masterfrom
desertwitch:new-statuses
Mar 23, 2025
Merged

Modernize and introduce new statuses#10
jimklimov merged 10 commits intonetworkupstools:masterfrom
desertwitch:new-statuses

Conversation

@desertwitch
Copy link
Contributor

@desertwitch desertwitch commented Oct 21, 2024

This pull request addresses the issues #8 and #9, as well as a compiler warning.
The status handling was modernized to graphically visualize (including combinations of) these statuses:

#define ST_ONLINE      (1 << 0)	/* UPS is on line */
#define ST_ONBATT      (1 << 1)	/* UPS is on battery */
#define ST_LOWBATT     (1 << 2)	/* UPS is on low battery */
#define ST_FSD         (1 << 3)	/* UPS is shutting down */
#define ST_REPLBATT    (1 << 4)	/* UPS battery needs replacement */
#define ST_CAL         (1 << 5)	/* UPS is calibrating */
#define ST_OFF         (1 << 6)	/* UPS is (administratively) offline */
#define ST_BYPASS      (1 << 7)	/* UPS is on bypass */
#define ST_OVERLOAD    (1 << 8)	/* UPS is overloaded */
#define ST_TRIM        (1 << 9)	/* UPS is trimming */
#define ST_BOOST       (1 << 10)	/* UPS is boosting */
#define ST_ALARM       (1 << 11)	/* UPS has active alarm(s) */

The (graphical) visualization of the various statuses can be looked at here: wmnut-pr.pdf

More (not road-blocking) issues outside the scope of this PR have been discovered (and will be logged into "Issues") with further work possible for a prospective new version. This could include removal of unused legacy arguments and internal code remnants e.g. for previous beep/alert functions that are no longer in the codebase even before this PR (and upsmon being better equipped and integrated for handling notifications nowadays, when compared to 12 years ago). More importantly improvements to ensure more graceful client retrying/reconnections on staleness/connection loss not requiring widget restart.

fixes #8, fixes #9

@jimklimov jimklimov merged commit 2422df1 into networkupstools:master Mar 23, 2025
3 checks passed
jimklimov added a commit to jimklimov/wmnut that referenced this pull request Mar 25, 2025
jimklimov added a commit to jimklimov/wmnut that referenced this pull request Mar 25, 2025
jimklimov added a commit to jimklimov/wmnut that referenced this pull request Mar 28, 2025
jimklimov added a commit that referenced this pull request Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overload and non-parsed status processing is failing Add support for more UPS statuses

2 participants