Main Content

GardenPi powered by Neptune. py

Highly scalable and powerful irrigation / hydroponic & aquaponic control system managing up to 32 zones with automation and sensors.

Overview & Theory of Operation
GardenPi, powered by is designed to manage, monitor, and control a series or sprinkler valves and a multitude of sensors for pretty much any sized irrigation / hydroponic/aquaponics project. It can be scaled (using the hardware I used) from 1 to 32 zones for water and 7 zones for power. It is built almost entirely in Python3 with a Flask web interface and relies on a lot of css to make the interface very fast. It is written and designed to run on the Raspberry Pi 4.

GardenPi was designed around my family’s desire to get more heavily into gardening, hydroponics, and eventually aquaponics. Since we have several fish tanks and do large water changes weekly, we wanted to be able to use that nutrient-rich water for the garden instead of just dumping it down the drain. So weekly my wife would have to cart fish tank water around the garden beds to water the plants manually and then switch back to a hose. This was getting very time consuming and tedious. Because of that, the basic concept of GardenPi was born.

The gardening part would have been pretty easy, we could have used a simple irrigation controller but as you can see we needed several water sources, in our case freshwater (street water) and water from our fish tanks and standard irrigation controllers did not provide the functions we needed to manage the process of moving back and forth between water sources. So I designed a new irrigation layout and my sons and I dug up the yard and installed six separate garden irrigation zones separate from our lawn irrigation and installed valves so we could switch between street water and an IBC tank filled with fish tank water. Now I just needed the software to manage it all.

As with any project, I wanted to look more long term. Our family sat down and talked about what we really wanted to do. One was to get into much larger fish tanks ~200-500 gallons), greatly expand our garden to provide more space for year-around growing (we live in Phoenix), start to dabble into full hydroponics and eventually move into full aquaponics and eliminate street water gardening altogether, relying 100% on old fishtank & aquaponic wastewater instead. Street water would be managed by a RODI system and fed into the fish and aquaponic tanks and all plant water would come from the fish. As you can imagine this would require quite a bit of management and thinking ahead and out-of-the-box.

The system designed for our needs ended up with the following configuration:

27 x “Water” Zones (Expandable to 32 Zones total)
8 x “Power” Zones (7 user-controlled)
6 x “Temperature” Zones (including one for our worm farm)
3 x “Humidity” Zones
1 x Barometric Sensor
DC Current and Voltage Sensors
AC Current and Voltage Sensors
4 x Ultrasonic Water Level Detectors
4 x Non-Contact Liquid Level Sensors
7” Touchscreen for local control

In addition to these zones/sensors, the system also interacts directly with our already installed power and water monitoring systems. This system was built on EmonCMS which is part of the OpenEnergy Project. We use our EmonCMS data to gather water utilization information for GardenPi via smart water meters on our property and do the same for monitoring the AC circuit utilization for GardenPi. Other data such as outside temperature and humidity are likewise drawn from an outside source, namely a Davis Vantage PRO2 system we have installed on the property. This information is written directly to the neptune database automatically by outside scripts. If you do not use these readings you can set them to 0 in the database and that is all that will be displayed in the web interface.”

Link to article