mqtt-datasource icon indicating copy to clipboard operation
mqtt-datasource copied to clipboard

No MQTT data received

Open elausys opened this issue 1 year ago • 8 comments

Hello,

I'm using MQTT plugin version 1.0.0-beta.4 on Grafana 10.4.0.

The datasource is connected to the MQTT broker (Node-Red broker)

image

On the dashboard panel, the topic name is set :

image

But not data is showing.

Using MQTT Explorer, the same topic can be viewed without issue ;

image

None of the topics where able to show data.

What could be the problem ?

Thank you in advance for your support !

Best Regards,

elausys avatar Jun 12 '24 12:06 elausys

Any help or advice on that topic ? Thank you in advance !

elausys avatar Jun 18 '24 11:06 elausys

no help, but I have exactly the same problem. MQTT works in MQTT explorer but no data with Grafana MQTT plugin. I tried version 1.0 beta4 and 1.1

The MQTT Broker used: FlashMQ from Victron VenusOS

teefixx avatar Jun 21 '24 05:06 teefixx

Same issue here. MQTT works with mosquitto_sub. Grafana's connection is successfull, but no data is resceived.

starhopper-de avatar Jun 28 '24 19:06 starhopper-de

Hello,

It is a pity that no support answer is provided. Seems simple scenarios and would be helpful to many people apparently.

Can someone help to fix that ?

Thanks a lot !

elausys avatar Jul 04 '24 10:07 elausys

Same problem here

jtowe1 avatar Aug 20 '24 17:08 jtowe1

Hi,

Since they added support for more dynamic topic features (variables, wildcards, etc.), I've been using this plugin extensively with great success.

That said, currently, all my data are time-series using JSON as the message format, containing a timestamp and at least one variable I want to display. This has been working flawlessly so far.

Did you try checking the table view first to see if any data is being received?

image

This is typically how I start debugging before transforming the data to display it the way I want.

I'm able to use repeated panels, display multiple values in a single graph, and utilize many other advanced features without any issues—but I did have to tweak the JSON format to make it work properly.

Can you show me the raw data you're using in those topics? Do you have the flexibility to transform that data before sending it to those topics?

Let me know. Bye!

ArchiZ0 avatar Aug 20 '24 23:08 ArchiZ0

Hi, currently nothing is showing in the table view/ raw data view in Grafana. The topics are created in Node-Red so we have flexibility adapt the data.

Could you share an example of your JSON formated topics ?

Thanks a lot !

elausys avatar Aug 21 '24 12:08 elausys

Sorry for the delay, lots of work to do. A simple JSON for temperature should work simply:

{
  "timestamp":"2024-08-25T20:42:27.357133219Z",
  "device":"sc01",
  "temperature":72
}

In Table view: image

As time-series: image

ArchiZ0 avatar Aug 25 '24 20:08 ArchiZ0