Fix cmd for ecomode,bypass,experimental.ecomode.[start/stop].auto#2947
Fix cmd for ecomode,bypass,experimental.ecomode.[start/stop].auto#2947jimklimov merged 9 commits intonetworkupstools:masterfrom
Conversation
…t argument for bypass and ecomode cmds Signed-off-by: DaRK AnGeL <28630321+masterwishx@users.noreply.github.com>
|
@masterwishx : can you please elaborate a comment above on how this change fixes some behaviors? Shouldn't this PR also change descriptions in |
I'm not really sure but seems commands need to be NULL at last parametr or need some more code as you can see it throw error in log of #2685. I will check again cmdvartab and nut-names.txt for changes, yesterday didn't found if needed |
|
Did you test this to work with your UPS? Just asking because we changed around a lot of things with the Eaton subdrivers recently. What is working right now and what is not working? |
There was a problem hiding this comment.
Did you test this to work with your UPS?
Just asking because we changed around a lot of things with the Eaton subdrivers recently.
Did we ever establish a baseline of things working as they should with ECO/ABM, the other changes?What is working right now and what is not working?
Will test some more with my 5P series as well, time permitting.
with NULL tested back then , now tested and confirm not working without NULL , for test again i need to compile my pr but can 't becouse of missing/changed libs in unraid if you can help with setting file will be cool :)
masterwishx
left a comment
There was a problem hiding this comment.
Did you test this to work with your UPS?
Just asking because we changed around a lot of things with the Eaton subdrivers recently.
Did we ever establish a baseline of things working as they should with ECO/ABM, the other changes?What is working right now and what is not working?
Will test some more with my 5P series as well, time permitting.
ABM (missing ABM in my unit 9E) tested back then all working fine for my model 9E (shown Online charging always )
masterwishx
left a comment
There was a problem hiding this comment.
Did you test this to work with your UPS?
Just asking because we changed around a lot of things with the Eaton subdrivers recently.
Did we ever establish a baseline of things working as they should with ECO/ABM, the other changes?What is working right now and what is not working?
Will test some more with my 5P series as well, time permitting.with NULL tested back then , now tested and confirm not working without NULL , for test again i need to compile my pr but can't becouse of missing/changed libs in unraid if you can help with setting file will be cool :)
|
Honestly, I'd just compile with Slackware, there's no benefit in setting up a building stage in Unraid all over. I use Slackware 15.0 and 15.1, haven't needed to change my setups for months, most of the things are contained in Slackware out of the box (for better or worse). |
Yep i also compiled like this but the problem was in file :
|
|
So last time when tried to compile i had errors ... |
|
im using slackware 15.0 just for info |
|
I'd really advise you use Slackware 15.1 (current) for anything Unraid 7, and Slackware 15.0 (stable) for anything Unraid 6. Manually upgrading Slackware 15.0 packages to be compatible with Unraid 7 is a lot of (wasted) effort. So my recommendation is get the latest ISO from e.g. https://slackware.uk/people/alien-current-iso/slackware64-current-iso/ and install that, you'll find that 99% of packages required are already installed and this should work nicely with Unraid 7 with at the most 1-2 minor package changes. P.S. You can then easily cross-reference e.g. this: https://docs.unraid.net/unraid-os/release-notes/7.1.0/ |
Thanks got it |
I really need it only for testing NUT to my prs, im using your NUT plugin and very happy with it ! |
Signed-off-by: DaRK AnGeL <28630321+masterwishx@users.noreply.github.com>
There was a problem hiding this comment.
Lines 2048 to 2049 in 6e5f92e
maybe input.eco.switchable.auto is better ?
Signed-off-by: DaRK AnGeL <28630321+masterwishx@users.noreply.github.com>
Well, the relocated comment still says it is a command (as a settable value it is not a command anymore), and at that - one to switch something on/off. The name like I am not that well-versed in this device series and their behaviors, so can't really say more than that the current text, mapping. and question seem to all "pull the cart" in different directions :) |
After a deeper investigation, it seems that this is not very suitable for a variable upsrw Becouse need to return back hid/nut values like (normal, ECO, ESS) same as in this case I need more testing and checking maybe to put as variable or maybe move all back to commands but to fix issue with missing hid/nut value for them... In any case for now commands that fixed with NULL at the end should work fine, so maybe to move this checking /testing of |
For ecomode we need first enter to bypass This command/variable just call both (bypass, ecomode) instead user run separate 2 commands /variables so maybe some think like: The question if you think we need command/variable like this at all? @jimklimov |
|
@jimklimov can i try use coderabbitai in my pr maybe will help somehow ? |
…ed) to "input.bypass.switch.off", "off" ,aded function of eaton_input_bypass_check_range(value); , eaton_input_eco_mode_check_range(value); Signed-off-by: DaRK AnGeL <28630321+masterwishx@users.noreply.github.com>
… compiled Signed-off-by: DaRK AnGeL <28630321+masterwishx@users.noreply.github.com>
|
❌ Build nut 2.8.3.3136-master failed (commit 199f8a61bf by @masterwishx) |
Signed-off-by: DaRK AnGeL <28630321+masterwishx@users.noreply.github.com>
|
✅ Build nut 2.8.3.3137-master completed (commit 6d160d64f4 by @masterwishx) |
Installed Slackware 15.1 from the link + packages (Powerman + Modbus + Freeipmi )
freeipmi-1.6.15-x86_64-1cf.txz or freeipmi-1.6.9-x86_64-1gds.txz Maybe i missed somethink ? |
|
@masterwishx : can you please retry building with the Then you can probably use |
OK i will but the issue can be because of missed wrong libraries that plugin use in Unraid 7.1.1 + @desertwitch maybe use some special setting maybe or files linked in plugin that i missed in my compilation ?! |
masterwishx
left a comment
There was a problem hiding this comment.
I think i will remove all stuff with ecomode auto to another PR and we should answer :
Do we really need automatic ECO Mode variable or command experimental.ecomode.start.auto and experimental.ecomode.stop.auto?
that run Bypass On then ECO Mode Enable and back or Users are grown and can run two separate commands or variables :
bypass.start + experimental.ecomode.enable
bypass.stop + experimental.ecomode.disable
or
Enable bypass mode:
upsrw -u admin -p pass -s input.bypass.switch.on=on eaton
Enable ECO mode:
upsrw -u admin -p pass -s input.eco.switchable=enable eaton
Disable bypass mode:
upsrw -u admin -p pass -s input.bypass.switch.off=off eaton
Disable ECO mode:
upsrw -u admin -p pass -s input.eco.switchable=normal eaton
@jimklimov please confirm
|
Sorry for the delays. Yes, it seems safer now to separate the part which is known/assumed working (and fixing a bug, so we can all benefit from leaving that one behind us), from the more questionable part...
I think the latter would be in inverse order? e.g. If so, this highlights the problem that even the best of us can stumble on this and being "grown" does not fully help :) I am not too excited about mixing readable/writeable variables (whether they might be in driver's RAM only or forwarded to the device firmware) and instant commands (actually applying the variable). On one hand, they have different permissions in NUT security model; on another they might be conceptually separated in time. For example, we have variables that set the delay for an UPS power-off after receiving the shutdown command which we can set any time we like, and separately we have actual commands to
So if we have an action that causes the ECO mode to get into effect, or "normal" mode to get into effect, that change should be done by a command (which internally may set some UPS firmware variables and call its operations in a specific sequence). Note that instant commands can have one optional argument (and may also require it - e.g. fail if nothing recognized is passed), so if there is some value that impacts this operation and is not required to be persisted in the driver or device, this can be used. For example, we might have a single INSTCMD to toggle the type of ECO mode (covering both "normal/off/disable", and "ECO", "ESS", "HE" or whatever buzzwords apply to this device). |
As i was unable to test it because my unit 9E in ECO mode and cant go to online (tried all kind variations) but we were tested with user @ZivertX (with upsrw) back then before old pr with ECO was merged: #2685 (comment) So it seems right order but maybe also working versa.... Anyway we will try to test again ... |
Yep that was basically the idea at start, but seems needs more testing etc ... |
…rking in another pr and clean this pr Signed-off-by: DaRK AnGeL <28630321+masterwishx@users.noreply.github.com>
|
im really sorry to ask you , but seems you are only user with 9SX who can help us with testing , So if you will have time to check (we moved ecomode auto to another pr) we need to check that currently cmd/upsrw are working with no errors: this pr to test: with bypass and ecomode are works by : by upsrw : if you can also please note if bypass was entered/exited befor ECO (by ups screeen or so) Thanks |
|
❌ Build nut 2.8.3.3141-master failed (commit 4c7c6fc15d by @masterwishx) |
|
Interim note: Not sure yet what CI complains about: AppVeyor spilled over its 1hr time slot; macos VM maybe just crashed (tends to), no log file is attached. |
|
I've built from your branch:
This is works
This is also works. And yep, in both scenarios ups entered bypass then in eco mode, then exited from bypass before exit from eco mode |
|
Why after entered bypass ups says exactly
Why "Automatic" , not "Manually" ? It would be more clearly for cmd command bypass.start |
It's just named so by Eaton vendor.
Thanks a lot for testing, it's really very important. Just forgot to mention to include debug logs. The only one thing I will ask you maybe to test next pr with automatic ecomode when it will be ready if you can and will have time for it. @jimklimov confirmed all fine here |
Signed-off-by: DaRK AnGeL 28630321+masterwishx@users.noreply.github.com
experimental.ecomode.[start/stop].auto move to uprw + set
NULLto last argument for bypass and ecomode commands (cmd)For commands (cmd) we need set NULL at last parametr or more code to add ?
When we call function instead NULL, we got error:
hu_find_valinfo: no matching HID value for this INFO_* value (1)So just set back to NULL for thouse functions to avoid errors and fix the commands functionality.
experimental.ecomode.start.auto"experimental.ecomode.stop.autoWe move to variables for avoid same issue and enable to run the function at last parametr
Last parameter ( in struct "info_lkp_t" ) is :
lookup table between HID and NUT valuesnut/drivers/usbhid-ups.h
Lines 184 to 185 in 5597cc7
nut/drivers/usbhid-ups.h
Lines 78 to 84 in 5597cc7
Final :
We move this idea to #2949 for continue to make it posibly work and clean this pr for variables and commands that already are working fine