CAD data to Prometheus / Grafana
We had a question from a customer about using Prometheus and Grafana for graphing data, so I thought I would post something here that the Hildebrand support team could refer to.
Recipe
- Enable MQTT by contacting Hildebrand support - make sure they know your account name so they can just action it straight away. We'll probably be making this self service soon, but we are studying the loads and how to make it scale without huge costs.
- Use a MQTT to Prometheus tool like - https://github.com/inuits/mqttgateway (others are available and I couldn't tell you if one is better than another)
- Configure your topics and parsing - a good starter (https://forum.glowmarkt.com/index.php?p=/discussion/10/interfacing-to-domoticz-using-mqtt#latest)
- Hook up all the bits and away you go.
- Let us know what metrics and things you find interesting in Grafana. We use Grafana in some of our industrial deployments - it is a nice tool. We may look at supporting it more formally - someone from the company contacted us, but just too busy to follow up ;)
Comments
Thanks for the quick guide, my Grafana display could do with an overhaul, when I get round to it I will integrate the CAD data into it.
It would be nice to see if other users build some dashboards and what they look like.
I'm not following the exact method shown above but I've started importing data from the MQTT feed into InfluxDB / Grafana
Heres my quickly thrown together dashboard - https://s3.eu-west-2.amazonaws.com/cdn.marrold.co.uk/images/glow_grafana_screenshot.png
It would be great to see other peoples graphs!
Let us know what metrics and things you find interesting in Grafana.
I'd love to see some lower level metrics exposed via MQTT - Volts, Hertz, Power Factor etc. I'm not sure if these metrics are available to you?
Unfortunately we don't get too many of the detailed metrics out of the meters, however there are more there for sure. I'll get it folded into the developer's requirements stack and see what time table we might be able to have a look at those - or at least have the discussion of what is available.
The code I'm using to get the MQTT data into grafana is on my github account here: https://github.com/optiz0r/energy-usage. The README has an screenshot and an importable copy of the grafana dashboard I'm using. I'm using VictoriaMetrics instead of InfluxDB, so the dashboard won't be readily usable for anyone using influx.
I'm still trying to work out how to calculate a stat showing "energy used/money spent for selected time period" rather than just the day/week/month accumulations. I think this should be possible with the
integrate()
victoriametrics function for area under the curve, but I'm getting garbage results back from that.