HTTP API Rest Controller POST`/api/plugins/rpc/oneway/{deviceId}`RPC调用未到达网关 [英] HTTP API Rest Controller POST `/api/plugins/rpc/oneway/{deviceId}` RPC calls do not reach the gateway
问题描述
当前,我通过网关设备的令牌使Thingsboard和Thingsboard-gateway一起运行,我可以通过Thingsboard UI同步扩展,并通过Thingsboard中的Thingsboard-gateway生成新设备.我遇到的问题是,HTTP API Rest Controller POST /api/plugins/rpc/oneway/{deviceId}
在服务器端进行的rpc调用仅将消息发布在主题v1/devices/me/rpc/request/+
中,并且对于服务器端v1/gateway/rpc
主题,但看不到任何似乎是Thingsboard错误的消息.
有人知道会发生什么吗?
Currently, I have Thingsboard and Thingsboard-gateway running together through the token of the gateway device, I can synchronize extensions via Thingsboard UI and generate new devices through the Thingsboard-gateway in Thingsboard. The problem I have is that rpc calls on the server side by HTTP API Rest Controller POST /api/plugins/rpc/oneway/{deviceId}
only post the message in the topic v1/devices/me/rpc/request/+
and they do not reach the Thingsboard-gateway topic for rpc calls on the server side v1/gateway/rpc
. I have tried to subscribe to the v1/gateway/rpc
topic and I could not see any messages for what seems to be a Thingsboard error.
Does anyone know what may be happening?
文档参考:
* * https://thingsboard.io/docs/user-guide/rpc/
* * https://thingsboard.io/docs /iot-gateway/mqtt/#server-side-rpc-commands
* * https://thingsboard.io/docs/reference/mqtt -api/#rpc-api
* * https://thingsboard.io/docs /reference/gateway-mqtt-api/#server-side-rpc
Thingsboard版本:2.2.0发行版或2.2.1-SNAPSHOT
Thingsboard version: 2.2.0 release or 2.2.1-SNAPSHOT
网关版本:2.2.1-快照
Gateway version: 2.2.1-SNAPSHOT
推荐答案
问题是网关未将主题v1/gateway/connect"
中每个设备的连接消息报告给Thingsboard.因此,当Thingsboard希望将RPC调用发送到网关时,Rpc调用没有到达网关.
因此,有必要通过网关连接每个设备,以便从Thingsboard侧面进行Rpc调用.
The problem was that the gateway did not report the connection message of each device to Thingsboard in topic v1/gateway/connect"
. So, when thingsboard wanted to send the RPC call to gateway, the Rpc Call didn't reach the gateway.
Therefore, it is necessary that each device is connected through the gateway so that the Rpc call from the side of the Thingsboard works.
这篇关于HTTP API Rest Controller POST`/api/plugins/rpc/oneway/{deviceId}`RPC调用未到达网关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!