thingsboard / thingsboard-gateway

Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
https://thingsboard.io/docs/iot-gateway/what-is-iot-gateway/
Apache License 2.0
1.72k stars 829 forks source link

[HELP] Avoid RPC server double quotation marks with escape characters #610

Closed AngeLinuX99 closed 2 years ago

AngeLinuX99 commented 2 years ago

Avoid RPC Server Double quotes with escape characters to my device because My MQTT broker does not support it.

Hello, I have defined an RPC button to send donwlinks to my device.

RPC Method: no-reply RPC Method Params: {"confirmed":false,"fPort":2,"data":"pgE="}

When I activate the button, my thingsboard gateway receives the following message (with escape characters for each double quotation note :

""2021-10-28 22:35:40" - |INFO| - [mqtt_connector.py] - mqtt_connector - server_side_rpc_handler - 676 - Publishing to: application/17/device/A8404144E1825A79/command/down with data "{\"confirmed\":false,\"fPort\":2,\"data\":\"pgE=\"}""

My MQTT broker is not able to interpret this message, it should receive something like:

Publishing to: application/17/device/A8404144E182DDDD/command/down with data "{"confirmed":false,"fPort":2,"data":"pgE="}"

All uplink MQTT subscriptions work like a charm.

Thingsboard Gateway v2.8 runs under docker.

Please can you give me some clue to fix it? Thanks a lot. Best regards.

AngeLinuX99 commented 2 years ago

Fixed !! I have changed from thingsboard 3.2.2 to thingsboard 3.3.1 and it works perfectly.