Swimming-Pool Automation Systen with Raspberry Pi + Home Assistant
A cost-effective, easy-to-build, easy-to-use "Swimming-Pool Automation System" with top functions to automate, control and monitorize (from web) small-medium size swimming pools.
- Automatic filter control (fixed and dual-speed pumps, 1 or 2 daily cycles) based on temperature.
- 3 sensors:
- water temperature (one-wire DS18B20 waterprof)
- ph and orp with EZO circuits. A custom UART sensor for HA has been developed.
- and minimun of 4 relays or 6 controlling :
- pump on/off and pump speed (high/low)
- muriatic acid injection (to regulate pH) and bleach injection (to mantain sanitization level)
System is intended to monitoring and automagically control most important functions and notify to mobile all possible events.
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 hassbian in a raspberry pi (3 or 4), and give wifi connection. (If advanced user, you can instead install raspbian + Home Assistant with this prefered method)
- Copy 'custom_components', 'packages' folders (with all paths and contents) and 'ui-lovelace.yaml' frontend file in homeassistant conf_dir ( i.e. /home/homeassistant/.homeassistant/ ).
- Modify your 'configuration.yaml' (including ' packages: !include_dir_named packages', disabling automations, scripts and groups, discovery and lovelace in yaml mode) as example in code
- Create/modify proper 'secrets.yaml' for apis (latitude/longitude, pushbullet api, openweathermap api, etc).
- Correction of FC-ORP based on CYA (actually only linear correction)
- SWC – Salt Water Chlorinator (instead of bleach injections)
- Control Variable Speed Motor based on 3 digital inputs (0 to 7 speeds)
- Integrate mega-io board (relays and ACD with i2c control) instead of actual gpio-relay HATs
For pumps <= 1.5 HP, a external sensor to measure power consumption and safe motor (based on sonoff POW)
Thanks to Hidromaster, Piscidoc, and all DIY enthusiasts from hablemosdepisicnas and TFP forums.