thingsboard-gateway: [HELP] MQTT connector failure

Problem After an attempt to upgrade the gateway, an issue occured which remained even after downgrading to the previous version and even re-installing server. Note that all the configurations are exactly the ones used in the working version (a part from device token of course). Problem is that initially the values are catched as keys, as the following image:

tb issue

Then after re-installing GW and Server, sensor’s messages don’t get parsed; considering following example, temp variable is not read from sensor’s message

   "timeseries": [
          {
            "type": "double",
            "key": "temperature",
            "value": "${temp}"
          }

to testing that if we put constant value (“value”: “0”) it works, meaning that the keys are correct.

Configuration This is the configuration file for the Gateway:

thingsboard:
  host: 130.xxx.xxx.xxx
  port: 1883
  remoteConfiguration: false
  security:
    accessToken: XXXXXXXX 
storage:
  type: memory
  read_records_count: 100
  max_records_count: 100000

connectors:
  -
    name: MQTT WS Connector
    type: mqtt
    configuration: weatherstation.json

  -
    name: MQTT Forecast Connector
    type: mqtt
    configuration: forecast.json

Connector name : We use MQTT Connector:

{
  "broker": {
    "name": "WeatherStationBroker",
    "host": "127.0.0.1",
    "port": 1883,
    "security": {
      "type": "anonymous"
    }
  },
  "mapping": [
    {
      "topicFilter": "WeatherSensors/loop",
      "converter": {
        "type": "json",
	"deviceNameJsonExpression": "WeatherStationSensor",
        "deviceTypeJsonExpression": "Sensors",
        "timeout": 60000,
        "timeseries": [
          {
            "type": "double",
            "key": "outTemp",
            "value": "${outTemp}"
          },
          {
            "type": "double",
            "key": "highOutTemp",
            "value": "${highOutTemp}"
          },
          {
            "type": "double",
            "key": "lowOutTemp",
            "value": "${lowOutTemp}"
          },
          {
            "type": "double",
            "key": "rain",
            "value": "${rain}"
          },
          {
            "type": "double",
            "key": "rainRate",
            "value": "${rainRate}"
          },
          {
            "type": "double",
            "key": "barometer",
            "value": "${barometer}"
          },
          {
            "type": "double",
            "key": "radiation",
            "value": "${radiation}"
          },
          {
            "type": "double",
            "key": "inTemp",
            "value": "${inTemp}"
          },
          {
            "type": "double",
            "key": "inHumidity",
            "value": "${inHumidity}"
          }
        ]
      }
    }
  ],
  "connectRequests": [],
  "disconnectRequests": [],
  "attributeUpdates": [],
  "serverSideRpc": [],
  "attributeRequests": []
}

Error traceback (If it was raised):

Logs don’t show any problem apparently:

""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected mapping handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted serverSideRpc handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected serverSideRpc handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted connectRequests handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected connectRequests handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted disconnectRequests handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected disconnectRequests handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted attributeRequests handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected attributeRequests handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted attributeUpdates handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected attributeUpdates handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted mapping handlers: 1"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected mapping handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted serverSideRpc handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected serverSideRpc handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted connectRequests handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected connectRequests handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted disconnectRequests handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected disconnectRequests handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted attributeRequests handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected attributeRequests handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted attributeUpdates handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 227 - MQTT Davis Connector connected to 127.0.0.1:1883 - successfully."
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected attributeUpdates handlers: 0"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 227 - MQTT Forecast Connector connected to localhost:1883 - successfully."
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 267 - Connector "MQTT WS Connector" subscribe to WeatherSensors/loop"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 267 - Connector "MQTT Forecast Connector" subscribe to SolarForecastTopic"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 315 - "MQTT WS Connector" subscription success to topic WeatherSensors/loop, subscription message id = 1"
""2020-07-26 23:10:08" - INFO - [mqtt_connector.py] - mqtt_connector - 315 - "MQTT Forecast Connector" subscription success to topic SolarForecastTopic, subscription message id = 1"
'

Versions (please complete the following information):

  • OS: [Description: Ubuntu Groovy Gorilla (development branch) Release: 20.10]
  • Thingsboard IoT Gateway version [2.2.4]
  • Python version[e.g. 3.8]

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (10 by maintainers)

Most upvoted comments

Hi @mirtaheri @MrPivato

I fixed it today in the master branch, you can try to use the version from it to solve the issue. It was an error in the uplink converter.