Closed HaoXuanSachi closed 1 year ago
Hi @HaoXuanSachi, thanks for your question. You have lost some required parameters. Configure your Modbus Connector as in the following example:
{
"master": {
"slaves": [
{
"type": "serial",
"method": "rtu",
"port": "/dev/cu.wchusbserial110",
"baudrate": 9600,
"timeout": 35,
"stopbits": 1,
"bytesize": 8,
"byteOrder": "BIG",
"wordOrder": "BIG",
"retries": true,
"retryOnEmpty": true,
"retryOnInvalid": true,
"pollPeriod": 5000,
"unitId": 2,
"deviceName": "Modbus Temperature Sensor",
"attributesPollPeriod": 5000,
"timeseriesPollPeriod": 5000,
"sendDataOnlyOnChange": false,
"connectAttemptTimeMs": 5000,
"connectAttemptCount": 5,
"waitAfterFailedAttemptsMs": 300000,
"attributes": [
],
"timeseries": [
{
"tag": "temperature",
"type": "16uint",
"functionCode": 4,
"objectsCount": 1,
"address": 1
},
{
"tag": "humidity",
"type": "16uint",
"functionCode": 4,
"objectsCount": 1,
"address": 2
}
],
"attributeUpdates": [
],
"rpc": [
]
}
]
}
}
Hi @HaoXuanSachi, any updates?
HI thanks you a lot. It can work when i change [service device] to [master slaves]. But i still unknow what different about this two. It still cna't work when i change [master slaves] to [service device] in same format. Are there have different format?
Hi @HaoXuanSachi, read, please, the official documentation.
thank you a lot. i know what happend in my yaml. thank you.
Component
Description Thingsboard-gateway can't connect to Modbus RTU device
Environment
I got a problam in thingsboard-gateway that it cna't connect to device by Modbus RTU. I'm sure it can use app connect device and get respond in the same machine.
Here is connector.log and modbus_serial.json connector.log--
modbus_serial.json--
I'm not sure there have any problam in my setting gateway status--