thingsboard / thingsboard-gateway

Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
https://thingsboard.io/docs/iot-gateway/what-is-iot-gateway/
Apache License 2.0
1.75k stars 845 forks source link

[HELP] Gateway not reconnecting to Modbus device after disconnection #829

Closed jessedcpc closed 2 years ago

jessedcpc commented 2 years ago

Describe the issue Upon loss of connection with my Modbus device, TB Gateway requires a restart to start communicating again

Configuration modbus.json.txt tb_gateway.yaml.txt

Connector name: Modbus Connector

Versions:

samson0v commented 2 years ago

Hi @jessedcpc, you have to add the next parameters to your device configuration:

"connectAttemptTimeMs": 5000,
"connectAttemptCount": 5,
"waitAfterFailedAttemptsMs": 300000,
"retries": true,
"retryOnEmpty": true,
"retryOnInvalid": true,
samson0v commented 2 years ago

Also, it is recommended to update your Gateway to the newest version (3.1) via the master branch or other suitable for you way. Modbus Connector was remastered and fixed a lot of bugs in the new version.

samson0v commented 2 years ago

Hi @jessedcpc, any updates? Can we close the issue?

samson0v commented 2 years ago

Hi @jessedcpc, can we close the issue?