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.