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

[HELP] IoT Gateway as modbus slave to send TS data to PLC #1381

Closed ezitechthj closed 5 months ago

ezitechthj commented 6 months ago

Describe the issue I collect data via LoRAWAN in to Thingsboard. I need to send the same data to a PLC based on the customers network. Was thinking IoT Gateway in modbus slave mode and writing to the slave registers from Thingsboard via RPC for the PLC to read. Is this possible ? (have used IoT gateway as modbus master for collecting PLC data, but not as slave for PLC to collect data from me)

Configuration (Attach your configuration file) Notate: Remove Access token from file if you want to attach a tb_gateway.yaml Will be a new gateway install - ideallt Raspberry Pi and Ubuntu

Connector name (If you need help with some connector/converter): [e.g. MQTT Connector]

Error traceback (If it was raised):

'deviceName'
Traceback (most recent call last):
  File "<input>", line 2, in <module>
KeyError: 'deviceName'

Versions (please complete the following information):

imbeacon commented 6 months ago

Hi @ezitechthj,

Thank you for your interest in ThingsBoard IoT gateway. According to your question - yes, it is possible to use a gateway as a slave and send a data to it over RPC or shared attributes, you just need to configure the connector to act as a sale and two sections (timeseries and attributeUpdates/rpc). I registers section that you need.