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

[BUG] Do we have to send sensor connection requests from the gateway to connect between different gateway and sensor connected to another gateway?

Open gohm-tech opened this issue 4 years ago • 5 comments

We are working on RPC capabilities.

  • Firstly the sensor sent sensor data via MQTT connector using /sensor_data topic. (The sensor has never used connectRequests.)
  • We can see this sensor data on the Thingsboard dashboard.
  • We send a rpc_two_way from swagger.
  • Incoming RPC for the sensor received to the MQTT connector. (There is no problem so far.)
  • The same sensor sent the sensor data from a different gateway without sending connecRequests before that.
  • We send a rpc_two_way from swagger for the same sensor.
  • Incoming RPC for the sensor received from the first gateway

How The second gateway can receive this incoming RPC?

Client Environment OS: Linux(Ubuntu) Browser: Chrome, Firefox Version Ubuntu Version 20.04

Connector name MQTT Connector

Configuration mqtt.txt

Versions: OS: Raspbian GNU/Linux 10 (buster) Thingsboard IoT Gateway version [e.g. 2.7] Python version 3.7.3

Best Regards, Gohm Team

gohm-tech avatar Dec 23 '21 13:12 gohm-tech

Hi @zbeacon,

We think we don't need to send connectRequests. Screenshot from 2021-12-23 16-47-33

Best Regards, Gohm Team

gohm-tech avatar Dec 23 '21 13:12 gohm-tech

Hi @gohm-tech ,

Actually the gateway sends connect request on the very first message with telemetry/attributes from device. Connect request in your case is not required, it was developed for case when you want to create the device and process it on ThingsBoard, but the data will be sent later. In order to solve the issue with RPC we have to change the logic in ThingsBoard. Because at the moment ThingsBoard sends RPC to the gateway, that created the device, not to the latest connected gateway.

imbeacon avatar Dec 28 '21 08:12 imbeacon

In order to send RPC to another gateway - Please try to send disconnect request to old gateway and connect to the new one, then device session will be assigned to the new gateway.

imbeacon avatar Dec 28 '21 10:12 imbeacon

Hi @zbeacon, Thanks for your interest. If the first gateway is not working and The device connects to the second gateway, We can not send a disconnect request from the first gateway. We tried to send a disconnect request using mosquito_pub, But it is not working.

So How can we do that from another device (computer or server) as if sending the first gateway disconnect message? Can we do that using python rest apı? Screenshot from 2021-12-31 09-25-38 Screenshot from 2021-12-31 09-23-51

Any work on this issue? When will you solve this issue? Best Regards, Gohm Team

gohm-tech avatar Dec 31 '21 05:12 gohm-tech

Hi @zbeacon,

Is there any progress to solve this problem?

Best Regards, Gohm Team

gohm-tech avatar Feb 17 '22 14:02 gohm-tech