HTTP API Rest Controller POST `/api/plugins/rpc/oneway/{deviceId}` RPC calls do not reach the gateway

倖福魔咒の 提交于 2019-12-11 06:05:36

问题


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?

Doc ref:

 * 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 version: 2.2.0 release or 2.2.1-SNAPSHOT

Gateway version: 2.2.1-SNAPSHOT


回答1:


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.



来源:https://stackoverflow.com/questions/54345945/http-api-rest-controller-post-api-plugins-rpc-oneway-deviceid-rpc-calls-do

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!