This project is a monorepo containing code for an ESP32-based microcontroller project and a Go backend for improving interactions with multiple irrigation systems.
If you have any question at all, please reach out and I would love to chat about the project!
This system is designed to be flexible for all types of gardening. Here are a few examples of different possible setups:
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.
Key features include:
This Arduino-compatible firmware is contained in the garden-controller
and is intended to be used with an ESP32. It implements the most basic functionality to control hardware based on messages from the Go application received over MQTT.
Key features include:
Use Docker Compose to easily run everything and try it out! This will run all services the garden-app
depends on, plus an instance of the garden-app
and a mock garden-controller
.
git clone https://github.com/calvinmclean/automated-garden.git
cd automated-garden
docker compose -f deploy/docker-compose.yml --profile demo up
curl
commands to see what is available in the API# 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 | jq
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!curl -s localhost:8080/gardens/c9i98glvqc7km2vasfig/zones/c9i99otvqc7kmt8hjio0/action \
-d '{"water": {"duration": 3000}}'
admin/adminadmin
garden-controller
to show uptime and a watering history. You should see the recent 3 second watering event hereAnd that's it! I encourage you to check out the additional documentation for more detailed API usage and to learn about all of the things that are possible.
This project includes an HTMX UI served by the Go application.
pio run -t upload