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

Add missing values for ECO Mode Eaton #2620

Merged
merged 13 commits into from
Sep 13, 2024

Conversation

masterwishx
Copy link
Contributor

Fixes #2492

Add missing values for ECO and Bypass mode for Eaton for future work for enable ECO mode.

compiled and checked in NUT Plugin in unraid :

compiled and checked with:
input.transfer.frequency.bypass.high and input.transfer.frequency.eco.high
after changed to :
input.transfer.frequency.bypass.range input.transfer.frequency.eco.range
in values :

Reduced here text for : range also instead high for not compile again ...

battery.capacity: 7.00
battery.charge: 100
battery.charge.low: 20
battery.charge.restart: 0
battery.protection: yes
battery.runtime: 3480
battery.runtime.low: 180
battery.type: PbAc
battery.voltage: 83.0
battery.voltage.nominal: 72
device.mfr: EATON
device.model: 9E2000i
device.serial: xxxxxxxxxxxx                   #REDACTED by me # !!! serial is shown now !!!
device.type: ups
driver.debug: 0
driver.flag.allow_killpower: 0
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: auto
driver.state: quiet
driver.version: 2.8.2.1
driver.version.data: MGE HID 1.48
driver.version.internal: 0.57
driver.version.usb: libusb-1.0.26 (API: 0x1000108)
input.bypass.frequency: 49.9
input.bypass.voltage: 234.0
input.frequency: 49.9
input.frequency.nominal: 50
input.transfer.bypass.high: 264
input.transfer.bypass.low: 184
input.transfer.eco.high: 241
input.transfer.eco.low: 218
input.transfer.frequency.bypass.range: 10
input.transfer.frequency.eco.range: 5
input.transfer.high: 300
input.transfer.low: 100
input.voltage: 234.0
input.voltage.nominal: 234
outlet.1.status: on
outlet.desc: Main Outlet
outlet.id: 0
outlet.switchable: no
output.current: 1.60
output.frequency: 49.9
output.frequency.nominal: 50
output.voltage: 229.0
output.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.firmware: 00.02.000
ups.load: 19
ups.load.high: 105
ups.mfr: EATON
ups.model: 9E2000i
ups.power: 391
ups.power.nominal: 2000
ups.productid: ffff
ups.realpower: 258
ups.realpower.nominal: 1600
ups.serial: xxxxxxxxxxxx                   #REDACTED by me # !!! serial is shown now !!!
ups.shutdown: enabled
ups.start.auto: yes
ups.start.battery: yes
ups.start.reboot: yes
ups.status: OL
ups.temperature: 24.9
ups.test.interval: 604800
ups.test.result: Done and passed
ups.timer.shutdown: -1
ups.timer.start: -1
ups.type: online
ups.vendorid: 0463


[battery.charge.low]
Remaining battery level when UPS switches to LB (percent)
Type: STRING
Maximum length: 5
Value: 20

[battery.charge.restart]
Minimum battery level for restart after power off (percent)
Type: STRING
Maximum length: 3
Value: 0

[battery.protection]
Prevent deep discharge of battery
Type: STRING
Maximum length: 5
Value: yes

[battery.runtime.low]
Remaining battery runtime when UPS switches to LB (seconds)
Type: STRING
Maximum length: 10
Value: 180

[driver.debug]
Current debug verbosity level of the driver program
Type: NUMBER
Value: 0

[driver.flag.allow_killpower]
Safety flip-switch to allow the driver daemon to send UPS shutdown command (accessible via driver.killpower)
Type: NUMBER
Value: 0

[input.transfer.bypass.high]
Description unavailable
Type: STRING
Maximum length: 5
Value: 264

[input.transfer.bypass.low]
Description unavailable
Type: STRING
Maximum length: 5
Value: 184

[input.transfer.eco.high]
Description unavailable
Type: STRING
Maximum length: 5
Value: 241

[input.transfer.eco.low]
Description unavailable
Type: STRING
Maximum length: 5
Value: 218

[input.transfer.frequency.bypass.range]
Description unavailable
Type: STRING
Maximum length: 5
Value: 10

[input.transfer.frequency.eco.range]
Description unavailable
Type: STRING
Maximum length: 5
Value: 5

[input.transfer.high]
High voltage transfer point (V)
Type: STRING
Maximum length: 5
Value: 300

