Hello,
This information is currently in the process of being updated on Teltonika Networks Wiki. I think it will be available soon. For MQTT JSON format is like this:Read uptime from Modbus TCP Server (using tcp)
Request:
{
“cookie”: 65432,
“type”: 0,
“host”: “192.168.1.1”,
“port”: 502,
“timeout”: 1,
“server_id”: 1,
“function”: 3,
“register_number”: 2,
“register_count”: 2
}
Response:
{
“cookie”: 65432,
“success”: true,
“data”: [0, 5590]
}
Read uptime from Modbus RTUServer (using serial)
Request:
{
“cookie”: 65432,
“type”: 1,
“device_id”: “my_serial_device”,
“timeout”: 1,
“server_id”: 1,
“function”: 3,
“register_number”: 2,
“register_count”: 2
}
Response:
{
“cookie”: 65432,
“success”: true,
“data”: [0, 5590]
}
Read coils from server
Request:
{
“cookie”: 65432,
“type”: 0,
“host”: “192.168.1.1”,
“port”: 502,
“timeout”: 1,
“server_id”: 1,
“function”: 1,
“coil_number”: 2,
“coil_count”: 2
}
Response:
{
“cookie”: 65432,
“success”: true,
“data”: [0, 1]
}
Write multiple registers to server
Request:
{
“cookie”: 65432,
“type”: 0,
“host”: “192.168.1.1”,
“port”: 502,
“timeout”: 1,
“server_id”: 1,
“function”: 16,
“register_number”: 2,
“values”: [1, 2, 3]
}
Response:
{
“cookie”: 65432,
“success”: true
}