View on GitHub

Rpirrigate

Raspberry Pi irrigation system software

Download this project as a .zip file Download this project as a tar.gz file

Welcome to RPirrigate page.

RPirrigate lets you use your Raspberry Pi (any model) to irrigate your garden. Forget about needing to go outside, with a lot of mosquitoes, just to irrigate your plants. With RPirrigate you can set up your custom irrigation plan using an awesome web interface and it will do everything for you.

Hardware

The required hardware is as few as possible. You just need to connect idraulic valves to the GPIOs using some relays. There are a lot of guides online so I won't talk about this again.

The Idea

The program is based on modules. Every modules is pratically a idraulic valve, theorically a set of plants which require irrigation together. For example if you have 5 apple trees, you can connect them to only one module. Every module has got an irrigation plan, which is a set of events. Every event tells RPirrigate to irrigate every X days at hour X (e.g. irrigate every day at 19.30). Every module may also manually be switched on or off, in order to allow you to test the system (or just to give more water!).

The Rain

Obviously, when it rains, you should't irrigate! RPirrigate uses some weather APIs to fetch the weather and will delay all events if it rains. Never waste water anymore!

Technical aspects

The program is based on two parts: one daemon and a web interface. The daemon is written in Python, using OOP paradigm and optimized for the low-performarce Raspberry Pi. So It does what It needs only when it really needs it! The web interface is written in PHP and uses a customized version of lighttpd web server listening on port 883. Web interface and daemon communicate using a MySQL database. The web interface sends unix signals to the daemon when it has to reload things from the database, so everything is optimized and there is no useless access to the database.

License

The code is released under the following license: Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)