I have upgraded my RUT956 device, but even then, the MQTT data frame order keeps changing, as I mentioned in the previous ticket.
I have two Modbus slaves, and I am reading data from the starting address 0 with a length of 10.
Modbus Slave 1 contains the values: 1,2,3,4,5,6,7,8,9,10
Modbus Slave 2 contains the values: 11,22,33,44,55,66,77,88,99,100
After turning the device off and on, I am receiving the following MQTT data frame on my server (img-1):
{“All_Modbus_data”: [[11,22,33,44,55,66,77,88,99,100], [1,2,3,4,5,6,7,8,9,10]]}
However, if I turn the hardware off and on again, the data frame changes (img-2):
JSON Data (Frame changed again):
{“All_Modbus_data”: [[1,2,3,4,5,6,7,8,9,10], [11,22,33,44,55,66,77,88,99,100]]}
Additionally, if any of the Modbus slaves disconnects, the data frame also changes.
For example, when I disconnect Modbus Slave 2, I expected its data to either become zero or be removed from the frame. However, in both cases, the JSON array contains only the Modbus Slave 1 data.
Example (img-3) when Modbus Slave 2 is disconnected:
{“All_Modbus_data”: [[1,2,3,4,5,6,7,8,9,10], [1,2,3,4,5,6,7,8,9,10]]}
This issue causes inconsistency in the MQTT data frame order and handling of disconnected slaves.