-
-
Notifications
You must be signed in to change notification settings - Fork 350
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
Support for Liebert GXE 1-3KVA series #2629
Conversation
❌ Build nut 2.8.2.2147-master failed (commit f2fcc5bd91 by @goodspeed34) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, a very solid first entry, paint me impressed :)
I've posted some review comments, perhaps CI build agents' warnings and errors would add more.
Generally, a NEWS.adoc
entry would be welcome, and a man page required. Here I would welcome the man page to also have a description or examples how to use both USB and serial connections, given that the driver does not have USB-specific code (does the UPS present itself as just a /dev/ttyUSB0
sort of serial port in the OS?)
Maybe mention which USB vendor/product IDs can be seen on the device, are they specific to the UPS model, or generic for USB-Serial chips (FTDI etc.)?
Also, is this an "individual" contribution or do you work for that company (who is it now - Liebert, Vertiv, Epson...)? Especially if it is their official/sponsored driver, a note in acknowledgements.txt
may be worthwhile.
Finally, an entry or two (serial and USB) in data/driver.list.in
, including a suitable value for the "support level" column, would be great.
Also, to set up the local build with fatal warnings among other things, you can run If you can use a container or VM with as new a |
@jimklimov Thank you for the swift review. This PR is still work in progress. It looks like for now the endian function is not portable and gcc complains snprintf sometimes. I will try to split the checksum and frame functions into an individual header. It looks like that belongs to a protocol heavily used by Vertiv called YDN23 Also the UPS's eco mode can be toggled from serial line. But, I can't find a specific instcmd or var for it in NUT. Can you give a pointer for that? |
It's a
Sure, I will check that.
It's individual I think. I asked the company for the driver to RE but they said they don't have one and gave me a protocol manual.
OK, I will do the checklist when ready. |
ECO mode is part of some other discussions slowly progressing in different threads. Currently NUT naming space has had no concept for that, so it is worth introducing in some consistent manner so it becomes a sort of de-facto standard that best suits everyone. Note the definition of "ECO mode" is also vague and may vary between vendors and models. Seems like a marketing buzzword, and may possibly mean an ability of an UPS to switch between what was known as "on-line" (always dual transformation with a battery in the middle) vs. "line-interactive" (glorified power strip, ~10ms gap in an outage, only then battery-fed load) modes at will, at least on some devices. |
Sounds decent. Can you please ask if a copy of the protocol file can be published e.g. at https://networkupstools.org/ups-protocols.html ? |
Regarding endianness, check UPDATE: Although that UPDATE2: |
Maybe not... There is a confidentiality notice in the message and it's all in Chinese. |
Well, I am not sure what the social conventions are then... would it hurt to ask if they have a publishable variant (and perhaps in English)? |
742c050
to
273d1ec
Compare
❌ Build nut 2.8.2.2153-master failed (commit c5e78ea6d1 by @goodspeed34) |
ee22133
to
429d903
Compare
✅ Build nut 2.8.2.2155-master completed (commit 1a4873c116 by @goodspeed34) |
b301f79
to
bb09138
Compare
The corresponding protocol is attached. Sadly, I can't find an English one. YDT1363.3-2014通信局(站)电源、空调及环境集中监控管理系统第3部分:前端智能设备协议.pdf
|
|
154fb12
to
972275b
Compare
972275b
to
921e900
Compare
It seems CI bugged out from the forced-push... |
…d Liebert GXE Series driver Signed-off-by: Gong Zhile <[email protected]>
921e900
to
d8f8f91
Compare
Compiler wants both to handle `default` cases in `switch` lists, and dislikes a `default` label in enum handling when all known values are handled (and wants them all to be handled). The clash is only resolvable by pragmas, like elsewhere in out codebase. Signed-off-by: Jim Klimov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super! Thanks!
@goodspeed34 : By the way, one more question: since the beginning of time, there already was a I do see that the old driver is very basic and less functional than yours; just wondering if it can be treated as obsolete in favor of new development, or if they cover different grounds (e.g. cables/protocols) and should both exist? |
…etworkupstools#2629] Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
…2629] Signed-off-by: Jim Klimov <[email protected]>
…ain "gxe" [networkupstools#2629] Signed-off-by: Jim Klimov <[email protected]>
…etworkupstools#2629] Signed-off-by: Jim Klimov <[email protected]>
…yle) [networkupstools#2629] Signed-off-by: Jim Klimov <[email protected]>
It doesn't work and shows always OL state. (This UPS model only recognize the data frame in |
Thanks for clarification, much appreciated! |
Hm, did I miss a data dump as an example of the new driver's work in the comments above, or could you kindly post one? or a PR to nut-ddl repo right away :) |
I don't have my laptop with me so I'm afraid I can't raise a PR. Here is the dump for Liebert GXE 01k00TS1101C00:
There are mismatches here since the driver reports the actual manufacture EmersonNetworkPower and model HE1T0010 (from the device).
|
Thanks! |
Product Breif: https://www.vertiv.com/4a3d25/globalassets/products/critical-power/uninterruptible-power-supplies-ups/vertiv-liebert-gxe-1000-3000va-racktower-230v-single-phase-ups/vertiv-liebert-gxe-datasheet-en-emea---mka4l0ukvlg.pdf
This UPS has a RS232 port and a USB port. The USB port has an ACM interface which functions as a serial port. Both ports can be used managing the device.
General points
Described the changes in the PR submission or a separate issue, e.g.
known published or discovered protocols, applicable hardware (expected
compatible and actually tested/developed against), limitations, etc.
There may be multiple commits in the PR, aligned and commented with
a functional change. Notably, coding style changes better belong in a
separate PR, but certainly in a dedicated commit to simplify reviews
of "real" changes in the other commits. Similarly for typo fixes in
comments or text documents.
Please star NUT on GitHub, this helps with sponsorships! ;)
Frequent "underwater rocks" for driver addition/update PRs
Revised existing driver families and added a sub-driver if applicable
(
nutdrv_qx
,usbhid-ups
...) or added a brand new driver in the othercase.
Did not extend obsoleted drivers with new hardware support features
(notably
blazer
and other single-device family drivers for Qx protocols,except the new
nutdrv_qx
which should cover them all).For updated existing device drivers, bumped the
DRIVER_VERSION
macroor its equivalent.
For USB devices (HID or not), revised that the driver uses unique
VID/PID combinations, or raised discussions when this is not the case
(several vendors do use same interface chips for unrelated protocols).
For new USB devices, built and committed the changes for the
scripts/upower/95-upower-hid.hwdb
fileProposed NUT data mapping is aligned with existing
docs/nut-names.txt
file. If the device exposes useful data points not listed in the file, the
experimental.*
namespace can be used as documented there, and discussionshould be raised on the NUT Developers mailing list to standardize the new
concept.
Updated
data/driver.list.in
if applicable (new tested device info)Frequent "underwater rocks" for general C code PRs
structure layout and alignment in memory, endianness (layout of bytes and
bits in memory for multi-byte numeric types), or use of generic
int
wherelanguage or libraries dictate the use of
size_t
(orssize_t
sometimes).Progress and errors are handled with
upsdebugx()
,upslogx()
,fatalx()
and related methods, not with directprintf()
orexit()
.Similarly, NUT helpers are used for error-checked memory allocation and
string operations (except where customized error handling is needed,
such as unlocking device ports, etc.)
Coding style (including whitespace for indentations) follows precedent
in the code of the file, and examples/guide in
docs/developers.txt
file.For newly added files, the
Makefile.am
recipes were updated and themake distcheck
target passes.General documentation updates
Updated
docs/acknowledgements.txt
(for vendor-backed device support)Added or updated manual page information in
docs/man/*.txt
filesand corresponding recipe lists in
docs/man/Makefile.am
for new pagesPassed
make spellcheck
, updated spell-checking dictionary in thedocs/nut.dict
file if needed (did not remove any words -- themake
rule printout in case of changes suggests how to maintain it).
Additional work may be needed after posting this PR
Propose a PR for NUT DDL with detailed device data dumps from tests
against real hardware (the more models, the better).
Address NUT CI farm build failures for the PR: testing on numerous
platforms and toolkits can expose issues not seen on just one system.
the changed codebase.