thingsboard-gateway icon indicating copy to clipboard operation
thingsboard-gateway copied to clipboard

[HELP] Modbus RPC calls are not synchronized with timeseries polling – causes device communication failure

Open szdavid0504 opened this issue 6 months ago • 1 comments

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

szdavid0504 avatar Jun 20 '25 13:06 szdavid0504

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.

samson0v avatar Jul 18 '25 16:07 samson0v