Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌱 SYSGrow

Raspberry Pi-first smart agriculture platform for local monitoring, automation, and control

Author Python Flask SQLite MQTT Raspberry Pi License

Quick Start Β· Install Guide Β· Docs Index


✨ Overview

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

🌟 Features

🌱 Grow Operations

  • Multi-unit management from one dashboard
  • Plant lifecycle tracking and journal records
  • Configurable thresholds and schedules
  • Harvest reporting and historical records

πŸ”Œ Devices and Hardware

  • ESP32 integration over MQTT
  • Sensor ingestion and calibration flows
  • Actuator control (relays, pumps, fans, lights)
  • Device health and infrastructure health endpoints

πŸ“Š Real-Time Monitoring

  • Live dashboard updates through Socket.IO
  • Environmental trends and analytics views
  • Unit/device/system health breakdowns
  • Alerting and notifications pipeline

🧠 AI/ML (Optional)

  • Irrigation and growth-support ML services
  • Plant health scoring and prediction endpoints
  • Retraining and monitoring modules
  • Analytics APIs for model and system insights

πŸ—οΈ Architecture Snapshot

UI + API Blueprints
        ↓
Application Services
        ↓
Domain + Hardware Services
        ↓
Infrastructure (SQLite, repositories, MQTT)

🧰 Tech Stack

  • Backend: Flask 3.x + Flask-SocketIO
  • Data: SQLite (WAL mode)
  • Messaging: MQTT (Mosquitto)
  • Runtime: Python 3.11+
  • Target: Raspberry Pi 3B+/4/5

πŸš€ Quick Start (Raspberry Pi)

1. Install system packages

sudo apt update
sudo apt install -y git python3 python3-venv python3-pip python3-dev \
  build-essential pkg-config libsystemd-dev sqlite3 mosquitto mosquitto-clients

2. Clone and enter project

git clone https://github.com/Patoruzuy/SYSGrow.git
cd SYSGrow

3. Python environment

python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

4. Initialize database

python -c "from infrastructure.database.sqlite_handler import SQLiteDatabaseHandler; SQLiteDatabaseHandler('database/sysgrow.db').initialize_database()"

5. Start MQTT broker

sudo systemctl enable --now mosquitto
sudo systemctl status mosquitto --no-pager

6. Run SYSGrow

export SYSGROW_ENABLE_MQTT=true
export SYSGROW_HOST=0.0.0.0
export SYSGROW_PORT=8000
python smart_agriculture_app.py

7. Open in browser

  • UI: http://<your-pi-ip>:8000
  • API docs: http://<your-pi-ip>:8000/api/v1/docs

βœ… First-Boot Checklist

  1. database/sysgrow.db exists.
  2. mosquitto is active.
  3. curl http://localhost:8000/api/v1/health/ping returns 200.
  4. UI loads from another device on your LAN.

πŸ› οΈ Production Deployment

For systemd boot-time startup and production setup:

πŸ“š Documentation

Start here:

Technical references:

πŸ§ͺ Development Commands

# Development server (auto-reload)
python start_dev.py

# Production-like local run
python smart_agriculture_app.py

# Tests
pytest

πŸ“„ License

MIT β€” see LICENSE.

About

Intelligent IoT agriculture platform for monitoring, automating, and optimising plant growth environments.πŸ…πŸ₯¬πŸŒ±

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages