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

ecomode_addon-2 #2684

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

masterwishx
Copy link
Contributor

@masterwishx masterwishx commented Nov 18, 2024

add-on for #2637,#2680 ECO/Bypass for Eaton Models

@jimklimov In this new pr we can:

You think we can add ESS stuff also, however
Only enterprise UPSes have it?

  • [ Done ] We can add also post limits not passed in debug when check range eco/bypass func.

  • [ Done ] added variables:

input.bypass.switchable
input.transfer.bypass.overload
input.transfer.bypass.outlimits
  • [ Done ] ESS added to usbhid-ups.c

CC @jimklimov please confirm if it needed .

Also for now can't leave eco mode by commands but maybe Becouse my ussue with timeout, not sure...

Signed-off-by: DaRK AnGeL <[email protected]>
Signed-off-by: DaRK AnGeL <[email protected]>
@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

@masterwishx
Copy link
Contributor Author

@arnaudquette-eaton Very sorry to bother you again ,maybe you can find info about:

UPS.PowerConverter.Input.[2].Switchable

@arnaudquette-eaton
Copy link
Contributor

no need to be sorry @masterwishx , I'm always happy to help ;)

Desc: Item of Bypass AC Input collection
Transfer on automatic Bypass enabled

RW

0: The automatic transfer on bypass is not allowed
1: The automatic transfer on bypass is allowed. (Refer to UPS.PowerConverter.Input.[2].OutOfToleranceTransferEnable and UPS.PowerConverter.Input.[2].OverloadTransferEnable for additional bypass rules)

Hope it helps

@masterwishx
Copy link
Contributor Author

masterwishx commented Nov 19, 2024

Transfer on automatic Bypass enabled

Thanks a lot , so its like UPS.PowerConverter.Input.[2].ForcedTransferEnable but like for UPS itself bypass autoswitching with rules?

as you know we now have ECO/Bypass enabled with your help for HID info!

the only problem i cant exit from ECO to bypass by r/w values or commands bypass.on/off , but maybe its local issue for my UPS with timeouts ....

Also will try to add function for auto enter to ECO mode ( bypass.on + ECO + bypass.off) but still cant test exit from ECO :(
Thanks again for your help

@masterwishx
Copy link
Contributor Author

Transfer on automatic Bypass enabled

added values if you think they usefull ?

@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

@masterwishx
Copy link
Contributor Author

masterwishx commented Nov 20, 2024

CC @arnaudquette-eaton can you please check and confirm that we can exit from ECO mode by :
"UPS.PowerConverter.Input.[2].SwitchOffControl"=1 input.bypass.switch.off or
"UPS.PowerConverter.Input.[2].SwitchOnControl"=1 input.bypass.switch.on
or maybe some other command ? (cant exit from ECO by this command, but maybe its my local issue ?!?)

Signed-off-by: DaRK AnGeL <[email protected]>
Signed-off-by: DaRK AnGeL <[email protected]>
Signed-off-by: DaRK AnGeL <[email protected]>
@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

@masterwishx
Copy link
Contributor Author

masterwishx commented Nov 22, 2024

IFrom 8afba96
Work for function for auto ECO started , please confirm if we need this at all ? CC @jimklimov @arnaudquette-eaton @desertwitch

Another easy method just to make bash script with (bypass.start,ecomode.enable etc... )

@AppVeyorBot
Copy link

@@ -909,21 +908,26 @@ static const char *eaton_input_eco_mode_auto_on_fun(double value)
}

/* Check if input.eco.switchable is normal and set it to 'ECO' */
if (strcmp(eco_switchable_str, "normal")) {
if (strcmp(eco_switchable_str, "normal")) {
check_eco_result = eaton_input_eco_mode_check_range(value);
Copy link
Contributor Author

@masterwishx masterwishx Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimklimov please confirm here we should call function to check range becouse :
when setvar("input.eco.switchable", "ECO"); its only set variable but not calling function eaton_input_eco_mode_check_range like here, same for bypass?

nut/drivers/mge-hid.c

Lines 1709 to 1710 in 858f615

/* ECO(HE), ESS Mode switch, to use when 'input.bypass.switch.on' is on */
{ "input.eco.switchable", ST_FLAG_RW | ST_FLAG_STRING, 8, "UPS.PowerConverter.Input.[5].Switchable", NULL, "%.0f", HU_FLAG_SEMI_STATIC, eaton_input_eco_mode_on_off_info },

nut/drivers/mge-hid.c

Lines 783 to 789 in 858f615

/* High Efficiency (aka ECO) mode, Energy Saver System (aka ESS) mode makes sense for UPS like (93PM G2, 9395P) */
static info_lkp_t eaton_input_eco_mode_on_off_info[] = {
{ 0, "normal", NULL, NULL },
{ 1, "ECO", eaton_input_eco_mode_check_range, NULL }, /* NOTE: "ECO" = tested on 9E model and working fine */
{ 2, "ESS", NULL, NULL },
{ 0, NULL, NULL, NULL }
};

@arnaudquette-eaton please confirm that seems setvar also call info_lkp_t *<unnamed>::hid2info
so no need to call this function befor like i wrote above ?

nut/drivers/usbhid-ups.c

Lines 969 to 972 in b624145

/* Lookup the new value if needed */
if (hidups_item->hid2info != NULL) {
value = hu_find_valinfo(hidups_item->hid2info, val);
} else {

@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

@masterwishx
Copy link
Contributor Author

@arnaudquette-eaton Sorry again but can you check and confirm that it was done right ?

UPS.PowerConverter.Input.[5].PresentStatus.Used

info_lkp_t eco_mode_info[] = {
    { 0, "normal", NULL, NULL },
    { 1, "ecomode", NULL, NULL },
    { 2, "essmode", NULL, NULL },
    { 0, NULL, NULL, NULL }
};

or we should use :

info_lkp_t eco_mode_info[] = {
    { 0, "!ecomode", NULL, NULL },
    { 1, "ecomode", NULL, NULL },
    { 2, "essmode", NULL, NULL },
    { 0, NULL, NULL, NULL }
};

@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

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.

4 participants