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 827 forks source link

Assistance Needed with Modbus Connection Configuration (v.3.7.0PE) #1474

Open xtaveira opened 1 month ago

xtaveira commented 1 month ago

Dear Thingsboard Team and Users,

I hope this Issue finds you well. I'm reaching out to request your assistance with an issue I'm encountering while configuring a Modbus connection in the ThingsBoard platform.

I'm currently working on a project that involves the use of a Modbus gateway, and I'm facing difficulties configuring the Modbus connection in ThingsBoard. Specifically, I'm trying to set up a single Modbus slave to receive data from multiple different devices. However, according to the ThingsBoard documentation, when configuring a Modbus connection slave, it seems that only a single device can be created.

To provide further clarification, according to the documentation, the JSON configuration for the slave looks something like this:

 slaves: [{    host: ip,    port: port,    deviceName: device_name
}]

However, in my scenario, I believe I would need something more like this:

slaves: [{    host: ip,    port: port,    devices: [list_of_devices]}]

I'm looking to understand how I can properly configure the Modbus connection in ThingsBoard to accommodate this setup, where a single slave receives data from multiple distinct devices.

Additionally, I would like to mention that I will be attaching some images illustrating the construction of the slave to provide further context.

this one doesn't work image

this one works but just let me to use a single device for each port image

I would greatly appreciate your guidance on how to configure this connection properly in the ThingsBoard platform. If there are any tutorials or additional documentation that could assist me with this, I would be very grateful if you could share them with me.

Thank you in advance for your attention and support in this matter.

@ikulikov Please help me if you can :D, would be amazing

Best regards

xtaveira commented 1 month ago

@samson0v :D