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

Modbus driver #50

Open
aquette opened this issue Sep 13, 2013 · 9 comments
Open

Modbus driver #50

aquette opened this issue Sep 13, 2013 · 9 comments

Comments

@aquette
Copy link
Member

aquette commented Sep 13, 2013

Create a generic driver to support Modbus devices.

It will:

  • use libmodbus (http://libmodbus.org)
  • support both RTU (RS232/485) and TCP communication
  • support various devices (ups, meters, ...)
  • use external definition files, including default communication settings (for RTU), and data mapping

A preliminary support has already been committed:
https://github.com/networkupstools/nut/tree/nutdrv-modbus

@clepple
Copy link
Member

clepple commented Jun 8, 2014

Just noticed that the other two drivers which start with "nutdrv" use an underscore ("nutdrv_qx" and "nutdrv_atcl_usb".

@aquette
Copy link
Member Author

aquette commented Jun 8, 2014

Fixed, thx for pointing. I've not renamed the branch though, just src / doc occurrences

jimklimov added a commit to jimklimov/nut that referenced this issue May 9, 2016
SNMP subdriver generator: complete DMF support
@sivann
Copy link

sivann commented Mar 8, 2017

Hello, do you have a roadmap for modbus support? I'm interested for an industrial UPS support (phoenixcontact) which uses modbus. If not I will implement something. A generic modbus driver does not seem something realistic though.

@aquette
Copy link
Member Author

aquette commented Mar 14, 2017

thanks to @sivann work, there is a modbus RTU (serial) driver that can serve to create a 1rst mapping and actual testing. See #404
The already reference #139 for APC can serve too...

@edalquist
Copy link

Yes they have RJ45 form factor serial ports

jimklimov pushed a commit to jimklimov/nut that referenced this issue Mar 15, 2018
drivers/snmp-ups.c : bump the version for public-release driver fix
@jimklimov
Copy link
Member

jimklimov commented Jan 3, 2023

Note: this request got lost on the bookshelf over time, so while several modbus-capable drivers were added to NUT in the past couple of years, and some more are in progress, they are not subdrivers under a common executable/CLI/config-option umbrella, but standalone consumers of libmodbus. For full list see sources and the label reference below; driver efforts that stand out include:

  • adelsystem-cbi
  • huawei-ups2000
  • socomec-jbus
  • generic-modbus
  • phoenixcontact-modbus
  • INVT UPS

Another note: while there are technically an ASCII and a binary modbus protocol flavours, ascii support in libmodbus is only on a side branch and apparently was not good enough to merge to mainstream. So drivers should avoid it (e.g. PR #modb tried to import a copy to NUT codebase, which was not a good place to maintain it long-term).

@WiredWonder
Copy link

Thanks @jimklimov

For a Debian sysadmin who just wants better data from his recent USB APC UPS, what's the best option right now?

Jason

@jimklimov
Copy link
Member

jimklimov commented Jan 3, 2023

Can't really say as I have not had APCs for a while. It seems that setting up apcupsd (possibly from source - Debian packages were made in a way that they conflict on helper symlink names) is reasonable, either standalone or along with NUT apcupsd-ups driver to "retranslate" that device's data (and mgmt?..) to NUT ecosystem if desired.

Overall the "APC+ModBus" theme (or in other words, better support for APCs released after ~2010) is tracked (not much progress yet though) in #139

@shom
Copy link

shom commented Jan 13, 2023

libmodbus-3.1.9 not work. 3.1.8 it's work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants