10856 questions

12933 answers


25432 members

0 votes
203 views 1 comments
When i try to send data to the azure IoT hub using IoThub monitoring but the string that is send arrives with added string parts. Before every  "  a \ is added. Secondly before the whole string the term " " value" "  is added as if the data as a whole is a json object where the data itself is the json string already. Because of this the iothub does not interpret the data properly and has to arrive properly. It' s not an option for us to change the incoming data from the hub side. An example of incoming data in azure:


"value": "{\"timestamp\":\"2020-05-25-T04:10:54.624Z\",\"sensors\":[{\"sensor\":\"s_temperatuurBuitenlucht\",\"unit\":\"mA\",\"value\":0,\"timestamp\":\"2020-05-25-T04:10:54.624Z\"},{\"sensor\":\"s_luchtvochtigheid\",\"unit\":\"mA\",\"value\":0,\"timestamp\":\"2020-05-25-T04:10:54.624Z\"}]}


This is the string we send:


In the first example the data:[{ part is from the hub side. Is there any way for the data to arrive like the second example? The router adds those characters and treats the string as an object of value but just needs to forward the data literally.

Router: RUT955

Firmware: RUT9XX_R_00.06.06.1

Kind regards,

Lex van Vugt

1 Answer

0 votes

Please send me a troubleshoot file from your device via private message.

It can be found in SYSTEM > ADMINISTRATION > TROUBLESHOOT section.


Hi Justin,

has this item been fixed? I have a similar issue. The JSON string from RUT955 "Modbus data sender" contains a lot of garbage from a previous modbus serial master configuration. See below, only the part in BOLD should arrive at Azure IoT Hub, the rest of the data is old and stuck. Since it forms invalid JSON this way we cannot interpret the data in the cloud.

It seems like the send buffer (%a string) is not cleared before a new MQTT message is composed.


[{"ID":"5", "TS":"1616505154","ST":"1001","VR": 223.500000,224.070007]}]0.800003,50.000000,-53.910000,-59.520000,-41.320000,-0.000000,-10.333900,-3.401700,-8.505600,0.000000,-6.148100,-13.146700,-4.312400,0.000000]}]]10.549600,11.442900,0.000000,0.580100,0.281200,0.991300,1.000000,21.700001,391.145721,398.754181,393.044281,160.490005,22.697201,23.405600,36.451099,0.622675]}]4665]}]]