Problem to receive MQTT notifications
OlivierGre opened this issue · comments
I'm trying to use Grafana to display MQTT data coming from a MQTT Server on "The Things Network", a LoRaWAN network.
I have added the MQTT plugin and launched the dashboard. In the setting gear (on left side), I have clicked on Data sources and selected MQTT. I have provided the credentials. When I click on "Save & Test", Grafana says that the MQTT connection is OK.
I have then created a new Dashboard and added a new panel. In the Data Source I have selected MQTT and I have filled the "Topic".
For the moment, I don't succeed to get data displayed.
In the query inspector, I can see that the response has the status 200 so it was OK but it only contains empty data.
I don't think that the problem is on the MQTT server side (on The Things Network) because I have installed a MQTT Client on my mobile (MyMQTT) and configured it with the same Topic. It does receive the MQTT notifications so the MQTT server is working. The problem seems on Grafana side.
Would you have some advices?
Thank you
I am having this same exact issue. There is nothing in the Grafana logs indicating an error either. I have also confirmed with 2 other mqtt clients that the messages are coming through from the broker just fine.
Anyone else?
Hi,
same here. No obvious reason for no values coming in. Broker is working fine, can verify the topics and payloads with other mqtt clients.
Somehow I'm not sure wether the datasource is set up correctly. The URIs I'm using are either tcp://ipaddress:1883 or mqtt://ipaddress:1883 (although not supported) and in both cases Grafana says 'MQTT connected'.
When I try to explore the source there are no values coming in although they are published periodically.
Is there a way to find out wether Grafana is really connected? Meaning on the Grafana end - there's no access to the broker.
Hi,
same here. No obvious reason for no values coming in. Broker is working fine, can verify the topics and payloads with other mqtt clients. Somehow I'm not sure wether the datasource is set up correctly. The URIs I'm using are either tcp://ipaddress:1883 or mqtt://ipaddress:1883 (although not supported) and in both cases Grafana says 'MQTT connected'. When I try to explore the source there are no values coming in although they are published periodically.
Is there a way to find out wether Grafana is really connected? Meaning on the Grafana end - there's no access to the broker.
Ditto here, tried various topic, and in explore, just don't get any data or error. :-(
I'm facing the same error. Connection is successful but no data in response.
Ditto. The same problem. The connection to the broker is successful but the topic receives no data.
Hello,
I have exactly the same problem.
Can anybody HELP?
I contacted Grafana support about this issue, who have confirmed that the MQTT data source has been deprecated and will not be developed any further. The recommendation was to use Telegraf to parse mqtt data into influxdb and then read the influxdb data into Grafana. This was a bit of a learning curve, but I do now have a very stable solution based upon this architecture.
I hope this helps.
Thank you!
The recommendation "read the influxdb data into Grafana" means polling every 5 seconds instead of live streaming. Correct?
Yes, unfortunately 5s is the minimum poll time on Grafana Cloud. I haven't implemented my own instance of Grafana. Possibly that restriction doesn't apply. In my case 5s polling is good enough, but obviously not for all applications.
I have succesfully implemented the solution with Telegraf + InfluxDB + Grafana but we wanted something lighter so we finally decided to implement an MQTT Client in an Android App. The source code is available here if you want to try:
https://www.st.com/en/embedded-software/stsw-st25011.html
App on Google Play: https://play.google.com/store/apps/details?id=com.st.st25mqttclient