Hello, I’m using a RUT 956 with firmware RUT9M_R_00.07.09.4 and trying to use the Data to Server functionality to capture some sensor data coming from a Modbus RTU Server/Slave on the RS485 and post it on a HTTP server.
I think I have it all working, but on the server I receive the same reading over and over, even the timestamp is the same. The reading only eventually updates once after a couple of hours or when rebooting the device. If I disable the collection, or change any value on the data inputs of the collection, the changes are reflected on the JSON received by the HTTP server, but the “measurements” stay the same (same sensor readings, same timestamps, etc).
Another problem I have is that I didn’t find a way to send 2 different values coming from the same sensor. On the Modbus Client configuration, I’ve checked with the Test button and both requests are activated and working correctly, but the JSON sent to the server seems to only include the last enabled request on the list for a specific device.
I think this might be a bug, or maybe a broken database that needs to be reset, perhaps a concurrency problem on the communication via the RS485? If someone knows what it might be, or need additional details, please let me know.
First, I’d suggest updating the device’s RutOS firmware to the latest 7.13.3 (if feasible, preferably with the “Keep settings” option unchecked, which will reset/delete all configurations after the update).
Secondly, to prevent the same data from being sent repeatedly to the server, please ensure that the “Store on change only” option is enabled in the Modbus Serial Client’s requests configuration section:
Regarding sending two different register values from the same Modbus server, it is indeed possible and should work as intended. Could you provide screenshots of your Modbus Serial Client and Data to Server configuration windows to understand your current setup better?
Hello Martynas, thank you for taking the time to answer. That “Store on change only” looks like a really nice feature! Will take note for future endeavors. For now we are planning on keeping the firmware that came with the device.
We’ve manage to solve this issue, the problem was a lack of a 200 response code from our server, but it was quite hard to debug because of the not so obvious way the read values are stored on the device. Maybe worth considering adding an option to for example automatically discard the message when sent, regardless of the server response, or even a simple database clear, instead of always storing all the received messages from the modbus.
In any case, we later opted to read the modbus directly through the ubus interface instead and pack it on our own compiled application inside of the RUT956.