Jim Klimov
2021-Dec-01 11:45 UTC
[Nut-upsdev] Proposed discussion: standardization of Status Flags and Instant Commands for ECO mode
Hello all, In issue https://github.com/networkupstools/nut/issues/1201 a point was raised recently by the author of modbus drivers for Huawei devices, that while many online UPS systems support ECO mode (where the mains output bypasses the UPS during normal operation, and is only handed over to the UPS automatically during a power failure), it seems this is not currently a concept in NUT data/state model.> The basic standardization items needed are:1. A ups.status flag for ECO mode, currently there's no standard. I looked around the codebase and found many drivers already use the flag OL ECO, so I think we could settle on that. - But with a caveat - the ECO status flag only appears when the UPS is online, and can disappear when it's on battery. But this is how many UPS units report the current power status - the register only has a value for "online ECO", not "battery ECO" (which is understandable, since it doesn't really make sense). 2. Instant commands for entering and exiting ECO mode. Currently NUT doesn't have standardized instant commands for that. Does the esteemed NUT developer community have some constructive opinions and ideas about this? After all, naming is one of the hardest problems in Computer Science ;) Thank you all in advance, Jim Klimov -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20211201/ab86cfec/attachment.htm>
Edgar Fuß
2021-Dec-01 12:36 UTC
[Nut-upsdev] Proposed discussion: standardization of Status Flags and Instant Commands for ECO mode
Doesn't this amount to changing ups.type from online to offline?
Greg Troxel
2021-Dec-01 13:39 UTC
[Nut-upsdev] Proposed discussion: standardization of Status Flags and Instant Commands for ECO mode
Jim Klimov via Nut-upsdev <nut-upsdev at alioth-lists.debian.net> writes:>> The basic standardization items needed are: > > 1. A ups.status flag for ECO mode, currently there's no standard. I > looked around the codebase and found many drivers already use the flag OL > ECO, so I think we could settle on that. > - But with a caveat - the ECO status flag only appears when the UPS > is online, and can disappear when it's on battery. But this is > how many UPS > units report the current power status - the register only has a value for > "online ECO", not "battery ECO" (which is understandable, since > it doesn't > really make sense). > 2. Instant commands for entering and exiting ECO mode. Currently NUT > doesn't have standardized instant commands for that. > > Does the esteemed lNUT developer community have some constructive opinions > and ideas about this? After all, naming is one of the hardest problems in > Computer Science ;)uMy view is that whether a device is in some true online mode or ECO mode is a minor implementation detail. I would not want to overload ups.status for this, because many data consumers want to know which mode we are in: utility power is ok and being used to power the load the battery is being used to power the load I can imagine software out there that doesn't know about the ECO concept, and it should continue to work. That requires not changing ups.status=OL. Therefore, I suggest a new variable that describes the form of online behavior, choosing among inverter bypass and maybe something else, describing if the UPS is running a full-blown inverter, just wiring input to output, or doing something else. (I dimly remember BEST Ferrups which have some intermediate "line interactive" mode with ferroresonant transformers.) This might be empty when offline, or it might be the same, especially for units that only have one possibility. Then, given a ups.mode that shows these choices, that could be set to command which mode is chosen, when there is an ability to choose. UPS units that only have inverter or bypass could have the variable basically read only. People/programs that care can look at the new variable, and those that don't can continue as they are with no problems. Personally I am using a Best Fortress LI660, which I think is ~always in eco mode, as it's much quieter than when on battery and I hear a relay when it transfers. I don't think it has a non-eco mode. But really my software wants to know if the power is ok or not to report to home assistant, and the remaining runtime, battery voltage, etc. Greg -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20211201/0c0732d2/attachment.sig>