How ironwolf437/smart-greenhouse works
Smart Greenhouse combines ESP32-based environmental monitoring and control with a Raspberry Pi runtime for telemetry logging, camera surveillance, and scheduled or manually triggered plant-disease detection. Its principal workflow runs from sensor readings over serial to logging, while the Pi can also send configuration back to the ESP32. The README documents Telegram remote management and automated boot services; the Telegram implementation is not sampled, so its internal interactions are left unspecified. Firmware behavior is inferred from filenames and README rather than sampled source.
Main entry points: main.py Runtime Orchestrator · greenhouse_test.ino ESP32 Firmware · database.py Telemetry and Detection Logging · cam.py Camera Capture
Components 13
Greenhouse Control
- Sensors
ESP32 code/greenhouse_test.ino - Relays and Actuators
ESP32 code/greenhouse_test.ino - ESP32 Firmware
ESP32 code/greenhouse_test.ino
Raspberry Pi Runtime
- Runtime Orchestrator
Pi code/main.py - Serial Link
Pi code/main.py - Telemetry and Detection Logging
Pi code/database.py - Greenhouse CSV Logs
Pi code/database.py
Plant Health Vision
- Camera Capture
Pi code/cam.py - YOLO Detector
AI/train/weights/best.pt - Disease Model Workflow
AI/plant-disease-detection-yolov11.ipynb
Remote Management
- Telegram Bot
Pi code/tlg_test.py
Other components
- Greenhouse Environment
- Telegram User
Connections 15
- Greenhouse Environment → Sensors: measured by
- Sensors → ESP32 Firmware: sensor readings
- ESP32 Firmware → Relays and Actuators: controls
- Relays and Actuators → Greenhouse Environment: adjusts
- ESP32 Firmware → Serial Link: sends telemetry
- Serial Link → Runtime Orchestrator: delivers telemetry
- Runtime Orchestrator → Serial Link: writes configuration
- Serial Link → ESP32 Firmware: forwards configuration
- Runtime Orchestrator → Camera Capture: runs detection
- Camera Capture → YOLO Detector: runs inference
- Disease Model Workflow → YOLO Detector: produces weights
- Runtime Orchestrator → Telemetry and Detection Logging: formats records
- Telemetry and Detection Logging → Camera Capture: records motion video
- Telemetry and Detection Logging → Greenhouse CSV Logs: appends records
- Telegram User → Telegram Bot: remote management