IoT Plant and Environment Monitor

A complete IoT system for monitoring home environment and plant moisture levels, hosted at crabdance.milescb.com. The project combines embedded systems, web development, and backend services to create a real-time monitoring solution running on a Raspberry Pi Zero 2W with ESP8266-based sensor nodes.

Motivation

Home plant care and environmental monitoring require consistent attention and manual measurement. This project automates the monitoring process, providing real-time data visualization and historical tracking accessible from anywhere via the web. The system demonstrates practical applications of IoT architecture, including sensor networks, message queuing protocols, database management, and web service deployment.

System Architecture

Hardware Components

Raspberry Pi Zero 2W Server:

ESP8266 Sensor Nodes:

Software Stack

Frontend:

Backend:

Networking:

Technical Implementation

Sensor Network

The ESP8266 nodes use the custom PlantMonitor library to interface with multiple sensors:

Data Pipeline

  1. Data Collection: ESP8266 sensors publish readings to MQTT topics
  2. Data Ingestion: Python subscriber service listens to MQTT broker and writes to SQLite
  3. Data Storage: Time-series data stored with timestamps and sensor identifiers
  4. Data Retrieval: REST API queries database and serves JSON responses
  5. Data Visualization: Frontend JavaScript fetches API data and renders charts/displays

Deployment Configuration

The system supports two deployment options:

Free Domain with Port Forwarding:

Cloudflare Tunnel (Recommended):

Key Features

Resources