Enviroplus_exporter for use with Prometheus and Grafana

Hi there,

I know there are quite a few people looking for a good way to graph the stats coming from the Pimoroni Enviro+. I thought it would be neat to have a Prometheus exporter, exposing the Enviro+ metrics so it can be scraped by Prometheus and present it using graphs in Grafana. You can find my project on Github and any feedback is greatly appreciated.

Have fun!

Kind regards,


1 Like

Like this? :)

I do this via MQTT, Node Red, InfluxDB and Grafana. The graphs show measurements from both an EnviroPlus and an EnviroPhat, which both send their data via MQTT (Mosquitto) to Node Red on an RPi4 where the data is then stored on an InfluxDB on my QNAP NAS and where I run graphs via Grafana that also runs on my QNAP.

If there is interest I can try and describe how I’ve done this but it’s rather complex as you can maybe imagine, so I have to think about what would be a clear and concise way to describe it.

Looks awesome! I will definitely have a look at MQTT and Node Red.

Let me know if I can help :). And I’m sure you can make these graphs from the data you gather with Prometheus, maybe I can share my dashboard for you to have a look at. Not sure yet how that works, sharing dashboards in Grafana.

MQTT and NodeRed are used for the network transportation of the gathered data and then re-formatting that data into the appropriate fields for storage in an InfluxDB. Maybe Prometheus does this already and I’ve reinvented the wheel :P LOL.

Getting the measurements from multiple targets is the hardest part I guess and Prometheus does a good job in that. As I wanted to get experienced with Prometheus I wrote this exporter. Advantages are that scraping targets (multiple Raspberry Pi’s for instance) is a very lightweight process and scales well.
I really like your approach though as it seems to be somewhat more IoT like ;). Definitely interested in having a look at your MQTT and NodeRed code if you have it published.

I went the IoT route indeed as MQTT is now the default standard to exchange messages between IoT devices. But that’s also the only thing it does, it exchanges messages but it’s up to you to do something with those messages, or not. So that’s why I used NodeRed to take those incoming messages and store them into an InfluxDB. The nice thing about NodeRed is that it has many input- and output interfaces which makes it ideal for what I intended (which is interpret the incoming message and store it into a database).

I just read up a little bit about Prometheus and watched some videos so now I will definitely check out your exporter because I was wondering how you got the data from the sensor into Prometheus :).


I’d be very grateful, if you could explain in detail just how to get the MQTT out of the EnviroPlus. I’m quite familiar with the MQTT - NodeRed - Grafana setup having used it with few projects.

I’ve tried following this litte tutorial on the DietPi forum https://dietpi.com/phpbb/viewtopic.php?f=15&p=21689. But I can’t get it to run properly, (quite new to python).


Hey guys, I was also looking into graphing with influx and grafana and I found a good starting point here :

example enviro+ influx


can you share your configs/parsers? actually a guide would be preferable (if possible)