To improve the user experience on this site we use cookies. I agree | I disagree

How to convert Modbus-RTU into MQTT

In category Routers .

 For converting Modbus-RTU data into MQTT, the following Router-Apps are required:



• “Modbus to MQTT”: o

• “MQTT Broker” - OPTIONAL: o

This setup is available for all v2 and v3 routers that are equipped with the serial port interface.




Reading Modbus serial data via Router-App “MODBUS-RTUMAP”

The Router-App “MODBUS-RTUMAP” converts serial protocol Modbus RTU from different Modbus slaves (up to 10) and is mapping their data to one Modbus TCP connection.

The serial data are being forwarded to the localhost IP address ( on port 502 and internal register 40000 (this can be modified).

 Example configuration:


Reading Modbus-TCP data via Router-App “Modbus to MQTT”

The Router-App “Modbus to MQTT” is reading the register 40000 on IP-address and forwarding it to the MQTT Broker, which can be external or internal on the device itself (see point 3).

Example configuration:


Example CSV configuration:

Topic,Name,IP,Port,Device ID,Function Code,Address,Data Length,Modbus Data type,Data Swap,Byte Swap,MQTT Data Type,Multiplier,Offset,Polling Interval,Send When Change,Custom Field



MQTT Broker (optional)

If there is no external/central MQTT-Broker available, it can also run on the device itself, by the use of the Router-App “MQTT Broker”.

Example configuration:


To the FAQ overview