Abstract
Automated Garden is an open-source Internet of Things (IoT) project. Weather-based smart irrigation controller and backend. This project is a monorepo containing code for an ESP32-based microcontroller project and a Go backend for improving interactions with multiple irrigation systems. It is built using Go, MQTT, ESP32, Arduino. The complete source code is publicly available on GitHub under the Apache License 2.0, making it a useful reference for students building an Internet of Things (IoT) mini project or final-year project.
1. Introduction
This project is a monorepo containing code for an ESP32-based microcontroller project and a Go backend for improving interactions with multiple irrigation systems.
This Go application is contained in the garden-app directory and consists of a CLI and web backend for interacting with the garden controller. It implements all logic and orchestrates the separate systems.
2. Objective
weather-based smart irrigation controller and backend
This project demonstrates how Go, MQTT, ESP32 can be applied to a real-world Internet of Things (IoT) problem.
4. Technology Stack
- Arduino/FreeRTOS
- InfluxDB
- Telegraf
- Netatmo Weather (optional for weather-based watering)
- Grafana (optional for visualization of data)
- Prometheus (optional for metrics)
- Loki + Promtail (optional for log aggregation)
5. System Requirements
General requirements for this technology stack — check the README for exact versions.
- Go 1.20 or later
- Git (to clone the repository)
6. Installation & Setup
git clone https://github.com/calvinmclean/automated-garden.git
cd automated-garden- Clone this repository
- Run Docker Compose and wait a bit for everything to start up
- Try out some curl commands to see what is available in the API
- You may notice that these responses all contain a links array with the full API routes for other endpoints related to the resources. Go ahead and follow some of these links to learn more about the available API!
- Water a Zone for 3 seconds
- Now access Grafana dashboards at http://localhost:3000 and login as admin/adminadmin
- The "Garden App" dashboard contains application metrics for resource usage, HTTP stats, and others
- The "Garden Dashboard" dashboard contains more interesting data that comes from the garden-controller to show uptime and a watering history. You should see the recent 3 second watering event here
git clone https://github.com/calvinmclean/automated-garden.git
cd automated-gardendocker compose -f deploy/docker-compose.yml --profile demo up# list all Gardens
curl -s localhost:8080/gardens | jq
# get a specific Garden
curl -s localhost:8080/gardens/c9i98glvqc7km2vasfig | jq
# get all Zones that are a part of this Garden
curl -s localhost:8080/gardens/c9i98glvqc7km2vasfig/zones | jqcurl -s localhost:8080/gardens/c9i98glvqc7km2vasfig/zones/c9i99otvqc7kmt8hjio0/action \
-d '{"water": {"duration": 3000}}'Full setup instructions are in the project README.
7. Future Enhancements
Suggested extensions you can add to make this your own project.
- Add a mobile dashboard using Blynk or Firebase
- Store readings in a cloud database for history charts
- Add alerts via SMS / Telegram when thresholds are crossed
8. Viva / Review Questions
Common questions examiners ask for projects in this domain.
- Which microcontroller / board and sensors are used and why?
- How does the device send data (Wi-Fi, MQTT, HTTP, Bluetooth)?
- Where is the sensor data stored and visualised?
- How is power consumption managed?
- How would you secure the device and its communication?
9. Source Code & License
This project is developed by calvinmclean and published on GitHub under the Apache License 2.0. Please follow the license terms and credit the original author when you use or modify this code.
Want to build this as your internship project?
Work on an Internet of Things (IoT) project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.
Apply for Internet of Things (IoT) Internship