MQTT Data in HTML panel

Dear @yendor,

Thanks, now I am getting your whole point. I probably should have scanned your code better.

This very much resonates with some thoughts we also already had when discussing the command & control channel to communicate back to upstream nodes within the Hiveeyes Project and how that would be operated exactly on top of the MQTT substrate.

While Node-RED is really powerful, we haven’t yet got friends as we wouldn’t know how to operate a multi-tenant non-interactive setup with it. As we just recently started to get better friends with Grafana and its internal interfaces in the course of [1-4], we would go for the “native way” of connecting the Browser to MQTT by MQTT over WebSockets, which in the best case would yield a Panel Plugin which can be operated in a standalone manner without depending on Node-RED. However, it still could interact with Node-RED using MQTT like with any other bus member.

In fact, this would be pretty much what you implemented and shared already. Thanks!

The reason for that is probably because the panel gets refreshed by the Grafana machinery on each refresh interval and maybe on additional conditions. So, by just folding all the connection management into a real Grafana plugin should already solve that issue.

Good to hear from people having similar ideas about how to bring MQTT closer to Grafana in a sensible way. Maybe we can find some time to work on a basic implementation which would go into that direction. Would you be able to share a screenshot of what your Node-RED interface for sending MQTT messages and displaying status information currently looks like to get an idea about where we should aim at interface-wise?

With kind regards,
Andreas.

[1] Giving the Grafana Worldmap Panel some love
[2] Ingesting hourly data from a JSON API
[3] Use "grafana-wtf" to search through all entities of a Grafana instance
[4] GitHub - panodata/grafanimate: Animate timeseries data with Grafana.