Pool Monitor Overview
I started this project because I wanted to learn more about my Raspberry Pi and also create something that would be useful to me in the real world. I ended up making this pool controller because, quite frankly pool maintenance is tedious work, so it was time to see if I could automate some of it with the Pi.
Given that I don’t have a background in coding or webpage design I wasn’t sure if I was even capable of doing it but with a bit of persistence and a lot of searching I managed to get it up and working. It has now been monitoring my pool since October 2015 and still seems to be going well. I am hoping that in writing this blog I will achieve 3 things, firstly it will force me to go back over the code and make some changes and improvements, secondly give me a reference to look back on so I can remember how I put it together in case I want to make changes in the future and finally I hope that by writing it all down you may also find some of this useful with your projects.
So here is what I set out to achieve:
1. Provide monitoring of 5 sensors
- ORP (Oxidation/Reduction Potential) – This can be used to measure chlorine levels
- Salinity (Electrical Conductivity)
- 2 x Temperature
2. Record current sensor values and also graph long term readings.
3. Send an email when the pool chemistry is incorrect and suggest corrective action to restore the balance.
4. Control 4 x AC GPO’s that can be used for Pumps, Lights, Waterfalls etc. with multiple different timer settings.
5. Create a Webpage and Phone App to access readings, settings, graphs and control the timers.
Here are a few pictures of the final unit.
Web based Control and Monitoring Panel
The Main page provides monitoring and control of everything that is attached to the HydroPi.
The graphs page presents a chart for each of the sensors that are connected and allows you to look back over a range of time periods by selecting from the menu above the graphs.
The Timers page provides access to each of the GPO outlets on the Hydropi and allows you to set multiple timers for each. Fill in just the number of timers that you require. Once you are happy select submit and all timers for that GPO will be updated. To clear all the timers simply select Submit with no entries in the form and all current timers will be removed.
The GPO’s are numbered 1 to 4 from left to right when facing the unit.
This page explains how to correct any water chemistry problems that exist in the pool and makes recommendations about the quantity of chemicals to add for chemicals that are not monitored by the sensors.
This page provides a simple way of deleting various amounts of historical data from the graphs, reboot and shutdown buttons and all the various other settings in the database.
The control software is written in python, the webpage in PHP and it’s all available on GitHub, if your curious on how to create this yourself, here I’ve collected all the relevant articles and a parts list.
If you have any suggestions or ideas please let me know in the comments below.