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.72k stars 829 forks source link

[HELP] Modbus server that only supports one thread but has multiple devices. #473

Closed gzlz closed 2 years ago

gzlz commented 3 years ago

My Modbus server only supports one thread but has multiple devices. For that only the first device telemetry is showed in thingsboard. I would like to know if is possible to configure the modbus.json file in a way that force the gateway to do the devices requests one by one, only in one thread.

Thank you!

modbus.json.txt

Versions: -The gateway is running over the latest docker installation in a raspberry pi. -The server is a Ubuntu Server 20.04.1 LTS]

Pawol85 commented 3 years ago

I have the same problem (BUG?)

samson0v commented 2 years ago

Hi @gzlz, it seems from your config file that you are using the same unitId for different devices photo_2021-11-10 11 18 41

Thanks for your interest in ThingsBoard IoT Gateway!

samson0v commented 2 years ago

Hi @gzlz and @Pawol85, we remake the Modbus connector, so you can try and test it (using the version from the master branch)! Pay attention, that there is a new config file for Modbus, to use it, you have to run Gateway with the old config file for Modbus and Gateway generate a new config file that will be named as "new_modbus.json" in the config/ folder. And finally, in the tb_gateway.yml config file use the new Modbus config file.

If you have some questions, feel free to ask them!

samson0v commented 2 years ago

Hi @gzlz and @Pawol85, did you try the new version of Modbus Connector, can we close the issue?