networkupstools / nut

The Network UPS Tools repository. UPS management protocol Informational RFC 9271 published by IETF at https://www.rfc-editor.org/info/rfc9271 Please star NUT on GitHub, this helps with sponsorships!
https://networkupstools.org/
Other
1.73k stars 335 forks source link

Expose values via Modbus TCP #1857

Open ck-coke opened 1 year ago

ck-coke commented 1 year ago

Hi,

is it possible to expose UPS values either via NUT or mbusd as Modbus TCP server? In parallel to phoenixcontact_modbus - Driver for Phoenix Contact.

BR

jimklimov commented 1 year ago

I don't think this was pursued in NUT core, but can be done as a separate client looping like upsmon to ask for data and publishing a different protocol, or even pass back commands (if NUT auth is taken care of). I believe somebody hacked MQTT scripts as a PoC. There are several bindings (C, C++, Python, Perl in-tree, jNut now separately, etc.) of varied completeness for NUT protocol you might use. I guess a C client could be welcome as a PR to maintain in-core.