RUTX50 with external node-red (Modbus/ MQTT)

I startet to get the dates from my RUTX50 to external Cerbo-GX with node-red.
with the following description:

I´m using node-red as a mqtt-brooker

  1. Modbus-Server (local RUTX50):

  1. Modbus-TCPClient (local RUTX50)

Test Register o.K.:

  1. Modbus-Gateway ( = Cerbo GX with MQTT-Broker)

  1. MQTT from node-red is o.K., I get with “0 65432 0 502 5 1 3 6 2”
    the temperature 58°C

  1. Data to Server → HERE seens to be the problem, the new firmware is completely different to the example:

No dates will be sent from Modbus to the external MQTT-Broker !
How do UI have to configure the part “Data to Server” ?

Thank you all

Hello ak68,

I see you are having issues with the “Data to Server” functionality using MQTT.

I can help provide an example configuration.

Creating a fresh connection:

Data Config:

Collection Config:

Server Config:

I will note again here it is important that you use the same topic on both the Server Config portion here & on your MQTT Broker. If you do not have the same topic it will not send any data.

And if you are specifically looking for date/timestamp info you will need to change the Format string in the Data config section (above example includes %timestamp% & %date%).

Also, I noticed that you had setup and used a configuration with the MQTT-Gateway. To clarify, that is not needed if you only want to use the ‘Data to Server’ functionality.

The ‘MQTT Modbus Gateway’ is another, different way to establish a MQTT connection. That you could then use to transfer data using the MQTT protocol.

On the link you provided, if you want to use Node-Red as your Broker via MQTT-Broker I would follow section 4.3

Otherwise you could follow the steps I posted above, as they are updated for section 5 in the same article and you already have the Modbus TCP Server/Client configured already.

Either the MQTT-Gateway OR the Data to Server method are fine ways to collect and transfer data via the MQTT protocol.

There are just use-case differences depending on what you require.

The ‘Data to Server’ I would recommend more if you wish to have data collected from your router and sent at regular intervals to your broker.
Since the example sets the RUTX50 up as its own modbus server/client.

The MQTT-Gateway I would recommend if you need a constant connection, where you get immediate/constant updates that can be polled from other subscribers/publishers.

Please let me know if you have any follow up questions.

1 Like

This topic was automatically closed after 15 days. New replies are no longer allowed.