You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm trying to send RPC in the following way "TB CE (RPC Button)" -> "TB IoT Gateway" -> "MQTT Broker" -> "Device". Unfortunately when I click the RPC button on my TB dashboard the command is not executed. TB IoT Gateway gets it but the 'id' of the RPC request is weird and triggeres error. As you can see in the traceback.
I see some changes made here: #1201
This is config of my RPC button on dashboard: { "method": "no-reply", "params": { "message": "Hello" } }
Hi @KubaDavid, thanks for your interest in ThingsBoard IoT Gateway!
Your connector can't connect to your MQTT broker because you run Gateway via the docker container.
You can add --network=host when you start your container.
Describe the bug
I'm trying to send RPC in the following way "TB CE (RPC Button)" -> "TB IoT Gateway" -> "MQTT Broker" -> "Device". Unfortunately when I click the RPC button on my TB dashboard the command is not executed. TB IoT Gateway gets it but the 'id' of the RPC request is weird and triggeres error. As you can see in the traceback.
I see some changes made here: #1201
This is config of my RPC button on dashboard:
{ "method": "no-reply", "params": { "message": "Hello" } }
This is the IoT Gateways config:
{ "broker": { "name": "MQTT Broker TBMQ", "host": "127.0.0.1", "port": 1883, "clientId": "test-gateway", "version": 5, "security": { "type": "basic", "username": "user", "password": "pass" } }, "mapping": [ { "topicFilter": "platform/city/asset/+/data", "converter": { "type": "json", "deviceNameTopicExpression": "(?<=asset/)(.*?)(?=/data)", "deviceTypeTopicExpression": "asset", "timeout": 60000, "attributes": [ { "type": "string", "key": "model", "value": "Enceladus" } ], "timeseries": [ { "type": "bool", "key": "Q1", "value": "${Q1}" }, { "type": "bool", "key": "Q2", "value": "${Q2}" }, { "type": "bool", "key": "Q3", "value": "${Q3}" }, { "type": "bool", "key": "Q4", "value": "${Q4}" }, { "type": "bool", "key": "I1", "value": "${I1}" }, { "type": "bool", "key": "I2", "value": "${I2}" }, { "type": "bool", "key": "I3", "value": "${I3}" }, { "type": "int", "key": "B015", "value": "${B015}" }, { "type": "int", "key": "B197", "value": "${B197}" }, { "type": "int", "key": "Signal", "value": "${Signal}" } ] } } ], "connectRequests": [ { "topicFilter": "platform/city/asset/+/connect", "deviceNameTopicExpression": "(?<=sensor/)(.*?)(?=/connect)" } ], "disconnectRequests": [ { "topicFilter": "platform/city/asset/+/disconnect", "deviceNameTopicExpression": "(?<=sensor/)(.*?)(?=/disconnect)" } ], "attributeRequests": [ { "retain": false, "topicFilter": "v1/devices/me/attributes/request", "deviceNameJsonExpression": "${model}", "attributeNameJsonExpression": "${mode}", "topicExpression": "devices/${model}/attrs", "valueExpression": "${attributeKey}: ${attributeValue}" } ], "attributeUpdates": [ { "retain": true, "deviceNameFilter": "sn.*", "attributeFilter": "mode", "topicExpression": "platform/city/asset/${deviceName}/control", "valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}" } ], "serverSideRpc": [ { "deviceNameFilter": ".*", "methodFilter": "no-reply", "requestTopicExpression": "/platform/city/asset/${deviceName}/control", "valueExpression": "test" } ], "logLevel": "DEBUG", "name": "Test MQTT Broker" }
Connector name (If bug in the some connector):
mqtt_connector.py
Error traceback (If available):
Starkoc-TBGateway | 2023-11-08 20:49:08 - |INFO| - [mqtt_connector.py] - mqtt_connector - server_side_rpc_handler - 847 - Incoming server-side RPC: {'device': 'sn001', 'data': {'id': 36, 'method': 'rpcCommand', 'params': {'method': 'no-reply', 'params': {'message': 'Hello'}}}, 'id': <tb_gateway_mqtt.TBGatewayMqttClient object at 0x7fd8dc0c67d0>}
Starkoc-TBGateway | 2023-11-08 20:49:08 - |ERROR| - [mqtt_connector.py] - mqtt_connector - server_side_rpc_handler - 883 - RPC not handled: {'device': 'sn001', 'data': {'id': 36, 'method': 'rpcCommand', 'params': {'method': 'no-reply', 'params': {'message': 'Hello'}}}, 'id': <tb_gateway_mqtt.TBGatewayMqttClient object at 0x7fd8dc0c67d0>}
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: