subscribe to our Youtube


14455 questions

17168 answers


0 members

We are migrating to our new platform at Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
211 views 3 comments
by anonymous

We use multiple TRB245 routers to forward data from Modbus sensors to our backend server, using the Data To Server function to convert the Modbus data to a JSON string.

I just noticed that in the latest production firmware (TRB2_R_00.07.03.4) the function of the %z variable in the JSON Format string has changed slightly. But this change has a big impact on our use of the router.

We use the following JSON Format string:

{"Hardware": "TRB245", "Serial": "0000001234567890", "Timestamp": "%t", "DateTime": "%d", "MODBUS slave ID": %i,"Start register":%z, "data": %a}

When I read Input register 1 using the Modbus Serial Master function, in firmware TRB2_R_00.07.02.7 this was send as "Start register": 300001
But in firmware TRB2_R_00.07.03.4 it is now send as "Start register": 300000

I can't find this change in the firmware Changelog

Is there a way to configure Data To Server to keep using the old 1 > 300001 conversion?

1 Answer

0 votes
by anonymous

I've tested your setup on v7.2.7 and received start register 400006. Then I upgraded to the latest version (v7.4.1) and the messages stayed the same. Are you sure you haven't changed the variables?

EDIT: The issue was fixed in v7.4 release.

Best regards,
Best answer
by anonymous
Yes, I'm sure. The JSON format string is copy pasted from the old installation running 7.02.7. Only the Serial number was changed, because that is what our backend is using to determine what installation the data is from.

I didn't do an upgrade from an existing installation. The 7.03.4 firmware is on a new installation.

I will try the 7.04.1 firmware on a test system to see if that fixes it. The changelog for 7.04 does mention fixes to other variables, but not %z: "Fixed Data To Server JSON format %n, %N and %s flag issues"

That is why I asked this question. If this change is reverted in 7.04 it should be mentioned in the changelog, so other people who are running the production firmware (7.03.4) know that they may need to upgrade.
by anonymous

Let me know if everything is as expected in v7.4.1.

Best regards,
by anonymous

After some testing I can confirm that the %z bug was introduced in firmware 7.03 and fixed in firmware 7.04.

{"Hardware": "TRB245", "Firmware": "TRB2_R_00.07.02.1", "Timestamp": "1680202410", "DateTime": "30/03/2023 20:53:30", "MODBUS slave ID": 1,"Start register":400001, "data": [768,-30971,12580,1024,512,3612]}

{"Hardware": "TRB245", "Firmware": "TRB2_R_00.07.02.7", "Timestamp": "1680203609", "DateTime": "30/03/2023 21:13:29", "MODBUS slave ID": 1,"Start register":400001, "data": [768,-30971,12580,1024,512,3612]}

{"Hardware": "TRB245", "Firmware": "TRB2_R_00.07.03", "Timestamp": "1680259434", "DateTime": "31/03/2023 10:43:54", "MODBUS slave ID": 1,"Start register":400000, "data": [768,-30971,12580,1024,512,3612]}

{"Hardware": "TRB245", "Firmware": "TRB2_R_00.07.03.4", "Timestamp": "1680204134", "DateTime": "30/03/2023 21:22:14", "MODBUS slave ID": 1,"Start register":400000, "data": [768,-30971,12580,1024,512,3612]}

{"Hardware": "TRB245", "Firmware": "TRB2_R_00.07.04", "Timestamp": "1680204551", "DateTime": "30/03/2023 21:29:11", "MODBUS slave ID": 1,"Start register":400001, "data": [768,-30971,12580,1024,512,3612]}

{"Hardware": "TRB245", "Firmware": "TRB2_R_00.07.04.1", "Timestamp": "1680205034", "DateTime": "30/03/2023 21:37:14", "MODBUS slave ID": 1,"Start register":400001, "data": [768,-30971,12580,1024,512,3612]}

Can you update the firmware changelog so other users on firmware 7.03 - 7.03.4 who run into this problem will know they have to upgrade?
For example add %z to the "Fixed Data To Server JSON format %n, %N and %s flag issues" line.