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.
- 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.
- Graceful handling of sensor read failures
- Database errors logged to the system journal
- Retry behavior to avoid failure loops
The logger is managed via systemd.
Logs can be viewed with:
journalctl -u bme280_logger- Raspberry Pi (tested on Raspberry Pi 4)
- Raspberry Pi OS
- BME280 sensor (I²C)
- Python 3
- SQLite (
sqlite3)
- 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