Simple irrigation controller software for running on a single-board computer with GPIO pins (such as a raspberry pi)
- Single-board computer with GPIO pins running Ubuntu 21.04. Technically, any distro with Linux kernel >= 5.11 should work, but I only tested against Ubuntu 21.04.
- A 5V Relay Module with Optocoupler Isolation. You'll need enough channels to support all of your zones.
- 2 female-to-female jumper wires for the ground and 5V connection to the relay
N
female-to-female jumper wires for connecting the irrigation zone wires, whereN
is the the total number of zones you have.- A power supply that works with your irrigation system. Mine was 24V.
- Python >= 3.8 (I believe this is the default version on Ubuntu 21.04, so you may not need to do anything here)
For the wiring side, I followed this hackster tutorial mostly. Please be cautious when working with electricity.
./bootstrap.sh
This will prompt you for your root password to install certain dependencies. Additionally, it will prompt you to create an admin user you can use to login into the django admin console.
Note that the lgpio dependency has to be installed via apt
as of now, which makes it hard to use a proper virtual environment such as poetry. I'm looking into alternatives to this library.
make run
Starts a server on port 9000. The admin console is at <your_local_pi_ip_address>:9000/admin.
You can configure the webserver to run properly using something like systemd.
TODO
TODO