[HELP] Modbus RPC calls are not synchronized with timeseries polling – causes device communication failure
Describe the issue We are using ThingsBoard Gateway to periodically read data from a Modbus/TCP device.
- Some of the registers must be polled regularly, so we configured them under the "timeseries" section of our Modbus connector.
- Other registers are needed only at varying intervals, so we configured them under the "rpc" section, and we trigger these RPC requests via a RuleChain on our local Edge instance.
We’ve noticed that RPC calls are executed immediately, even if a timeseries polling request is already ongoing. Our Modbus device cannot handle concurrent requests properly. When multiple requests are sent before the device can respond, it only answers the last one and ignores the rest.
Question: Is there a way to configure the ThingsBoard Gateway (or the Modbus connector specifically) so that RPC calls are queued or scheduled after any ongoing request has completed? In other words, can we enforce that only one Modbus request is in progress at any given time — whether it’s from timeseries polling or an RPC — to avoid overlapping requests?
We’re looking for a solution that enforces sequential execution (priority or locking mechanism) between the connector’s polling and RPC logic.
Connector name (If you need help with some connector/converter): Modbus TCP connector
Versions:
- OS: Ubuntu 20.04
- Thingsboard IoT Gateway version 3.6.4
Hi @szdavid0504, thanks for your interest in ThingsBoard IoT Gateway! and sorry for the late response We will discuss your problem and decide what to do about it. Also, after that, we will offer you a solution for consideration, to see whether it will suit you. We will also be very happy to hear your ideas on this issue.