Data to server Mqtt

i have modbus tcp data 2 address
i mapping data on mpdbus tcp master use Temp and RSSI
i want to send data by mqtt this is my json format
{“Timestamp”:“%d”,Temp:“%a”,RSSI:“%a”} filter by slave ip
subscription data
{“Timestamp”:“25/09/2023 11:52:54”,Temp:“-52”,RSSI:“-52”}
{“Timestamp”:“25/09/2023 11:52:54”,Temp:“380”,RSSI:“380”}

How to config json data if i want data as below
{“Timestamp”:“25/09/2023 11:52:54”,Temp:“380”,RSSI:“-52”}


In this case, you will need to create two Data to Server instances with different filtering options. For example, these are the Modbus requests I will use for this example:

So each Data to Server instance should look like so:

An alternative could be to use the Modbus Master request name in the Data to Server template:


And the sent messages will look like so:

[{"Timestamp":"25/09/2023 08:40:29","rssi":"[-49]"}]
[{"Timestamp":"25/09/2023 08:40:29","temp":"[310]"}]

In this case, no filtering will be needed.
Segment count can be set to all, to receive all of the strings in a single MQTT message.
Hope this helps!

Best regards,

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