emelianov / modbus-esp8266

Most complete Modbus library for Arduino. A library that allows your Arduino board to communicate via Modbus protocol, acting as a master, slave or both. Supports network transport (Modbus TCP) and Serial line/RS-485 (Modbus RTU). Supports Modbus TCP Security for ESP8266/ESP32.
Other
534 stars 190 forks source link

Is it possible to build a modbus rtu gateway/multiplexer? #304

Closed tobox closed 6 months ago

tobox commented 1 year ago

In several installations, there are several modbus masters that want to read the main power meter, e.g. electric car charger, heat pump, solar inverter, battery inverter... My electrician says I need separate modbus meters for each modbus master.

Would it be possible with this library to build a device with several modbus client ports, that would forward the requests over a single modbus server port to a physical modbus meter (and then send the responses back to the originating port)?

emelianov commented 1 year ago

Sure. The library instances on single device is limited just by hardware. There is examples on how to build bridges.