How ecolistico/growgreens works
Project type and purpose
• From the README and file-tree, this is a full-stack IoT greenhouse control system (“GrowGreens for ECOLISTICO”).
• It includes embedded firmware (Arduino, ESP32), edge gateways (Raspberry Pi “Grower” and “Master” nodes), a cloud component (Python/Cloud), plus local web UIs served via Rasp-AP.
File structure
• C++/
• Arduino subfolders (multiple .ino projects for solutionMaker, generalControl, sMakerV2, accessControl, motorsGrower, etc.)
• ESP32 subfolders (staticSensors, AC-MideaIRMqtt with AutoConnect-Grow library and MQTT data files)
• libs/ (third-party and in-house C++ libraries: AutoConnect-Grow, GrowGreens core, AtlasScientific, etc.)
• Python/
• Cloud/ (MQTT clients, streamServer, GUI, sysCloud)
• Grower/ (Raspberry Pi script set for local grow node: APconfig, MQTT callbacks, BLE advertise, web front-end under html/)
• Master/ (Raspberry Pi central node: data-logger, irrigation control, reports, GUI, email/Telegram alerts, sysMaster)
• Tucan/ (likely a mobile or remote client node)
• utils/sysRasp (helper scripts to configure Raspbian service files, WiFi, camera streaming)
• Rasp-AP/
• Preconfigured hostapd, dnsmasq, rc.local, dhcpcd for hosting a WiFi AP on both Grower and Master nodes
• Static HTML/CSS/JS/PHP front-end served to browsers for local configuration & monitoring
• Bash/ and Test/ for helper scripts and hardware test code
README for additional insights
• Minimal description, but screenshot shows a GUI dashboard—confirming local and remote UIs.
a. Main components
1. Embedded layer:
– Arduino boards running C++ “solutionMaker,” “motorsGrower,” etc., controlling sensors, solenoids, motors
– ESP32 boards running AutoConnect-Grow + MQTT firmware for WiFi‐connected static sensors and remote IR control
2. Edge gateway layer (Raspberry Pi nodes):
– Grower node: local data aggregator, AP server, MQTT client, BLE advertiser
– Master node: central controller, data logger (log2DB), irrigation scheduler, alert dispatcher (email/Telegram), GUI server
3. Cloud layer:
– Python/Cloud service hosting MQTT broker (or client to public broker), stream server (video), blue_server, web dashboard GUI
4. User Interfaces:
– Local web UI served by Rasp-AP on Grower/Master (HTML/CSS/JS/PHP)
– Remote web UI / dashboards in Python/Cloud
b. Relationships and interactions
– Sensors → Arduino/ESP32 → serial or MQTT → Raspberry Pi (Grower/Master)
– Pis ↔ MQTT broker → Python/Cloud → persistent storage (JSON files or database)
– Web clients (browsers) → HTTP server on Pis (Rasp-AP) or Cloud UI → invoke Python scripts via HTTP or local APIs
– Alerts (email/Telegram) sent by Master via modules in Python/Master
– Camera streaming: Pi runs streamServer & client callbacks to Cloud
c. Architectural patterns & principles
– Layered separation: Firmware layer, edge processing layer, cloud services
– Microservices style: each Python subproject independently handles a domain (Cloud, Grower, Master, Tucan)
– Pub/Sub messaging: MQTT as central bus for sensor data and control commands
– Modular libraries: C++ libs for connectivity (AutoConnect-Grow), sensor drivers (AtlasScientific), control logic (GrowGreens)
d. Key technologies/frameworks/libraries
– Arduino SDK, ESP32 Arduino + AutoConnect-Grow library, MQTT protocol
– Python 3 with paho-mqtt, Flask or built-in HTTP server for streamServer & blue_server
– Hostapd/dnsmasq for Raspberry Pi access point
– Frontend: HTML/CSS/JavaScript, PHP for local API endpoints