Inspiration
SmartGreenify was inspired by a simple question: how can small-scale growing become more informed, efficient, and accessible without relying on expensive commercial greenhouse systems? Plants need consistent attention, but manually checking soil moisture, temperature, humidity, and light throughout the day is difficult. We wanted to turn those everyday observations into a practical smart-garden assistant.
What it does
SmartGreenify is a Raspberry Pi–based smart-garden system that monitors real environmental conditions and helps make better irrigation decisions. It reads data from a BME280 sensor, an ADS1115-connected capacitive soil-moisture sensor, and an LDR light sensor. A live dashboard shows sensor readings, historical charts, garden-health indicators, schedules, analytics, and pump status.
The system also uses local AutoML to compare several regression models—including Decision Trees, Random Forest, Extra Trees, Gradient Boosting, Histogram Gradient Boosting, and optional XGBoost—and selects the most accurate model based on validation error. The model uses sensor history to suggest an optimal irrigation time.
How we built it
We built SmartGreenify in Python with Flask and Flask-SocketIO. The Raspberry Pi communicates with the BME280 through SPI, the ADS1115 through I²C, the LDR through GPIO 26, and the pump relay through GPIO 27.
The frontend is a responsive web dashboard powered by Chart.js and WebSockets. It includes live updates, automatic reconnection, a polling fallback, dark mode, PWA support, and interactive charts. We also added PDF, Excel, and Plotly reporting to make sensor history easier to understand.
For the ML workflow, we transform logged data into features such as soil moisture, temperature, humidity, daylight, hour, and pump activity. Candidate models are evaluated on the newest 20% of the data, preserving chronological order, and the model with the lowest prediction error is selected.
Challenges we ran into
The biggest challenge was combining software intelligence with real hardware constraints. Sensor readings can be noisy, hardware libraries are specific to Raspberry Pi, and pump control needs to remain predictable and safe. We therefore kept the existing sensor pinout unchanged and separated the AutoML workflow from GPIO and relay control.
Another challenge was making real-time updates reliable. WebSocket connections can drop, especially on local wireless networks, so we added reconnection behavior and a periodic HTTP fallback. We also optimized model-training attempts so the application does not repeatedly consume CPU when there is not yet enough sensor data.
Accomplishments that we're proud of
Built a complete Raspberry Pi smart-garden system around real sensor hardware, not only a software simulation. Combined SPI, I²C, GPIO, relay control, real-time Flask updates, and a responsive web dashboard. Created a clear visual experience with live sensor cards, individual trends, environmental comparison charts, health indicators, and analytics pages. Added resilient WebSocket behavior with reconnects and an HTTP fallback for unreliable local networks. Implemented local AutoML model selection that compares multiple models and chooses the best one from logged sensor data. Preserved the existing hardware pinout and separated ML analysis from sensor and pump control for safer operation. Added practical reporting, including PDF, Excel, Plotly analytics, notifications, PWA support, and structured logs.
What we learned
This project taught us that building IoT software is not only about collecting data—it is about making that data trustworthy, understandable, and actionable. We learned how to integrate SPI, I²C, GPIO, Flask, real-time browser updates, PWA caching, data logging, and time-aware machine-learning validation into one system.
Most importantly, we learned that intelligent automation should support people and protect the physical system around it. SmartGreenify is designed to make plant care easier while keeping the hardware configuration stable, transparent, and safe.
What's next for SmartGreenify
Add configurable plant profiles with richer target ranges, growth stages, and personalized irrigation strategies. Introduce weather-aware recommendations using optional forecast data. Add water-flow sensing to measure actual consumption and estimate savings. Build a historical analytics page with weekly and monthly comparisons. Add user accounts and secure remote access for households or shared gardens. Support multiple garden zones, each with its own sensors, plant profile, and pump schedule. Improve model explainability so users can understand why AutoML recommends a particular irrigation time. Add camera-based plant monitoring for early detection of visual stress or growth changes.
Built With
- bme280
- css3
- flask
- html5
- iot
- machine-learning
- ntfy.sh
- pandas
- plotly
- pwa
- python
- raspberry-pi
- sckitt-learn
- socket.io
- websocket
- xgboost
Log in or sign up for Devpost to join the conversation.