Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EATON HID: add missing usages and paths (addon) #2660

Open
wants to merge 147 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
52ccc91
EATON HID: add missing usages and paths
arnaudquette-eaton Sep 23, 2024
7d1082c
EATON HID: completion on examples
arnaudquette-eaton Sep 23, 2024
e5463b7
first trying to add values
masterwishx Sep 23, 2024
57604b2
some typo fix
masterwishx Sep 24, 2024
97603cd
some of the fixes
masterwishx Sep 24, 2024
4dbd3ab
fix typo in comments
masterwishx Sep 24, 2024
408d5fd
add 'eco_pegasus_yes_no_info' func to uotlet.2.ecocontrol
masterwishx Sep 24, 2024
4a04f3b
Merge branch 'master' into work/2495
jimklimov Sep 24, 2024
e7145d7
eaton_outlet_protection_status_info + outlet_eco_yes_no_info fix
masterwishx Sep 24, 2024
3028e77
outlet_eco_yes_no_info move to mge-xml.c
masterwishx Sep 24, 2024
f8583b1
intoduce input.eco.switchable
masterwishx Sep 24, 2024
878c41b
added `info_lkp_t outlet_eco_yes_no_info` and `valtab_t outlet_eco_y…
masterwishx Sep 24, 2024
dbc8a32
try to fix definition of `outlet_eco_yes_no_info[] error`
masterwishx Sep 24, 2024
e3ad8b4
remove `*outlet_eco_yes_no_info` from mgr-hid.c
masterwishx Sep 24, 2024
50ddcb9
outlet.1.ecocontrol added to mge-xml to fix undefined
masterwishx Sep 24, 2024
e84dcc0
outlet_eco_yes_no_info defined in upshid-ups.h
masterwishx Sep 24, 2024
ca26f21
remove `outlet_eco_yes_no_info[]` from powerp-bin.c
masterwishx Sep 24, 2024
af90cc4
remove also from mge-xml.c
masterwishx Sep 24, 2024
a9865c0
remove typo space
masterwishx Sep 24, 2024
0159aa3
move `info_lkp_t outlet_eco_yes_no_info[]` to mge-hid.c
masterwishx Sep 25, 2024
ef37e06
added `info_lkp_t eaton_input_mode_info[]` for input.eco.switchable
masterwishx Sep 25, 2024
b79dd34
adding `input.eco.switchable,outlet.n.ecocontrol` to cmdvartab and /d…
masterwishx Sep 25, 2024
1bf083a
comment on ESS mode
masterwishx Sep 25, 2024
f8915f1
change to `switch (0-2)` for input.eco.switchable in nut-names.txt
masterwishx Sep 25, 2024
eda403f
`outlet.1.switch.status` rename back to `outlet.1.status`
masterwishx Sep 25, 2024
6e63a97
`outlet.n.status` back and new one move to intro `outlet.1.protect.s…
masterwishx Sep 25, 2024
02f74fb
change outlet.2 ... Outlet.[1] to Outlet.[3]
masterwishx Sep 25, 2024
0fb27ae
Fix typo in "Outlet [P] -> [p]rotection status"
masterwishx Sep 25, 2024
c89b245
add eco_mode info
masterwishx Sep 30, 2024
f1c2135
fix info_lkp_t eco_mode_info[]
masterwishx Sep 30, 2024
9cebd2e
fix typo
masterwishx Sep 30, 2024
c839e57
define info_lkp_t eco_mode_info[] in usbhid-ups.h
masterwishx Sep 30, 2024
74a3ed2
delete typo space
masterwishx Sep 30, 2024
b2271d0
eco_mode_info[] back 3 values + UPS.PowerConverter.Input.[5].PresentS…
masterwishx Oct 1, 2024
c457a18
fix typo ups_status
masterwishx Oct 1, 2024
7b3a1d0
info_lkp_t eaton_input_mode_info[] format spaces
masterwishx Oct 1, 2024
5ac8c4b
change ecomode to high-efficiency in status_info
masterwishx Oct 1, 2024
6660f3b
add ecomode commands
masterwishx Oct 1, 2024
3c4e96d
Merge branch 'master' into work/2495
masterwishx Oct 2, 2024
85919bc
Merge branch 'master' into work/2495
jimklimov Oct 2, 2024
88000b8
add bypass commands for test
masterwishx Oct 3, 2024
fbce60a
eaton_input_bypass_mode_info[] added
masterwishx Oct 3, 2024
acb1182
spaces typo fixes
masterwishx Oct 3, 2024
799c1f8
rename to `bypassauto` in info_lkp_t eaton_input_bypass_mode_info[]
masterwishx Oct 3, 2024
06f0f25
change he to ecomode
masterwishx Oct 4, 2024
633c0b7
change back to ecomode
masterwishx Oct 4, 2024
3a4a150
input.transfer.forced.enabled added + input.bypass.switch.on/off for …
masterwishx Oct 7, 2024
65ae02e
remove nfo_lkp_t eaton_input_transfer_on_off_info as eaton_enable_dis…
masterwishx Oct 7, 2024
9a83044
comment added for ...forced
masterwishx Oct 7, 2024
19e4405
rename to ECO(HE) mode! fix comments
masterwishx Oct 9, 2024
517bcf0
add values to cmdvartab + change to bypass.sart/stop instead bypass.o…
masterwishx Oct 9, 2024
a2ecd22
added values to nut-names
masterwishx Oct 9, 2024
b0d0b30
input.bypass.switch.off up to 12 becose return 11 bytes
masterwishx Oct 10, 2024
59c4bc7
docs/nut.dict: update for changes in docs/nut-names.txt [#2495, #2637]
jimklimov Oct 11, 2024
11e6f72
clients/status.h: add an entry for ECO status [#2367]
jimklimov Oct 11, 2024
1746ec9
upsmon (sources, docs, config samples, C++ nutconf support): add trac…
jimklimov Oct 11, 2024
816074b
scripts/python/app/NUT-Monitor-*: add reporting for ECO status [#2367]
jimklimov Oct 11, 2024
f76af4d
NEWS.adoc: announce ECO mode concept support [issue #2495, PR #2637]
jimklimov Oct 11, 2024
cb2bb25
add eaton_check_bypass_range() for check bypass limit
masterwishx Oct 11, 2024
3362bd6
Merge branch 'work/2495' of https://github.com/masterwishx/nut into w…
masterwishx Oct 11, 2024
53557f2
fix for eaton_check_bypass_range()
masterwishx Oct 11, 2024
9260798
fix eaton_check_bypass_range()
masterwishx Oct 11, 2024
30ce796
rename to eaton_input_bypass_check_range()
masterwishx Oct 11, 2024
465ae24
disable eco alarm
masterwishx Oct 11, 2024
7390b6b
fix2 eaton_input_bypass_check_range()
masterwishx Oct 11, 2024
dcd1358
fix3 eaton_input_bypass_check_range()
masterwishx Oct 11, 2024
a5a51c0
add define values
masterwishx Oct 11, 2024
cb6c601
fix3 eaton_input_bypass_check_range()
masterwishx Oct 11, 2024
3669d38
function to up for definition
masterwishx Oct 11, 2024
8a938bb
fix for upsdebugx
masterwishx Oct 11, 2024
ff208db
fix2 debugx
masterwishx Oct 11, 2024
5c3dbc7
more details for debugx + move declaration up
masterwishx Oct 11, 2024
fa611ec
fix typo
masterwishx Oct 11, 2024
df37871
fix again upsdebugx
masterwishx Oct 11, 2024
c96069e
move declaration uppper
masterwishx Oct 11, 2024
34c3b3f
add frequency range check to eaton_input_bypass_check_range()
masterwishx Oct 11, 2024
0598e24
Merge branch 'master' into work/2495
masterwishx Oct 11, 2024
575ac63
add freq to function comment
masterwishx Oct 11, 2024
26ad39a
add frequency default in case no value
masterwishx Oct 12, 2024
02f8f87
change comments sign
masterwishx Oct 12, 2024
c65be09
add function for check eco range
masterwishx Oct 12, 2024
fd6e8e5
check freq limit in separate block in eco mode
masterwishx Oct 12, 2024
5937a42
check freq limit in separate block for eaton_input_bypass_check_range()
masterwishx Oct 12, 2024
deb59b6
fix upsdebugx
masterwishx Oct 12, 2024
cacc516
add comment
masterwishx Oct 12, 2024
54e02ad
change eco/bypass values to avoid `ERR TOO-LONG`
masterwishx Oct 13, 2024
392d7cc
change nut-names.txt also
masterwishx Oct 13, 2024
7339c66
`ecocontrol` change description
masterwishx Oct 13, 2024
d119492
change some values for bypass/eco
masterwishx Oct 14, 2024
e0056e9
change to `on` in nut-names.txt also
masterwishx Oct 14, 2024
84fe0ca
add `battery.charger.type`
masterwishx Oct 16, 2024
d9eaa4b
some try for add battery.charger.status + battery.charger.mode
masterwishx Oct 16, 2024
eac8c5c
fix ABM Table
masterwishx Oct 16, 2024
384d123
add eaton_abm_status_fun()
masterwishx Oct 16, 2024
4dcdc21
added battery.charger.abm.status for UPS.BatterySystem.Charger.Status
masterwishx Oct 16, 2024
1909210
add eaton_abm_chrg_dischrg_status_fun()
masterwishx Oct 16, 2024
9eb4ec2
put battery.charger.status + battery.charger.mode and battery.charger…
masterwishx Oct 16, 2024
9d5f35f
same for eaton_abm_chrg_dischrg_info()
masterwishx Oct 16, 2024
c52c9a2
battery.charger.type.status added
masterwishx Oct 16, 2024
e435f4d
fix eaton_abm_enabled_fun()
masterwishx Oct 16, 2024
a41b41f
fix declaration
masterwishx Oct 16, 2024
8451971
int to double
masterwishx Oct 16, 2024
dc45ba2
try simple eaton_abm_enabled_fun()
masterwishx Oct 16, 2024
9f38882
add back missing advanced_battery_monitoring=value;
masterwishx Oct 16, 2024
2e0f617
change all status same as original was + add ABM_ENABLED_TYPE
masterwishx Oct 18, 2024
8fa6459
change back to `if (dstate_getinfo("battery.charger.type"))`
masterwishx Oct 18, 2024
112b602
change severity to 1 instead 2
masterwishx Oct 18, 2024
4b1e925
change if also in eaton_abm_enabled_fun()
masterwishx Oct 18, 2024
a1fc115
add eaton_abm_charger_type_fun()
masterwishx Oct 18, 2024
e2d560d
add eaton_abm_charger_type_fun()
masterwishx Oct 18, 2024
77daa28
typo fix
masterwishx Oct 18, 2024
92e36d1
add eaton_abm_enabled_type_info()
masterwishx Oct 18, 2024
6bf6146
fixes
masterwishx Oct 18, 2024
541a6cd
typo fix
masterwishx Oct 18, 2024
98b67f7
fix again
masterwishx Oct 18, 2024
170c9c1
add debug for set advanced_battery_type
masterwishx Oct 18, 2024
8fc6f5a
comment change
masterwishx Oct 19, 2024
773541b
change debug message
masterwishx Oct 19, 2024
f782c8a
set `advanced_battery_monitoring to disable` in case of `advanced_bat…
masterwishx Oct 19, 2024
e0ecf8a
add comment
masterwishx Oct 19, 2024
d8a248d
add `advanced_battery_mode` flag for not overwrite `advanced_battery_…
masterwishx Oct 19, 2024
3874448
set `ABM_UNKNOWN` for test ups.status
masterwishx Oct 19, 2024
22c6ae9
change back to `ABM_DISABLED`
masterwishx Oct 20, 2024
86e07f4
add comment
masterwishx Oct 20, 2024
0ad2154
change back to ABM_UNKNOWN and use only BOOL chrg/dschrg (eaton_charg…
masterwishx Oct 21, 2024
00d5a9e
Merge remote-tracking branch 'upstream/master' as of 2024-10-21 into …
jimklimov Oct 21, 2024
272ec9b
Merge branch 'work/2495' as of 2024-10-21 into 'work/246-add-battery.…
jimklimov Oct 21, 2024
1f097f9
add possibly fix for 9E not chaging status when battery.charge < 100%…
masterwishx Oct 22, 2024
cd429f7
Fix Typo
masterwishx Oct 22, 2024
79af28f
Fix again
masterwishx Oct 22, 2024
b92a121
fix if
masterwishx Oct 22, 2024
01db5ab
fix again
masterwishx Oct 22, 2024
ec55834
Merge branch 'master' into work/246-add-battery.charger.status+mode
masterwishx Oct 22, 2024
6c7f664
Merge branch 'master' into work/246-add-battery.charger.status+mode
jimklimov Oct 22, 2024
8c88cbc
remove dischrg in ups.status when on battery for 9E Model
masterwishx Oct 22, 2024
37b78b2
make code looks better
masterwishx Oct 23, 2024
f7555fd
update and clean code for statuses for easy to read and work
masterwishx Oct 23, 2024
1c6c0e1
typo in commment
masterwishx Oct 23, 2024
b2f14e6
Merge branch 'master' into work/246-add-battery.charger.status+mode
masterwishx Oct 23, 2024
512b10b
add info for Note ABM
masterwishx Oct 23, 2024
9fc9606
make abm charger tables better look
masterwishx Oct 27, 2024
a4c7f1c
typo in comment
masterwishx Oct 27, 2024
5a3ce27
more clear comments for charger modes
masterwishx Oct 27, 2024
08cbba1
remove comment
masterwishx Oct 27, 2024
ebc0ff4
added comment
masterwishx Oct 27, 2024
726d25f
add UPS.BatterySystem.Charger.ChargerType to abm table
masterwishx Oct 28, 2024
274daf2
remove unused eaton_abm_charger_type_fun()
masterwishx Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,19 @@ https://github.com/networkupstools/nut/milestone/11
approach seems to have good potential to expand into covering more devices
and perhaps platforms. [#2430]

- Introduced `ECO` status concept for "ECO mode" (or "High Efficiency" mode,
or "Energy Saver System"...) as named and defined by hardware vendors.
One common aspect is that this is a balance of electrical efficiency vs.
robust outage protection (which may be overkill for IT equipment whose
PSU can survive several milliseconds on capacitors alone) which can be
selected at run-time. Previously such choice was made at the time of
purchase, with the UPSes only supporting some one protection strategy.
[issue #2495, PR #2637]
* Updated documentation, end-user clients (CGI, NUT-Monitor UI);
* Updated `upsmon` client with ability to report entering and exiting
the ECO mode if reported by the driver;
* Initial implementation for Eaton devices with `usbhid-ups` driver.

- Introduced handling for the `ALARM` status, which already existed as a
common denominator for devices seen with active `ups.alarm` variables.
UPS devices in an `ALARM` status are generally considered volatile and
Expand All @@ -218,7 +231,7 @@ https://github.com/networkupstools/nut/milestone/11
* Updated `upsmon` client with ability to report entering and exiting
the ALARM status if reported by the driver;
* Updated `upsmon` client with setting to toggle whether an `ALARM`
status can prompt the UPS to become critical in certain situations;
status can prompt the UPS to become critical in certain situations.

- upsmon:
* it was realized that the `POWERDOWNFLAG` must be explicitly set in the
Expand Down
1 change: 1 addition & 0 deletions clients/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ static struct {
{ "BOOST", "VOLTAGE BOOST", 1 },
{ "CAL", "CALIBRATION", 1 },
{ "BYPASS", "BYPASS", 2 },
{ "ECO", "ECO", 1 },
{ "ALARM", "ALARM", 2 },
{ NULL, NULL, 0 }
};
Expand Down
50 changes: 49 additions & 1 deletion clients/upsmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ static int flag_isset(int num, int flag)

static int try_restore_pollfreq(utype_t *ups) {
/* Use relaxed pollfreq if we are not in a hardware
* power state that is prone to UPS disappearance */
* power state that is prone to UPS disappearance.
* Note: ECO mode not considered easily fatal here!
*/
if (!flag_isset(ups->status, ST_ONBATT | ST_OFF | ST_BYPASS | ST_ALARM | ST_CAL)) {
sleepval = pollfreq;
return 1;
Expand Down Expand Up @@ -716,6 +718,42 @@ static void ups_is_notbypass(utype_t *ups)
}
}

static void ups_is_eco(utype_t *ups)
{
if (flag_isset(ups->status, ST_ECO)) { /* no change */
upsdebugx(4, "%s: %s (no change)", __func__, ups->sys);
return;
}

/* For example, Eaton defines ECO (High Efficiency) mode
* as a sort of hardware-monitored bypass with switch-over
* under 10ms into Online mode in case of troubles, instead
* of always running in dual-conversion mode (wasteful, safe).
* No reason to monitor it closely on NUT side.
*/
/*sleepval = pollfreqalert;*/ /* bump up polling frequency */

ups->ecostate = 1; /* if we lose comms, consider it AWOL */

upsdebugx(3, "%s: %s (first time)", __func__, ups->sys);

/* must have changed from !ECO to ECO, so notify */

do_notify(ups, NOTIFY_ECO);
setflag(&ups->status, ST_ECO);
}

static void ups_is_noteco(utype_t *ups)
{
/* Called when ECO is NOT among known states */
ups->ecostate = 0;
if (flag_isset(ups->status, ST_ECO)) { /* actual change */
do_notify(ups, NOTIFY_NOTECO);
clearflag(&ups->status, ST_ECO);
try_restore_pollfreq(ups);
}
}

static void ups_is_alarm(utype_t *ups)
{
if (flag_isset(ups->status, ST_ALARM)) { /* no change */
Expand Down Expand Up @@ -1125,6 +1163,7 @@ static int is_ups_critical(utype_t *ups)
time(&now);

if (ups->commstate == 0) {
/* Note: ECO mode not considered easily fatal here */
if (flag_isset(ups->status, ST_CAL)) {
upslogx(LOG_WARNING,
"UPS [%s] was last known to be calibrating "
Expand Down Expand Up @@ -1350,6 +1389,7 @@ static void recalc(void)
* whether this is really the best thing to do is undecided */

/* crit = (FSD) || (OB & LB) > HOSTSYNC seconds || (CAL || BYPASS || ALARM || OFF) && nocomms */
/* Note: ECO mode not considered easily fatal here */
if (is_ups_critical(ups))
upsdebugx(1, "Critical UPS: %s", ups->sys);
else
Expand Down Expand Up @@ -1456,6 +1496,10 @@ static void drop_connection(utype_t *ups)
if(flag_isset(ups->status, ST_CAL))
upsdebugx(2, "Disconnected UPS [%s] was last seen in status CAL, this UPS might be considered critical later.", ups->sys);

/* Note: ECO mode not considered easily fatal here */
if(ups->ecostate == 1 || flag_isset(ups->status, ST_ECO))
upsdebugx(2, "Disconnected UPS [%s] was last seen in status ECO.", ups->sys);

ups->commstate = 0;

/* forget poll-failure logging throttling */
Expand Down Expand Up @@ -2412,6 +2456,8 @@ static void parse_status(utype_t *ups, char *status)
ups_is_notoff(ups);
if (!strstr(status, "BYPASS"))
ups_is_notbypass(ups);
if (!strstr(status, "ECO"))
ups_is_noteco(ups);
if (!strstr(status, "ALARM"))
ups_is_notalarm(ups);

Expand Down Expand Up @@ -2439,6 +2485,8 @@ static void parse_status(utype_t *ups, char *status)
ups_is_off(ups);
if (!strcasecmp(statword, "BYPASS"))
ups_is_bypass(ups);
if (!strcasecmp(statword, "ECO"))
ups_is_eco(ups);
if (!strcasecmp(statword, "ALARM"))
ups_is_alarm(ups);
/* do it last to override any possible OL */
Expand Down
15 changes: 11 additions & 4 deletions clients/upsmon.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
#define ST_CAL (1 << 7) /* UPS calibration in progress (CAL) */
#define ST_OFF (1 << 8) /* UPS is administratively off or asleep (OFF) */
#define ST_BYPASS (1 << 9) /* UPS is on bypass so not protecting */
#define ST_ALARM (1 << 10) /* UPS has at least one active alarm */
#define ST_ECO (1 << 10) /* UPS is in ECO (High Efficiency) mode or similar tweak, e.g. Energy Saver System mode */
#define ST_ALARM (1 << 11) /* UPS has at least one active alarm */

/* required contents of flag file */
#define SDMAGIC "upsmon-shutdown-file"
Expand Down Expand Up @@ -70,6 +71,8 @@ typedef struct {
/* be delayed vs. seeing OFF state */
int bypassstate; /* fire on a 0->1 transition; */
/* delays not implemented now */
int ecostate; /* fire on a 0->1 transition; */
/* delays not implemented now */
int alarmstate; /* fire on a 0->1 transition; */
/* delays not implemented now */

Expand All @@ -96,7 +99,7 @@ typedef struct {
#define NOTIFY_ONBATT 1 /* UPS went on battery */
#define NOTIFY_LOWBATT 2 /* UPS went to low battery */
#define NOTIFY_FSD 3 /* Primary upsmon set FSD flag */
#define NOTIFY_COMMOK 4 /* Communication established */
#define NOTIFY_COMMOK 4 /* Communication established */
#define NOTIFY_COMMBAD 5 /* Communication lost */
#define NOTIFY_SHUTDOWN 6 /* System shutdown in progress */
#define NOTIFY_REPLBATT 7 /* UPS battery needs to be replaced */
Expand All @@ -108,8 +111,10 @@ typedef struct {
#define NOTIFY_NOTOFF 13 /* UPS is not anymore administratively OFF or asleep*/
#define NOTIFY_BYPASS 14 /* UPS is administratively on bypass */
#define NOTIFY_NOTBYPASS 15 /* UPS is not anymore administratively on bypass */
#define NOTIFY_ALARM 16 /* UPS has at least one active alarm */
#define NOTIFY_NOTALARM 17 /* UPS has no active alarms */
#define NOTIFY_ECO 16 /* UPS is in ECO mode or similar */
#define NOTIFY_NOTECO 17 /* UPS is not anymore in ECO mode or similar */
#define NOTIFY_ALARM 18 /* UPS has at least one active alarm */
#define NOTIFY_NOTALARM 19 /* UPS has no active alarms */

#define NOTIFY_SUSPEND_STARTING 30 /* OS is entering sleep/suspend/hibernate slumber mode, and we know it */
#define NOTIFY_SUSPEND_FINISHED 31 /* OS just finished sleep/suspend/hibernate slumber mode, and we know it */
Expand Down Expand Up @@ -158,6 +163,8 @@ static struct {
{ NOTIFY_NOTOFF, "NOTOFF", NULL, "UPS %s: no longer administratively OFF or asleep", NOTIFY_DEFAULT },
{ NOTIFY_BYPASS, "BYPASS", NULL, "UPS %s: on bypass (powered, not protecting)", NOTIFY_DEFAULT },
{ NOTIFY_NOTBYPASS,"NOTBYPASS",NULL, "UPS %s: no longer on bypass", NOTIFY_DEFAULT },
{ NOTIFY_ECO, "ECO", NULL, "UPS %s: in ECO mode (as defined by vendor)", NOTIFY_DEFAULT },
{ NOTIFY_NOTECO, "NOTECO", NULL, "UPS %s: no longer in ECO mode", NOTIFY_DEFAULT },
{ NOTIFY_ALARM, "ALARM", NULL, "UPS %s is in an alarm state (has active alarms)", NOTIFY_DEFAULT },
{ NOTIFY_NOTALARM, "NOTALARM", NULL, "UPS %s is no longer in an alarm state (no active alarms)", NOTIFY_DEFAULT },

Expand Down
4 changes: 4 additions & 0 deletions common/nutconf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,10 @@ UpsmonConfiguration::NotifyType UpsmonConfiguration::NotifyTypeFromString(const
return NOTIFY_BYPASS;
else if(str=="NOTBYPASS")
return NOTIFY_NOTBYPASS;
else if(str=="ECO")
return NOTIFY_ECO;
else if(str=="NOTECO")
return NOTIFY_NOTECO;
else if(str=="ALARM")
return NOTIFY_ALARM;
else if(str=="NOTALARM")
Expand Down
2 changes: 2 additions & 0 deletions common/nutwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ const NotifyFlagsStrings::TypeStrings NotifyFlagsStrings::type_str = {
"NOTOFF", // NOTIFY_NOTOFF
"BYPASS", // NOTIFY_BYPASS
"NOTBYPASS", // NOTIFY_NOTBYPASS
"ECO\t", // NOTIFY_ECO (including padding)
"NOTECO", // NOTIFY_NOTECO
"ALARM", // NOTIFY_ALARM
"NOTALARM", // NOTIFY_NOTALARM
"SUSPEND_STARTING", // NOTIFY_SUSPEND_STARTING
Expand Down
4 changes: 4 additions & 0 deletions conf/upsmon.conf.sample.in
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ POWERDOWNFLAG "@POWERDOWNFLAG@"
# NOTIFYMSG NOTOFF "UPS %s: no longer administratively OFF or asleep"
# NOTIFYMSG BYPASS "UPS %s: on bypass (powered, not protecting)"
# NOTIFYMSG NOTBYPASS "UPS %s: no longer on bypass"
# NOTIFYMSG ECO "UPS %s: in ECO mode (as defined by vendor)"
# NOTIFYMSG NOTECO "UPS %s: no longer in ECO mode (as defined by vendor)"
# NOTIFYMSG ALARM "UPS %s is in an alarm state (has active alarms)"
# NOTIFYMSG NOTALARM "UPS %s is no longer in an alarm state (no active alarms)"
#
Expand Down Expand Up @@ -381,6 +383,8 @@ POWERDOWNFLAG "@POWERDOWNFLAG@"
# NOTIFYFLAG NOTOFF SYSLOG+WALL
# NOTIFYFLAG BYPASS SYSLOG+WALL
# NOTIFYFLAG NOTBYPASS SYSLOG+WALL
# NOTIFYFLAG ECO SYSLOG+WALL
# NOTIFYFLAG NOTECO SYSLOG+WALL
# NOTIFYFLAG ALARM SYSLOG+WALL
# NOTIFYFLAG NOTALARM SYSLOG+WALL
#
Expand Down
13 changes: 13 additions & 0 deletions data/cmdvartab
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ VARDESC input.transfer.low.min "smallest settable low voltage transfer point (V)
VARDESC input.transfer.low.max "greatest settable low voltage transfer point (V)"
VARDESC input.transfer.high.min "smallest settable high voltage transfer point (V)"
VARDESC input.transfer.high.max "greatest settable high voltage transfer point (V)"
VARDESC input.eco.switchable "Input High Efficiency (aka ECO) mode switch"
VARDESC input.transfer.forced "Input forced transfer modes enable/disable"
VARDESC input.bypass.switch.on "Put the UPS in bypass mode"
VARDESC input.bypass.switch.off "Take the UPS out of bypass mode"
VARDESC input.sensitivity "Input power sensitivity"
VARDESC input.quality "Input power quality"
VARDESC input.current "Input current (A)"
Expand Down Expand Up @@ -161,6 +165,7 @@ VARDESC outlet.id "Outlet system identifier"
VARDESC outlet.desc "Outlet description"
VARDESC outlet.switch "Outlet switch control"
VARDESC outlet.status "Outlet switch status"
VARDESC outlet.protect.status "Outlet protection status"
VARDESC outlet.switchable "Outlet switch ability"
VARDESC outlet.autoswitch.charge.low "Remaining battery level to power off this outlet (percent)"
VARDESC outlet.delay.shutdown "Interval to wait before shutting down this outlet (seconds)"
Expand All @@ -169,15 +174,19 @@ VARDESC outlet.1.id "Outlet system identifier"
VARDESC outlet.1.desc "Outlet description"
VARDESC outlet.1.switch "Outlet switch control"
VARDESC outlet.1.status "Outlet switch status"
VARDESC outlet.1.protect.status "Outlet protection status"
VARDESC outlet.1.switchable "Outlet switch ability"
VARDESC outlet.1.ecocontrol "Master Outlet used to automatically power off the slave outlets"
VARDESC outlet.1.autoswitch.charge.low "Remaining battery level to power off this outlet (percent)"
VARDESC outlet.1.delay.shutdown "Interval to wait before shutting down this outlet (seconds)"
VARDESC outlet.1.delay.start "Interval to wait before restarting this outlet (seconds)"
VARDESC outlet.2.id "Outlet system identifier"
VARDESC outlet.2.desc "Outlet description"
VARDESC outlet.2.switch "Outlet switch control"
VARDESC outlet.2.status "Outlet switch status"
VARDESC outlet.2.protect.status "Outlet protection status"
VARDESC outlet.2.switchable "Outlet switch ability"
VARDESC outlet.2.ecocontrol "Master Outlet used to automatically power off the slave outlets"
VARDESC outlet.2.autoswitch.charge.low "Remaining battery level to power off this outlet (percent)"
VARDESC outlet.2.delay.shutdown "Interval to wait before shutting down this outlet (seconds)"
VARDESC outlet.2.delay.start "Interval to wait before restarting this outlet (seconds)"
Expand Down Expand Up @@ -227,6 +236,10 @@ CMDDESC calibrate.start "Start run time calibration"
CMDDESC calibrate.stop "Stop run time calibration"
CMDDESC bypass.start "Put the UPS in bypass mode"
CMDDESC bypass.stop "Take the UPS out of bypass mode"
CMDDESC ecomode.enable "Put UPS in High Efficiency (aka ECO) mode"
CMDDESC ecomode.disable "Take the UPS out of High Efficiency (aka ECO) mode"
CMDDESC essmode.enable "Put UPS in Energy Saver System (aka ESS) mode"
CMDDESC essmode.disable "Take the UPS out of Energy Saver System (aka ESS) mode"
CMDDESC reset.input.minmax "Reset minimum and maximum input voltage status"
CMDDESC reset.watchdog "Reset watchdog timer"
CMDDESC beeper.on "Obsolete (use beeper.enable)"
Expand Down
5 changes: 5 additions & 0 deletions docs/man/upsmon.conf.txt
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ BYPASS;; UPS on bypass (powered, not protecting)

NOTBYPASS;; UPS no longer on bypass

ECO;; UPS in ECO or similar mode (as defined and named by vendor);
for more details see linkman:upsmon[8].

NOTECO;; UPS no longer in ECO mode (see above)

ALARM;; UPS is in an alarm state (has active alarms)

NOTALARM;; UPS is no longer in an alarm state (no active alarms)
Expand Down
22 changes: 18 additions & 4 deletions docs/man/upsmon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,20 @@ UPS on bypass (powered, not protecting).
*NOTBYPASS*::
UPS no longer on bypass.

*ECO*::
UPS in ECO or similar mode (as defined and named by vendor); other
names include High Efficiency mode and Energy Saver System.
+
For example, Eaton docs define High Efficiency mode as a sort of
hardware-monitored bypass with switch-over under 10ms into Online
mode in case of troubles (so what was known as Line-Interactive
in the older days), which can be *chosen* instead of always running
in a dual-conversion mode (safer, but more wasteful and with a toll
on battery life). Older devices only implemented one or the other.

*NOTECO*::
UPS no longer in ECO mode (see above).

*ALARM*::
UPS is in an alarm state (has active alarms).

Expand Down Expand Up @@ -508,15 +522,15 @@ implementations throughout the various UPS drivers and generally anytime
that a "ups.alarm" variable is seen reported by the specific UPS driver.

Alarms can be acted upon by the user using the "ALARM" and "NOTALARM" notifiers,
which are reported by the "upsmon" when the "ALARM" status occurs or disappears.
which are reported by the `upsmon` when the "ALARM" status occurs or disappears.

As alarms raised by the UPS are usually severe in nature, the "upsmon" watches
As alarms raised by the UPS are usually severe in nature, the `upsmon` watches
a UPS in such a state more closely, bumping up the polling frequency as needed.

When connection loss occurs in such an alarm state, the "upsmon" will by default
When connection loss occurs in such an alarm state, the `upsmon` will by default
consider the volatile UPS as critical/dead and this may lead to false shutdowns
if the actual alarm was in fact mundane in nature (e.g. caused by a HE/ECO mode).
This can be changed by utilizing the "ALARMCRITICAL" setting within "upsmon.conf".
This can be changed by utilizing the `ALARMCRITICAL` setting within `upsmon.conf`.

RELOADING NUANCES
-----------------
Expand Down
15 changes: 15 additions & 0 deletions docs/nut-names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ input: Incoming line/power information
voltage transfer point (V) | 131
| input.transfer.high.max | greatest settable high
voltage transfer point (V) | 136
| input.eco.switchable | Input High Efficiency (aka ECO)
mode switch (0-2) | normal
| input.sensitivity | Input power sensitivity | H (high)
| input.quality | Input power quality (***
opaque) | FF
Expand Down Expand Up @@ -305,6 +307,10 @@ input: Incoming line/power information
point (percent of nominal Hz) | 5
| input.transfer.hysteresis | Threshold of switching protection modes,
voltage transfer point (V) | 10
| input.transfer.forced | Input forced transfer modes
(enabled or disabled) | enabled
| input.bypass.switch.on | Put the UPS in bypass mode | on
| input.bypass.switch.off | Take the UPS out of bypass mode | disabled
| input.load | Load on (ePDU) input (percent
of full) | 25
| input.realpower | Current sum value of all (ePDU)
Expand Down Expand Up @@ -693,11 +699,16 @@ of the user manual.
(on/off) | on
| outlet.n.status | Outlet switch status
(on/off) | on
| outlet.n.protect.status | Outlet protection status
(0-2) | protected
| outlet.n.alarm | Alarms for outlets and PDU,
published in ups.alarm | outlet 1 low
voltage warning
| outlet.n.switchable | Outlet switch ability
(yes/no) | yes
| outlet.n.ecocontrol | Master Outlet used to
automatically power off the
slave outlets | The outlet is not ECO controlled
| outlet.n.autoswitch.charge.low | Remaining battery level to
power off this outlet
(percent) | 80
Expand Down Expand Up @@ -862,6 +873,10 @@ Instant commands
| calibrate.stop | Stop runtime calibration
| bypass.start | Put the UPS in bypass mode
| bypass.stop | Take the UPS out of bypass mode
| ecomode.enable | Put UPS in High Efficiency (aka ECO) mode
| ecomode.disable | Take the UPS out of High Efficiency (aka ECO) mode
| essmode.enable | Put UPS in Energy Saver System (aka ESS) mode
| essmode.disable | Take the UPS out of Energy Saver System (aka ESS) mode
| reset.input.minmax | Reset minimum and maximum input voltage status
| reset.watchdog | Reset watchdog timer (forced reboot of load)
| beeper.enable | Enable UPS beeper/buzzer
Expand Down
Loading
Loading