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

Added socomec_jbus implementation #1313

Merged
merged 2 commits into from Mar 8, 2022
Merged

Conversation

tchatzi
Copy link

@tchatzi tchatzi commented Feb 22, 2022

Added a driver for the modbus-based JBUS protocol over serial RS-232 for Socomec UPS. Obviously a modbus sub-driver.
The documentation was found freely on the net but in there it is stated ``This is a product for restricted sales distribution to informed partners. Installation restrictions or additional measures may be needed to prevent disturbances”.
So the legal status is dubious at best.
It only reads UPS status at the moment and has no support for writing UPS variables or sending commands.
Based mostly on the work done for huawei-ups2000 by Yifeng Li.
Most of the read functions appear to work as expected, though it's only been tested with a DIGYS 3/3 15kVA model.
Tested and working on Linux x86-64 and Raspberry-pi3 ARM.

Copy link
Member

@jimklimov jimklimov left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. Code seems decent, CI would say more. I had a few comments posted for the man page.

Indeed, the "legality" is a concern, although I suppose the wording refers to the product (UPS) being a potentially dangerous high-power 3-phase beast, so it is not to be installed by layman enthusiasts but by certified electricians - and otherwise, no legal fault for Socomec if someone gets fried.

This driver is not built by default. You can build it by installing libmodbus
(with development packages) and running

configure --with-serial=yes --with-modbus=yes
Copy link
Member

Choose a reason for hiding this comment

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

./configure

and actually, I think it should be built "by default" as long as libmodbus-dev (or equivalent) is detected:

NUT_ARG_WITH([modbus], [build and install modbus drivers], [auto])

DB9 connector, so if you construct the cable yourself, use a male DB9 on
one end.

It only uses RX,TX and ground, so do not strain too much with DTR et all
Copy link
Member

@jimklimov jimklimov Feb 23, 2022

Choose a reason for hiding this comment

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

et al (single L)

also generally revise the text to be less of a casual blog and more documentalistic in style, and trim trailing whitespaces :)

@jimklimov
Copy link
Member

Also as a general comment, it is recommended to issue PRs not from a fork's "master" branch but from a separate branch for each feature - makes resync's easier, and parallelization of unrelated improvements from same author too ;)

@tchatzi
Copy link
Author

tchatzi commented Mar 2, 2022

I've been waiting for a week for response from Socomec regarding the legal status of the document.
Shall I make a new branch and create a new PR with the corrections ?

@jimklimov
Copy link
Member

jimklimov commented Mar 2, 2022 via email

@jimklimov jimklimov merged commit 66ea5fe into networkupstools:master Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants