Hello,
Hardware: RUT956
Firmware version: RUT9M_R_00.07.14.3
I’m trying to integrate a Teltonika RUT956 with ThingsBoard using Modbus TCP and MQTT for bidirectional communication.
What I’ve tried:
I found the following JSON example in the community, now i’ m intended to switch a relay (integrated in router) ON/OFF via MQTT (tested with MQTT Explorer):
{
"cookie": 65432,
"type": 0,
"host": "192.168.1.1",
"port": 502,
"timeout": 5,
"server_id": 1,
"function": 6,
"register_number": 203,
"value": 1
}
However, I get the following error response from the router:
{
"cookie": 65432,
"success": false,
"error": "Missing field 'type'"
}
My scope:
Integration with Thingsboard:
The “Gateway” implementation in ThingsBoard doesn’t work, as Docker Compose is not supported on this device.
The “Integration” option is only available in the PE, which is not suitable in my case.
The only viable solution I found is to add the RUT956 as a “Device” in ThingsBoard and use Rule Chains to handle communication.
Problem:
Using internal MQTT on ThingsBoard, I can only send messages in JSON format, not ASCII. Unfortunately, I couldn’t find clear documentation or working examples on how to correctly structure the JSON payload to interact with the Modbus MQTT Gateway on the RUT956.
Could anyone help me with a working JSON example or suggest how to resolve this issue with MQTT and Modbus JSON formatting?
Any help or direction would be greatly appreciated.
Thanks in advance!