Raspberry Pi-first smart agriculture platform for local monitoring, automation, and control
SYSGrow turns a Raspberry Pi into a local smart-grow controller:
- π‘οΈ Sensor monitoring
- π Actuator control
- π‘ MQTT integration for ESP32 devices
- π Real-time dashboards (Socket.IO)
- π§ Optional ML/AI modules
Main API namespace: /api/v1/*
Author: Patoruzuy
- Multi-unit management from one dashboard
- Plant lifecycle tracking and journal records
- Configurable thresholds and schedules
- Harvest reporting and historical records
- ESP32 integration over MQTT
- Sensor ingestion and calibration flows
- Actuator control (relays, pumps, fans, lights)
- Device health and infrastructure health endpoints
- Live dashboard updates through Socket.IO
- Environmental trends and analytics views
- Unit/device/system health breakdowns
- Alerting and notifications pipeline
- Irrigation and growth-support ML services
- Plant health scoring and prediction endpoints
- Retraining and monitoring modules
- Analytics APIs for model and system insights
UI + API Blueprints
β
Application Services
β
Domain + Hardware Services
β
Infrastructure (SQLite, repositories, MQTT)
- Backend: Flask 3.x + Flask-SocketIO
- Data: SQLite (WAL mode)
- Messaging: MQTT (Mosquitto)
- Runtime: Python 3.11+
- Target: Raspberry Pi 3B+/4/5
sudo apt update
sudo apt install -y git python3 python3-venv python3-pip python3-dev \
build-essential pkg-config libsystemd-dev sqlite3 mosquitto mosquitto-clientsgit clone https://github.com/Patoruzuy/SYSGrow.git
cd SYSGrowpython3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txtpython -c "from infrastructure.database.sqlite_handler import SQLiteDatabaseHandler; SQLiteDatabaseHandler('database/sysgrow.db').initialize_database()"sudo systemctl enable --now mosquitto
sudo systemctl status mosquitto --no-pagerexport SYSGROW_ENABLE_MQTT=true
export SYSGROW_HOST=0.0.0.0
export SYSGROW_PORT=8000
python smart_agriculture_app.py- UI:
http://<your-pi-ip>:8000 - API docs:
http://<your-pi-ip>:8000/api/v1/docs
database/sysgrow.dbexists.mosquittois active.curl http://localhost:8000/api/v1/health/pingreturns 200.- UI loads from another device on your LAN.
For systemd boot-time startup and production setup:
Start here:
Technical references:
# Development server (auto-reload)
python start_dev.py
# Production-like local run
python smart_agriculture_app.py
# Tests
pytestMIT β see LICENSE.