mqtt-datasource
mqtt-datasource copied to clipboard
No data in mqtt
hi, i am using grafana latest version in docker container and the latest mqtt-plugin. my mqtt-publisher is mosquitto in another docker container. mqtt is fully functional (other containers are publishing data to mosquitto and others are subscribed t mosquitto successfully). in grafana i am not able to get data from mqtt, although the test is succesful and i see a connections in mosquitto when connection is tested in grafana.
i tested several topics, from
mbmd/# mbmd/sunspec1-126/# mbmd/sunspec1-126/Frequency mbmd/sunspec1-126/Frequency/#
nothing is giving me any data.
i verified the connection several times, it loogs good:
any ideas?
regards, andre
Hi all, I face the same problem a FlashMQ server from VenusOS. Other clients incl python can read and write, this plugin just gets no data at all...
at least i was able to receive data, but only when having timewindow set to current timeframe. my default view is covering the whole day (forecast data is included), then i don't receive anything. very annoying.
I have the similar problem. I get allways 0 data. But with MQTT Explorer and connection test all works fine. I try a Flash MQ Broker and a mosquitto (HomeAssistant) nothing works
Same here no data are shown. Attached output from Inspect: Query:
{
"request": {
"url": "api/ds/query?ds_type=grafana-mqtt-datasource&requestId=Q111",
"method": "POST",
"data": {
"queries": [
{
"datasource": {
"type": "grafana-mqtt-datasource",
"uid": "adkz30u2cge80d"
},
"hide": false,
"refId": "B",
"topic": "tb_temp/status/switch:0",
"datasourceId": 1,
"intervalMs": 30000,
"maxDataPoints": 739
}
],
"from": "1715052995577",
"to": "1715074595577"
},
"hideFromInspector": false
},
"response": {
"results": {
"B": {
"status": 200,
"frames": [
{
"schema": {
"refId": "B",
"meta": {
"typeVersion": [
0,
0
],
"channel": "ds/adkz30u2cge80d/30s/tb_temp/status/switch:0"
},
"fields": []
},
"data": {
"values": []
}
}
],
"refId": "B"
}
}
}
}
EDIT
I've tried with "#" topic and data are coming, it seems that data need tranformation as described here: https://community.grafana.com/t/mqtt-chart-demo/120121
i think i have found the solution. when using a low interval i am getting values. to reach this approach you have to set max data points to a higher value (for my timeframe now/d+5h up to now/d-90m i need to set up 20000 max data points).
It seems that it is also possible to set "Relative time" to a low value (in my case 1 minute). With the added benefit of the "live data" experience, since the Stat visualisation showes the values from the last minute in a very nice way (my source updates about every 2 seconds).
that method is even smarter than my previously mentioned way. thanks for that!
use relative time is a smart method