Grafana, Influxdb & DS18B20 based home temperature monitoring with Raspberry Pi

Two years later – a small update on running a network of Raspberry Pi based temperature sensors and dashboards via an influxdb/Grafana Pi server.

Original post detailing how “tomato plant overflow” lead to development of a home-wide temperature monitoring network

Hardware changes: nothing much to report – everything is working reliably. A few of the Raspberries Pi Model 2 & 3 have been changed out for Pi Zeros – smaller and still more than powerful enough to run the temperature data gathering. The Pi 4B server hosting the Grafana dashboards and influxdb has been setup to boot/run from a USB3 SSD, the original 4GB memory model was swapped out for an 8GB model during debugging/testing out-of-memory crashes around the “compaction crash loop” issue detailed below.

Raspberry Pi 4B + USB 3.0 SSD with influxdb backed up up to USB 2 flash drive

Software issues: In my initial design I hadn’t set any data retention policy on the influxdb and after ~14 months the database had grown too big to be auto-compressed on the (32-bit kernel) Raspberry Pi 4B server. I quickly found I’d ran into this known issue – I set a sensible date range on my telegraf DB and things looked a lot better. Compaction failure crash loop came back again about 4 months later and I found that the influx dev team were not actively pursuing adding support for “large” DBs in the 32 bit code so I was left debating a few options:

So for now I chose none of the above and further reduced the data retention time on my temp_logger DB….

I have a simple backup script running every 6 hours that backs up the influxdb to an attached USB stick and to another laptop (which is in turn backed up to a cloud storage service).

Published by zedstarr

Chilled out human being, doing techy stuff.

One thought on “Grafana, Influxdb & DS18B20 based home temperature monitoring with Raspberry Pi

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: