SkillAgentSearch skills...

GardenPi

Multizone Hydroponic / Aquaponic / Irrigation & Fish Tank Water management and monitoring platform

Install / Use

/learn @rjsears/GardenPi
About this skill

Quality Score

0/100

Category

Operations

Supported Platforms

Universal

README

<h2 align="center"> <a name="gardenpi_logo" href="https://github.com/rjsears/GardenPi"><img src="https://github.com/rjsears/GardenPi/blob/master/images/gardenpi_cover.jpg" alt="GardenPi" height="700" width="550"></a> <br> GardenPi (V1.0.0 - February 9th, 2021) </h2> <p align="center"> Multizone Hydroponic / Aquaponic / Irrigation &amp; Fish Tank Water management and monitoring platform </p> <h4 align="center">Be sure to :star: my repo so you can keep up to date on any updates and progress!</h4> <br> <div align="center"> <a href="https://github.com/rjsears/GardenPi/commits/master"><img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/rjsears/GardenPi?style=plastic"></a> <a href="https://github.com/rjsears/GardenPi/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/rjsears/GardenPi?style=plastic"></a> <a href="https://github.com/rjsears/GardenPi/blob/master/LICENSE"><img alt="License" src="https://img.shields.io/github/license/rjsears/GardenPi?style=plastic"></a> </h4> </div> <br> <p><font size="3"> GardenPi, powered by Neptune.py is designed to manage, monitor and control a series or sprinkler valves and a multitude of sensors for pretty much any sized irrigation / hydroponic / aquaponic 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.

Hopefully, this might provide some inspiration for others in regard to their automation projects. Contributions are always welcome.</p>

<div align="center"><a name="top_menu"></a> <h4> <a href="https://github.com/rjsears/GardenPi#overview"> Overview </a> <span> | </span> <a href="https://github.com/rjsears/GardenPi/blob/master/enclosure/readme.md"> Parts List </a> <span> | </span> <a href="https://github.com/rjsears/GardenPi#dependencies"> Dependencies </a> <span> | </span> <a href="https://github.com/rjsears/GardenPi#install"> Installation & Configuration </a> <span> | </span> <a href="https://github.com/rjsears/GardenPi/tree/master/GardenPi"> Code </a> <span> | </span> <a href="https://github.com/rjsears/GardenPi#schematics"> Schematics </a> <span> | </span> <a href="https://github.com/rjsears/GardenPi/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc"> Todo List </a> <span> | </span> <a href="https://github.com/rjsears/GardenPi#icons"> Icons </a> </h4> </div> <hr>

<a name="overview"></a>Overview & Theory of Operation

Please visit <a href="https://www.hackster.io/user3424878278/gardenpi-powered-by-neptune-py-c0a691">"HERE"</a> for a very indepth writeup on more of the the capabilities or Neptune and the physical building of the actual hardware for GardenPi.

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 <em>our</em> needs ended up with the following configuration:

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

In addition to these zones/sensors, the system also interacts directly with our already installed power and water monitoring systems. This system was build 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. A script grabs all of this data and writes it to a MySQL database and sends the necessary information over to GardenPi. 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.

This is the broad overview of how the system is designed:<br><br> <img src="https://github.com/rjsears/GardenPi/blob/master/images/gardenpi_physical_20200803.jpg" alt="GardenPi Physical Layout" height="600" width="800"></a> <br><br> The goal of version 1.0.0 of GardenPi was to build and test the hardware and get the garden irrigation, sensor readings, and automatic water switching installed and working. As I progress with other versions I will continue to build out all other functionality as we continue to build out our gardens, hydroponics and aquaponics.

GardenPi is very flexable in regards to what you use, how many zones you want, if you want power zones, etc. If you have specific questions about the code or how things are put together, fell free to open an issue and I will do my best to help. <br><br>

<hr> <em>PLEASE NOTE: This project <b>IS NOT</b> intended to be a "plug-and-play" installation, rather a starting point for someone that wants to use all (or part) of the repo to monitor and manage their irrigation system(s). There <u>will be</u> significant modifications required by the user even if they are using a clean Pi install. Things in the code such as smart water monitoring and electrical monitoring are integrated with other sensors and automation platforms that I am currently using. I will try my best to point these areas out, but if you do not use those things, major code changes will have to be made to make GardenPi work <u>for you</u>. If you are not comfortable using Python and making these types of changes, this project might not be for you. My goal in later versions if to have flags for this and set them at runtime and not have so much code that needs to be manually corrected, but in version 1.0.0, that code will still need to be modified. Some examples are down further. <br><br> Hopefully, this might provide some inspiration for others in regard to their garden automation projects.</em> <hr>

<a name="dependencies"></a>Software Dependencies

There are a lot of moving parts to any particular project. I will try and list all of the dependencies that you will need to use this repo. It is outside the scope of this documentation to cover the installation and configuration of some of these items. Also, some of these are optional (like Influx/Grafana) depending on how much you want to impliment. Also, I don't plan on listing the more common libraries (like datetime) that come prepackaged with Python. If I had to add them (pip3 install xxx), I will try to list them here. I have included a <a href="https://github.com/rjsears/GardenPi/blob/master/GardenPi/requirements.txt">"requirements.txt"</a> file for use with pip3. Versions were as of this writing.

<ul> <li><a href="https://httpd.apache.org/">Apache2</a> or <a href="https://www.nginx.com/">Nginx</a> Web Server</li> <li><a href="https://www.mysql.com/">MySQL</a> or other SQL server</li> <li><a href="https://uwsgi-docs.readthedocs.io/en/latest/">Web Server Gateway Interface</a> (uWSGI) (for Flask)</li> <li><a href="https://www.influxdata.com/">InfluxDB</a></li> <li><a href="https://grafana.com/">Grafana</a></li> <li><a href="https://flask.palletsprojects.com/en/1.1.x/">Flask (1.1.2)</a></li> <li><a href="https://pypi.org/project/Flask-WTF/">Flask WTF (0.14.3)</a></li> <li><a href="https://requests.readthedocs.io/en/master/">Requests</a></li> <li><a href="https://pyyaml.org/wiki/PyYAMLDocumentation">PyYaml</a></li> <li><a href="https://dev.mysql.com/doc/connector-python/en/">MySQL Connector</a></li> <li><a href="https://github.com/influxdata/influxd

Related Skills

View on GitHub
GitHub Stars301
CategoryOperations
Updated9d ago
Forks30

Languages

JavaScript

Security Score

100/100

Audited on Mar 21, 2026

No findings