We have installed a thingsboard-gateway V2.2 (on a RPi) and configured it to interface with a sensor device through mqtt connector. To be more precise, weewex-mqtt
is communicating data of the sensor's logger (a weather station) to thingsboard-gateway in the same RPi and the measures get successfully published.
The Main configuration file for Gateway i.e. tb_gateway.yaml
is set as the following:
thingsboard:
host: mydomain.it
port: 1883
remoteConfiguration: false
security:
accessToken: UVXXXXXXXXXXXX
storage:
type: memory
read_records_count: 100
max_records_count: 100000
connectors:
-
name: MQTT Broker Connector
type: mqtt
configuration: mqtt.json
as of the MQTT Connector configuration file i.e mqtt.json
the configuration is the following:
{
"broker": {
"name": "Weather Station Broker",
"host": "localhost",
"port": 1883,
"security": {
"type": "anonymous"
}
},
"mapping": [
{
"topicFilter": "WeatherSensors",
"converter": {
"type": "json",
"deviceTypeJsonExpression": "${sensorType}",
"timeout": 60000,
"timeseries": [
{
"type": "double",
"key": "temperature",
"value": "${outTemp}"
},
{
"type": "double",
"key": "humidity",
"value": "${outHumidity}"
}
],
"deviceNameJsonExpression": "${WeatherStationName}"
}
}
]
}
I just left the broker
field and data required field which is mapping
.
WeatherSensors
is the topic on which weewx-mqtt
, and outTemp
, outHumidity
are taken from the paylod.
However, it seems that there is no data communication related to the timeseries
data. From other hand the communication between gateway and server seems to be established since I see the continuous update of these variables:
eventsProduced
and eventsSent
,
and if I leave the connectRequests
, disconnectRequests
, attributeUpdates
and serverSideRpc
I will se also something like mqttbrokerconnectorEventsProduced
and mqttbrokerconnectorEventsSent
.
Therefore, I am suspecious of the mqtt.json configuration, but this is how the thingssboard official page suggests. Anyhelp is much appreciated.
Thanks in advance.