Skip to content

Commit de286f6

Browse files
committed
data/cmdvartab, drivers/mge-hid.c, drivers/usbhid-ups.c, docs/nut-names.txt: move "ecomode" and "essmode" INSTCMDs into "experimental." namespace [#2708]
Signed-off-by: Jim Klimov <[email protected]>
1 parent f638728 commit de286f6

File tree

4 files changed

+41
-17
lines changed

4 files changed

+41
-17
lines changed

data/cmdvartab

+5-5
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,11 @@ CMDDESC calibrate.start "Start run time calibration"
258258
CMDDESC calibrate.stop "Stop run time calibration"
259259
CMDDESC bypass.start "Put the UPS in Bypass mode"
260260
CMDDESC bypass.stop "Take the UPS out of Bypass mode"
261-
CMDDESC ecomode.enable "Put UPS in High Efficiency (aka ECO) mode"
262-
CMDDESC ecomode.disable "Take the UPS out of High Efficiency (aka ECO) mode"
263-
CMDDESC ecomode.start.auto "Put UPS in Bypass mode then High Efficiency (aka ECO) mode"
264-
CMDDESC essmode.enable "Put UPS in Energy Saver System (aka ESS) mode"
265-
CMDDESC essmode.disable "Take the UPS out of Energy Saver System (aka ESS) mode"
261+
CMDDESC experimental.ecomode.enable "Put UPS in High Efficiency (aka ECO) mode"
262+
CMDDESC experimental.ecomode.disable "Take the UPS out of High Efficiency (aka ECO) mode"
263+
CMDDESC experimental.ecomode.start.auto "Put UPS in Bypass mode then High Efficiency (aka ECO) mode"
264+
CMDDESC experimental.essmode.enable "Put UPS in Energy Saver System (aka ESS) mode"
265+
CMDDESC experimental.essmode.disable "Take the UPS out of Energy Saver System (aka ESS) mode"
266266
CMDDESC reset.input.minmax "Reset minimum and maximum input voltage status"
267267
CMDDESC reset.watchdog "Reset watchdog timer"
268268
CMDDESC beeper.on "Obsolete (use beeper.enable)"

docs/nut-names.txt

+26-5
Original file line numberDiff line numberDiff line change
@@ -1020,11 +1020,6 @@ Instant commands
10201020
| calibrate.stop | Stop runtime calibration
10211021
| bypass.start | Put the UPS in Bypass mode
10221022
| bypass.stop | Take the UPS out of Bypass mode
1023-
| ecomode.enable | Put UPS in High Efficiency (aka ECO) mode
1024-
| ecomode.disable | Take the UPS out of High Efficiency (aka ECO) mode
1025-
| ecomode.start.auto | Put UPS in Bypass mode then High Efficiency (aka ECO) mode
1026-
| essmode.enable | Put UPS in Energy Saver System (aka ESS) mode
1027-
| essmode.disable | Take the UPS out of Energy Saver System (aka ESS) mode
10281023
| reset.input.minmax | Reset minimum and maximum input voltage status
10291024
| reset.watchdog | Reset watchdog timer (forced reboot of load)
10301025
| beeper.enable | Enable UPS beeper/buzzer
@@ -1038,3 +1033,29 @@ Instant commands
10381033
| outlet.n.load.cycle | Power cycle the outlet immediately
10391034
| outlet.n.shutdown.return | Turn off the outlet and return when power is back
10401035
|========================================================================
1036+
1037+
Experimental instant commands
1038+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1039+
1040+
The following commands were added to test feature support, but are not expected
1041+
to last as part of NUT standard protocol in the long run.
1042+
1043+
.Vendor-dependent "ECO" modes
1044+
[options="header"]
1045+
|========================================================================
1046+
| Name | Driver/Devices | Description
1047+
| experimental.ecomode.enable | usbhid-ups => mge-hid (Eaton/MGE)
1048+
| Put UPS in High Efficiency (aka ECO) mode
1049+
| experimental.ecomode.disable | usbhid-ups => mge-hid (Eaton/MGE)
1050+
| Take the UPS out of High Efficiency (aka ECO) mode
1051+
| experimental.ecomode.start.auto | usbhid-ups => mge-hid (Eaton/MGE)
1052+
| Put UPS in Bypass mode then High Efficiency (aka ECO) mode
1053+
| experimental.essmode.enable | usbhid-ups => mge-hid (Eaton/MGE)
1054+
| Put UPS in Energy Saver System (aka ESS) mode
1055+
| experimental.essmode.disable | usbhid-ups => mge-hid (Eaton/MGE)
1056+
| Take the UPS out of Energy Saver System (aka ESS) mode
1057+
|========================================================================
1058+
1059+
Currently the commands above are present in one subdriver and are specific
1060+
to the vendor's proposed power state machine. The plan is to generalize the
1061+
concept with vendor specifics, similarly to `experimental.ups.mode.buzzwords`.

drivers/mge-hid.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -2133,12 +2133,12 @@ static hid_info_t mge_hid2nut[] =
21332133
{ "outlet.2.load.on", 0, 0, "UPS.OutletSystem.Outlet.[3].DelayBeforeStartup", NULL, "0", HU_TYPE_CMD, NULL },
21342134

21352135
/* Command to switch ECO(HE), ESS Mode */
2136-
{ "ecomode.disable", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "0", HU_TYPE_CMD, NULL },
2137-
{ "ecomode.enable", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "1", HU_TYPE_CMD, eaton_input_eco_mode_on_off_info },
2138-
{ "essmode.enable", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "2", HU_TYPE_CMD, NULL },
2139-
{ "essmode.disable", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "0", HU_TYPE_CMD, NULL },
2136+
{ "experimental.ecomode.disable", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "0", HU_TYPE_CMD, NULL },
2137+
{ "experimental.ecomode.enable", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "1", HU_TYPE_CMD, eaton_input_eco_mode_on_off_info },
2138+
{ "experimental.essmode.enable", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "2", HU_TYPE_CMD, NULL },
2139+
{ "experimental.essmode.disable", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "0", HU_TYPE_CMD, NULL },
21402140
/* Command to switch ECO(HE) Mode with switch to Automatic Bypass Mode on before */
2141-
{ "ecomode.start.auto", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "1", HU_TYPE_CMD, eaton_input_eco_mode_auto_on_info },
2141+
{ "experimental.ecomode.start.auto", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "1", HU_TYPE_CMD, eaton_input_eco_mode_auto_on_info },
21422142

21432143
/* Command to switch Automatic Bypass Mode on/off */
21442144
{ "bypass.start", 0, 0, "UPS.PowerConverter.Input.[2].SwitchOnControl", NULL, "1", HU_TYPE_CMD, eaton_input_bypass_mode_on_info },

drivers/usbhid-ups.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ static status_lkp_t status_info[] = {
294294
{ "boost", STATUS(BOOST) },
295295
{ "bypassauto", STATUS(BYPASSAUTO) },
296296
{ "bypassman", STATUS(BYPASSMAN) },
297-
{ "ecomode", STATUS(ECOMODE) },
298-
{ "essmode", STATUS(ESSMODE) },
297+
{ "ecomode", STATUS(ECOMODE) }, /* Should not get used (at least not via */
298+
{ "essmode", STATUS(ESSMODE) }, /* ups.status), but tracked just in case */
299299
{ "off", STATUS(OFF) },
300300
{ "cal", STATUS(CALIB) },
301301
{ "overheat", STATUS(OVERHEAT) },
@@ -387,6 +387,9 @@ info_lkp_t bypass_manual_info[] = {
387387
{ 0, "!bypassman", NULL, NULL },
388388
{ 0, NULL, NULL, NULL }
389389
};
390+
391+
/* Should not get used (at least not via ups.status), but tracked just in case.
392+
* Currently referenced in mge-hid.c */
390393
info_lkp_t eco_mode_info[] = {
391394
{ 0, "normal", NULL, NULL },
392395
{ 1, "ecomode", NULL, NULL },

0 commit comments

Comments
 (0)