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.74k stars 844 forks source link

[HELP] unable to get attributeupdate working #1479

Closed Godsgrav3 closed 3 months ago

Godsgrav3 commented 3 months ago

Describe the issue Hi, I'm testing thingsboard and the IOT gateway. One of the things I'm testing is the attribute update section in MQTT. But when I have this section in the config and update the attribute I get the following error: |ERROR| - [mqtt_connector.py] - mqtt_connector - on_attributes_update - 803 - Attribute updates config not found.

Configuration (Attach your configuration file)

"attributeUpdates": [
  {
    "httpMethod": "POST",
    "httpHeaders": {
      "CONTENT-TYPE": "application/json"
    },
    "timeout": 0.5,
    "tries": 3,
    "allowRedirects": true,
    "retain": false,
    "deviceNameFilter": ".*",
    "attributeFilter": "firmwareVersion",
    "topicExpression": "sensor/${deviceName}/${attributeKey}",
    "valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}"
  }
],

Connector name (If you need help with some connector/converter): MQTT

Versions (please complete the following information):

Godsgrav3 commented 3 months ago

It was a dumb mistake by me, had some of the braces in the wrong place.