Closed samf48 closed 4 years ago
I notice it only does this when I post to the attributes. My mqtt-config.json file:
[{
"id": "mqtt",
"type": "MQTT",
"configuration": {
"brokers": [{
"host": "localhost",
"port": 1885,
"ssl": false,
"retryInterval": 3000,
"credentials": {
"type": "anonymous"
},
"mapping": [{
"topicFilter": "sensors",
"converter": {
"type": "json",
"filterExpression": "$",
"deviceNameJsonExpression": "${$.SensorName}",
"deviceTypeJsonExpression": "${$.model}",
"attributes": [{
"type": "string",
"key": "model",
"value": "${$.model}"
}, {
"type": "string",
"key": "ffT",
"value": "${$.ffT}"
}
],
"timeseries": [{
"type": "string",
"key": "IMEI",
"value": "${$.IMEI}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "NI",
"value": "${$.NI}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "protocol",
"value": "${$.protocolP}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "timestamp",
"value": "${$.timestamp}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "hex",
"value": "${$.hex}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "lat",
"value": "${$.lat}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "lon",
"value": "${$.lon}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "elev",
"value": "${$.elev}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "mode",
"value": "${$.mode}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "baro",
"value": "${$.baro}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "airTemp",
"value": "${$.airTemp}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "battery",
"value": "${$.battery}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "depth1",
"value": "${$.depth1}",
"ts": "${$.time}"
}, {
"type": "string",
"key": "ffi1",
"value": "${$.ffi1}",
"ts": "${$.time}"
}
]
}
}, {
"topicFilter": "gps",
"converter": {
"attributes": [],
"timeseries": [{
"type": "string",
"key": "timestamp",
"value": "${$.timestamp}"
}, {
"type": "string",
"key": "lat",
"value": "${$.lat}"
}, {
"type": "string",
"key": "lon",
"value": "${$.lon}"
}, {
"type": "string",
"key": "elev",
"value": "${$.elev}"
}, {
"type": "string",
"key": "IMEI",
"value": "${$.IMEI}"
}, {
"type": "string",
"key": "NI",
"value": "${$.NI}"
}
],
"type": "json",
"deviceNameJsonExpression": "${$.SensorName}",
"deviceTypeJsonExpression": "${$.model}",
"filterExpression": "$"
}
}
],
"connectRequests": [{
"topicFilter": "sensors/connect",
"deviceNameJsonExpression": "${$.SensorName}"
}
],
"disconnectRequests": [{
"topicFilter": "sensors/disconnect",
"deviceNameJsonExpression": "${$.SensorName}"
}
],
"attributeRequests": [{
"topicFilter": "sensors/attributes",
"deviceNameJsonExpression": "${$.SensorName}",
"attributeKeyJsonExpression": "${$.key}",
"requestIdJsonExpression": "${$.requestId}",
"clientScope": false,
"responseTopicExpression": "sensors/${deviceName}/attributes/${responseId}",
"valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}"
}
],
"attributeUpdates": [{
"deviceNameFilter": ".*",
"attributeFilter": ".*",
"topicExpression": "sensor/${deviceName}/${attributeKey}",
"valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}"
}
],
"serverSideRpc": [{
"deviceNameFilter": ".*",
"methodFilter": "echo",
"requestTopicExpression": "sensor/${deviceName}/request/${methodName}/${requestId}",
"responseTopicExpression": "sensor/${deviceName}/response/${methodName}/${requestId}",
"responseTimeout": 10000,
"valueExpression": "${params}"
}, {
"deviceNameFilter": ".*",
"methodFilter": "no-reply",
"requestTopicExpression": "sensor/${deviceName}/request/${methodName}/${requestId}",
"valueExpression": "${params}"
}
]
}
]
}
}
]
Hi, @samf48
I am glad to inform you that we have released new version of the Gateway based on Python. This is a major rewrite and improvement from Java version. Main benefits:
You can use it for your purposes. We look forward to your feedback.
I have an issue that pertains to publishing many items to a topic. I receive
org.eclipse.paho.client.mqttv3.MqttException: Too many publishes in progress
in the tb-gateway log.I have around 173 publishes occurring at once, eventually more. I researched this a bit and found you can adjust the 'maxInFlight' parameter but I've done that and still I have the same error. I'm using release 2.3.1 for Thingsboard and 2.2.1 for the gateway.
Part of the logfile for tb-gateway: