Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 1.45 KB

File metadata and controls

63 lines (44 loc) · 1.45 KB

BME280 Temperature Logger

A long-running sensor logger for a BME280 environmental sensor connected to a Raspberry Pi 4 Model B.
The system continuously records temperature, humidity, and pressure data. The logger runs as a systemd service, writes data locally to SQLite, and can be inspected or extended without requiring network access.


Implemented Features

  • Runs continuously as a systemd service
  • Automatically starts on boot
  • Logs errors to the system journal (journald)

Each reading includes:

  • Timestamp (UTC)
  • Temperature
  • Humidity
  • Pressure

Stored locally in a SQLite database file for easy querying and export.

Error Handling

  • Graceful handling of sensor read failures
  • Database errors logged to the system journal
  • Retry behavior to avoid failure loops

Running as a Service

The logger is managed via systemd. Logs can be viewed with:

journalctl -u bme280_logger

Requirements

  • Raspberry Pi (tested on Raspberry Pi 4)
  • Raspberry Pi OS
  • BME280 sensor (I²C)
  • Python 3
  • SQLite (sqlite3)

Future Improvements

  • Rotating CSV exports (daily / weekly)
  • JSON or Parquet export for analysis
  • Cloud backups (Google Drive, AWS S3, Dropbox)??
  • Local plots using matplotlib or Plotly
  • Real-time dashboards with Dash
  • Web UI using Flask or FastAPI
  • Aggregations (daily averages, min/max)
  • Anomaly detection
  • Long-term trend analysis