Swimming-Pool Automation Systen with Raspberry Pi + Home Assistant
Disclaimer: THIS IS VERY MUCH A WORK IN PROGRESS, DO NOT EXPECT TO CLONE THIS AND HAVE A WORKING SYSTEM JUST YET!!!
A cost-effective, easy-to-build, easy-to-use "Swimming Pool Automation System" with top functions to automate, control and monitor (from web) small-medium size swimming pools.
- Automatic filter control (single speed pumps) based on turnover, temperature and energy tariffs. Manual scheduling too. The power relay used needs to be able to withstand the Inductive Load of the Pool Pump motor.
- 3 sensors:
- tentacle (whitebox T3) carrier board with
- ph, orp, and RTD. A custom I2C sensor for HA has been developed.
- and 8 relays (custom HA component for sequent 8 board relay). The relays control :
- pump on/off
- muriatic acid injection (to regulate pH)
- bleach injection (to mantain sanitization level) or salt chlorinator control
The system is intended to monitor and "automagically" control most important pool functions and notify to mobile all possible events requiring attention.
Integrated Node Red for advanced automation functionality.
Follow instructions in wiki howto build a bypass to connect sensors to the pool, howto connect sensors to the raspberry pi and howto connect relays between pumps and raspberry pi
-
Install HAOS in a raspberry pi (3 or 4), and setup wifi connection. (If an advanced user, you can instead install raspberry pi OS + Home Assistant Core) PLEASE DO NOT ASK FOR ASSISTANCE IN INSTALLING HA. It is an overly, unnnecesarly complicated process that should be fully suported by HA.
-
Install Node-Red
-
Copy/clone this repository in the homeassistant conf_dir ( i.e. /home/homeassistant/.homeassistant/ or /mnt/data/supervisor/homeassistant/). The following form allows you to initialize a non-empty directory:
git init .
git remote add origin <repository-url>
git pull origin master
-
Create a 'secrets.yaml' file under the config_dir directory, containing:
latitude: <latitude>
longitude: <longitude>
openweathermap_api_key: <key>
pushbullet_api_key: <key>
-
Start HA and access http://<sparkly.local>:8123
-
Because HA is so wise, you'll need to enable the following integrations via UI (TODO: is there a way to fix this?):
- Scheduler
- OpenWeatherMap (you'll need to supply your API key, even if you already set it in your secrets file above)
- Change your HA panel configuration to point to your NR installation (check panel_iframe in configuration.yaml) (NR runs at http://<sparkly.local>:46836)
- Connect your node red installation to HA.
- Generate a long lived token.
- Configure HA node in Node Red UI
- Water temperature (1-wire DS18B20 waterproof)
- SWC – Salt Water Chlorinator (instead of bleach injections) - in progress
- Improve calibration (3-point for pH)
- Heater control
- Correction of FC-ORP based on CYA (actually only linear correction)
- Control Variable Speed Motor via RS485
- Two speed pumps (re-add support)
This is a fork of raspipool HEAVILY modified. Thanks to segalion for the original work. Thanks to Hidromaster, Piscidoc, and all DIY enthusiasts from hablemosdepisicnas and TFP forums.