4792 questions

5860 answers

9403 comments

5726 members

+6 votes
206 views 2 comments
by

Good day.

We used RUT955 to poll devices over modbus RTU.

We are using Modbus Data to Server:

Protocol MQTT;

JSON format:

{"SN": 1107200047, "ID":% i, "TS":% t, "ST":% s, "VR":% a}.

On the server, I get JSON:

[{"SN": 1107200047, "ID": 8, "TS": 1596718701, "ST": 1, "VR": [24919, 19393, -24003, 7600, 17806, 24857, 13610, 24392, 11680, -571, 17907, 31944, 3356, 10952, 26459, -9403, 16315, 24041, 15660, 24105, 16329, -20751, 18409, 15541, -2364, -6468, -8539, 11932, 15065, 13828, -31655 , -27738, 13359, 12709, 17541, 16482, 19225, -9221, 13421, 17731, 31925, 353, 682, -25504, 16055, 6373, 16286, 13630, 16310, 16033, -4869, -31953, -19303 , 20379, 4357, 7939, 813, 18503, 16142, 14510, 15405, 16181, 2569, -29531, 10112, 11614, 27325, 19325, 6860, -29728, 26085, 20483, 16334, -12739, 16334, 17174, 16298, -30482, -1024, 16330, 1110, -29080, -13890, 32428, 12454, 14446, -11952, -21563, 27908, -535, 30083, -7998, 11726, -8050, 3783, 24232, 24831 , 20759, 987, -10866, 16288, -8146, 15637, 9770, 15968, 22756, 6836, 29536, -13049, 31347, 11055, 23793, 13820, 23956,]}]

An error occurs while validating the JSON:

Error: Parse error on line 6:

... 3793, 13820, 23956,]}, {"SN": 110720

----------------------- ^

Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got ']'

There is an extra comma after the last register value.

JSON does not meet the requirements standard RFC 8259 and STD 90.

Please correct.

Thank you in advance.

1 Answer

0 votes
by
Hello,

May I ask which FW version you are using?
by
This error present on current Firmware version RUT9XX_R_00.06.06.

It appeared in version where Modbus Serial Master request interval changed from minutes to seconds. As I remember it was RUT9XX_R_00.06.04.

In closed beta version RUT9XX_T_F1607_00.06.04.474_WEBUI.bin  (which we got by private communication with teltonika specialists) JSON was correct, but in first public release this problem appeared.
by
I have tried to replicate the issue you are having and everything seemed to work fine. So either I did not configure my device the way you did or there is an issue on your side. The other difference is that I used the latest 6.06.1 FW version, please try installing that and check whether that helps.

I have also noticed that you used a space in your JSON format at a place that is should not be. Here is how it should look like: {"SN": 1107200047, "ID":%i, "TS":%t, "ST":%s, "VR":%a} or {"SN": 1107200047, "ID":"%i", "TS":"%t", "ST":"%s", "VR":"%a"}.

If these suggestions did not help, please send me a troubleshoot file from your router. You can find it at SYSTEM > ADMINISTRATION > TROUBLESHOOT section.