[input.transfer.low]
Low voltage transfer point (V)
Type: STRING
Maximum length: 5
Value: 100

[outlet.desc]
Outlet description
Type: STRING
Maximum length: 20
Value: Main Outlet

[output.voltage.nominal]
Nominal output voltage (V)
Type: ENUM STRING
Maximum length: 3
Option: "200"
Option: "208"
Option: "220"
Option: "230" SELECTED
Option: "240"

[ups.delay.shutdown]
Interval to wait after shutdown with delay command (seconds)
Type: STRING
Maximum length: 10
Value: 20

[ups.delay.start]
Interval to wait before (re)starting the load (seconds)
Type: STRING
Maximum length: 10
Value: 30

[ups.load.high]
Load when UPS switches to overload condition (percent)
Type: STRING
Maximum length: 5
Value: 105

[ups.shutdown]
Description unavailable
Type: ENUM STRING
Maximum length: 10
Option: "disabled"
Option: "enabled" SELECTED

[ups.start.auto]
UPS starts when mains is (re)applied
Type: STRING
Maximum length: 5
Value: yes

[ups.start.battery]
Allow to start UPS from battery
Type: STRING
Maximum length: 5
Value: yes

[ups.start.reboot]
UPS reboots when power returns during shutdown delay
Type: STRING
Maximum length: 5
Value: yes

[ups.test.interval]
Interval between self tests (seconds)
Type: STRING
Maximum length: 8
Value: 604800

@masterwishx
Copy link
Contributor Author

@jimklimov @arnaudquette-eaton i hope this can be the first step to way to enable ECO Mode for Eaton ?!?

@jimklimov
Copy link
Member

Currently the added name patterns are missing in docs/nut-names.txt but it makes sense to add them near the existing input.transfer.boost.low et al.

Somewhat orthogonal to this PR, there seems to be no mix of "frequency" and "transfer" in the naming yet. The existing input.transfer.* values are somewhat implicitly about voltage (maybe current names should get deprecated eventually and voltage made explicit?.. probably some parsing scripts/tools would be upset about such change)

There are however input.frequency.low ("Input line frequency low (Hz)" which seems also like a "transfer" to me, just freq-based) etc. so it perhaps makes better sense to name new concepts like input.frequency.transfer.* or even input.frequency.(bypass|eco).(low|high|range) to be like the few existing entries without a "transfer" to their name, although that would be at odds with deprecation and more explicit renaming suggested above (however that aspect can wait... and be solved together some time later).

Regarding your tests, I did not understand why input.transfer.frequency.bypass.high and input.transfer.frequency.eco.high got(?) replaced by input.transfer.frequency.bypass.range and input.transfer.frequency.eco.range if the PR only adds NUT understanding of some readings and does not change/remove any, or did I misunderstand your post?

Also, an explanation (in cmdvartab and nut-names eventually) about what such range is conceptually, and how in matters in practice, and its units (Hz? %?) would be most welcome.

@masterwishx
Copy link
Contributor Author

Regarding your tests, I did not understand why input.transfer.frequency.bypass.high and input.transfer.frequency.eco.high got(?) replaced by input.transfer.frequency.bypass.range and input.transfer.frequency.eco.range if the PR only adds NUT understanding of some readings and does not change/remove any, or did I misunderstand your post?

I just named with high and compiled with this name but it's should be called range Becouse it's range not high

@masterwishx
Copy link
Contributor Author

the PR only adds NUT understanding of some readings and does not change/remove any, or did I misunderstand your post?

Yes it's adding 6 missing values of bypass/eco

@masterwishx
Copy link
Contributor Author

Also found HysteresysVoltageTransfer=10 that i have in log and from 9SX Document :

image

Also, an explanation (in cmdvartab and nut-names eventually) about what such range is conceptually, and how in matters in practice, and its units (Hz? %?) would be most welcome.

Yes you are right , it seems , its % of Hz and not Hz: so should be called like : (%Hz) ?

input.transfer.frequency.bypass.range: 10%
input.transfer.frequency.eco.range: 5%

image
image

There are however input.frequency.low ("Input line frequency low (Hz)" which seems also like a "transfer" to me, just freq-based) etc

i have only :

input.bypass.frequency: 49.9
input.bypass.voltage: 234.0

@masterwishx
Copy link
Contributor Author

There are however input.frequency.low ("Input line frequency low (Hz)" which seems also like a "transfer" to me, just freq-based) etc. so it perhaps makes better sense to name new concepts like input.frequency.transfer.* or even input.frequency.(bypass|eco).(low|high|range) to be like the few existing entries without a "transfer" to their name, although that would be at odds with deprecation and more explicit renaming suggested above (however that aspect can wait... and be solved together some time later).

yes Maybe you right

@masterwishx
Copy link
Contributor Author

masterwishx commented Sep 11, 2024

Yes you are right , it seems , its % of Hz and not Hz: so should be called like : (%Hz) ?

or better (Hz[%]) ?
or (percent Hz) as found percent some values

@masterwishx
Copy link
Contributor Author

masterwishx commented Sep 11, 2024

@jimklimov can i add also :

input.transfer.hysteresys = 10V

HysteresysVoltageTransfer

Input Voltage Hysteresis: What’s That? Input voltage hysteresis refers to a
specific behavior related to how a UPS handles changes in input voltage.
It’s like the UPS’s way of saying, “Hey, let’s not be too trigger-happy when
switching between different voltage levels.” 🤓

Here’s the lowdown:

* Normal Operation:

When the UPS is running normally (powered by utility or generator), it
maintains a steady output voltage for your critical equipment.

But what if the input voltage wiggles a bit due to fluctuations or minor
disturbances? Well, that’s where hysteresis comes into play.

* Hysteresis Explained:

Imagine you’re at a concert, and the music volume keeps going up and
down. Annoying, right? The UPS doesn’t want to subject your sensitive
electronics to that kind of roller-coaster.

So, it sets a threshold: If the input voltage drops below a certain level
(let’s call it “Low”), the UPS won’t immediately switch to battery mode.
It waits until the voltage stays consistently low for a bit.

Similarly, if the input voltage rises above another threshold (the “High”
level), the UPS won’t rush back to normal mode. It waits for stability.

* Why Is This Important?

Rapid switching between modes (utility power to battery and vice versa)
can stress the UPS and its connected devices.

By introducing hysteresis, the UPS avoids unnecessary toggling, ensuring
smoother transitions and better protection for your gear.

@jimklimov
Copy link
Member

Well, a physicist bit of me screamed inside at the idea of "percent" (a fraction, so no measurement types as they cancel out during division) and a type (Hz) being together in one term. But lay-manly, it sort of makes sense.

Still, I think something like "10% of nominal (voltage/frequency/etc...)" is less ambiguous.

@jimklimov
Copy link
Member

Knowing the Hysteresys setting sounds fun; the large description maybe fits into the nut-names paragraphs near the tables. Or into the FAQ...

@masterwishx
Copy link
Contributor Author

Input Voltage Hysteresis: What’s That? Input voltage hysteresis refers to a
specific behavior related to how a UPS handles changes in input voltage.
It’s like the UPS’s way of saying, “Hey, let’s not be too trigger-happy when
switching between different voltage levels.” 🤓

Here’s the lowdown:

  • Normal Operation:

When the UPS is running normally (powered by utility or generator), it
maintains a steady output voltage for your critical equipment.

But what if the input voltage wiggles a bit due to fluctuations or minor
disturbances? Well, that’s where hysteresis comes into play.

  • Hysteresis Explained:

Imagine you’re at a concert, and the music volume keeps going up and
down. Annoying, right? The UPS doesn’t want to subject your sensitive
electronics to that kind of roller-coaster.

So, it sets a threshold: If the input voltage drops below a certain level
(let’s call it “Low”), the UPS won’t immediately switch to battery mode.
It waits until the voltage stays consistently low for a bit.

Similarly, if the input voltage rises above another threshold (the “High”
level), the UPS won’t rush back to normal mode. It waits for stability.

  • Why Is This Important?

Rapid switching between modes (utility power to battery and vice versa)
can stress the UPS and its connected devices.

By introducing hysteresis, the UPS avoids unnecessary toggling, ensuring
smoother transitions and better protection for your gear.

is it ok in description ?
"Hysteresys (threshold of switching to modes) Voltage Transfer point (V)"

@jimklimov
Copy link
Member

jimklimov commented Sep 12, 2024

I've posted a couple of commits with asciidoc fixes, gotta check how the resulting rendered files look, too. Don't overwrite them when pushing out your future changes, if any (git fetch --all; git rebase origin/master; git push) :)

FWIW, now I've also noted that you made the PR from your copy of the master branch. This is generally unwieldy and frowned upon (sometimes you can't easily resync with upstream/master changes this way, and can not work on several separate changes at once), so in the future I suggest sticking to uniquely named "feature branches" for PRs and other work.

That hysteresys article, where did it come from? (Maybe attribution is in order, at least in commit comment when/if you add it)

@masterwishx
Copy link
Contributor Author

I've posted a couple of commits with asciidoc fixes, gotta check how the resulting rendered files look, too. Don't overwrite them when pushing out your future changes, if any (git fetch --all; git rebase origin/master; git push) :)

FWIW, now I've also noted that you made the PR from your copy of the master branch. This is generally unwieldy and frowned upon (sometimes you can't easily resync with upstream/master changes this way, and can not work on several separate changes at once), so in the future I suggest sticking to uniquely named "feature branches" for PRs and other work.

That hysteresys article, where did it come from? (Maybe attribution is in order, at least in commit comment when you add it)

OK sorry ,im only learning really using git : )

@jimklimov
Copy link
Member

If you want to continue in this area, I can strongly suggest the Atlassian Git tutorial, it was quite a good ramp-up back in the day when I trained some colleagues on Git. Nowadays there are also quite a few "gamified" manuals/trainings, where you solve certain goals in a provided repo to find the next tasks to do, etc. Some friends reported that such approach helped them a lot.

@jimklimov
Copy link
Member

Rendered doc looks ok now:

image

image

@masterwishx
Copy link
Contributor Author

Я опубликовал пару коммитов с исправлениями asciidoc, надо еще проверить, как выглядят полученные файлы. Не перезаписывайте их при выкладывании будущих изменений, если таковые будут ( git fetch --all; git rebase origin/master; git push) :)

Кстати, теперь я также заметил, что вы сделали PR из своей копии ветки master. Это, как правило, громоздко и не приветствуется (иногда вы не можете легко повторно синхронизировать upstream/masterизменения таким образом, и не можете работать над несколькими отдельными изменениями одновременно), поэтому в будущем я предлагаю придерживаться уникально названных "ветвей функций" для PR и другой работы.

Эта статья на гистерезисе, откуда она взялась? (Возможно, стоит указать авторство, по крайней мере, в комментарии к коммиту, когда/если вы ее добавите)

maybe better ?

| input.transfer.hysteresys   | Threshold of switching modes
                              | voltage transfer point (V)        | 10

@masterwishx
Copy link
Contributor Author

That hysteresys article, where did it come from? (Maybe attribution is in order, at least in commit comment when/if you add it)

This is from Copilot Win 11

@jimklimov
Copy link
Member

Maybe better. Note the extra | (leftmost on your second line) - it is not needed, would start a new table column.

@jimklimov
Copy link
Member

Ah, it got us: "hysteresis" not "hysteresys" :D

@jimklimov
Copy link
Member

I'll post the fixes in a minute

@masterwishx
Copy link
Contributor Author

Ah, it got us: "hysteres_i_s" not "hysteres_y_s" :D

thats becouse i have this in log :

image

@masterwishx
Copy link
Contributor Author

I'll post the fixes in a minute

im moved to another branch and now confused with pr tom merge it :(

@jimklimov
Copy link
Member

jimklimov commented Sep 12, 2024

So, we are not the first to make that typo :)

:; git blame drivers/mge-hid.c | grep -i hysteresys
afed402855 (Arnaud Quette      2012-05-14 08:14:06 +0000  998)  { "HysteresysVoltageTransfer",  0xffff009c },

afed402855

@jimklimov
Copy link
Member

I'll post the fixes in a minute

im moved to another branch and now confused with pr tom merge it :(

I think with this particular PR, we can finish here. Seems almost done.

@AppVeyorBot
Copy link

@jimklimov jimklimov added the DDL label Sep 12, 2024
@masterwishx
Copy link
Contributor Author

@jimklimov Cool, can be merged now;)

Another question for the future work is what values we should have to enable Bypass/ECO
Mode with NUT ?
It's more related to #2495 offcourse...
As I know my 9E is basic model but with snmp
It can be enabled that's what eaton support told me, so maybe we can enable it with usb also by NUT ?

@jimklimov jimklimov merged commit 501bbdc into networkupstools:master Sep 13, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
3 participants