Raspberry Pi Zero as integration and logging server

Hi all,

just wanted to share a small project I completed this weekend. I setup a Raspberry Pi Zero 2 W with a e-Ink screen to act as:

  1. MQTT Broker (used integrating my Linktap smart watering devices)
  2. Logging server (influxdb + telegraf)
  3. Graphs and Dashboards (grafana)

I am using InfluxDB Logger in Hubitat to send specific sensor data to influx, including data from my Personal Weather Station. This weather data I then show on the e-Ink screen using a python script running in the zero.

Finally, I also monitor the status of key processes in the screen through small indicators.

Influx + Grafana really make it easy to look at historic sensor data, in comparison with Hubitat by itself, and for my usage the Pi Zero has more than enough processing power to handle this role. Plus, it makes for a very interesting learning project! :slight_smile:

If anyone is interested on how it is built/configured, just msg me in this thread.

Cheers
Pedro

6 Likes

Looks great. I am curious what you are doing with Telegraf exactly? Is that acting as the middle man between Hubitat and InfluxDB? I am currently using Node-Red to do this, but Telegraf looks possibly more purpose built for it. How do you send events to Telegraf? With MakerAPI?

What case and screen is that?

Hi actually between Hubitat and Influx I use InfluxDb Logger (InfluxDB-Logger/influxdb-logger.groovy at master ยท HubitatCommunity/InfluxDB-Logger ยท GitHub). I am thinking in the future to build something like InfluxDB Logger but using MQTT (MQTT Logger :)), as I believe it will be less taxing on the hub.

Telegraf I use to store readings from the PI (this one and others in my network) to influxdb in order to monitor in grafana. Telegraf can be used with several types of inputs, such as MQTT brokers (subscribes to topics), files (I monitor some log files and store to influx readings), and many other features I never tried to use, and influxdb is one of the available outputs (i never tried any other types).

As a word of advice make sure you backup your SD card. Using this type of storage is problematic with influxdb because the file system is continually being written to. The flash memory is degraded with increasing write cycles so it shortens the life considerably.

3 Likes

Ok, had not considered this. May implement a backup process to a NAS in the network. Thanks!

3 Likes

Ah yes I have seen that, I opted to use MakerAPI to send events to Node-Red and then I have a flow that filters stuff out and sends what I want to InfluxDB.

2 Likes