My Digital Garden

JPNAS.NET / Digital Garden

🌱 SeedLast updated:

Constructing a Weather Station

A seed for a small project that puts several notes together: an ESP32 with a temperature, humidity and pressure sensor, data over MQTT into a database, and graphs in Grafana on my home server.

Open in the interactive Digital Garden

This project is a good excuse to connect several notes: Microcontroller Communication for the sensor, Constructing a Database for storing the readings, and Constructing a Cloud for the server that keeps it all. The goal: a graph of the temperature on the balcony for the whole year, on my own server.

The Plan

  1. Sensor: an ESP32 with a BME280 (temperature, humidity, air pressure) over I²C.
  2. Sending: every minute a reading over Wi-Fi to the MQTT broker at home.
  3. Storing: the readings go into InfluxDB, a database made for time series.
  4. Showing: Grafana draws the graphs – today, this week, this year.
  5. Outside: a small shield against the sun, otherwise the sensor measures the sun, not the air.

Open Questions

  • ESPHome (almost no code, straight into Home Assistant) or my own Arduino code (more to learn)? Maybe both, as two examples.
  • Battery or cable? Deep sleep on the ESP32 should make a battery last for months.
  • How accurate is a cheap sensor compared to the official weather station nearby?

The software is in my Home Automation & Monitoring and Electronics & Circuits resources.

← All notes