Poupool is a swimming pool control software.
It is based on Transitions, Pykka and Paho MQTT. The user interface is built using Home Assistant (with Lovelace dashboards) or any MQTT client to interact with the system.
This is meant as a personal project and will likely never be a fully-featured software. However, it would be awesome to see it running somewhere else. Poupool runs on a Raspberry Pi 3 Model B and most of the hardware is COTS (commercial off-the-shelf). If you want more information, feel free to contact me.
Originally, I wanted to experiment with asyncio but finally chose to go with a more traditional
approach (actor model and finite state machines).
Poupool currently controls filtration (including backwash), heating (heat pump), pH and chlorination, cover, lights and all the pumps and valves of the system. It is used for an overflow swimming pool so that adds some complexity to the control process (e.g. monitoring of the retention tank water level).
The main interaction with the system is done through modes. Here are some of the main ones:
- 🌿 eco : cover close, filtration, pH, chlorination and heating are automatic
- ⏸️ standby : cover open, no overflow
- 🌊 overflow : cover open, overflow, chlorination is forced
- 🛋️ comfort : cover open, no overflow, heating is forced
Several other features are available like a wintering state stirring the pool to avoid as long as possible having the water freeze, a stirring feature when the cover is closed to dissipate the heat forming just under the cover, the control of a swimming pump and more.
You can use the Home Assistant companion apps on iOS or Android, use the provided
Lovelace dashboard (home-assistant/dashboard.yaml), or interact directly via the MQTT API.
These are the external dependencies that can be installed via uv. You will also need Python 3.11+.
Best is to setup a virtual environment by running uv sync.
- Pykka - Python implementation of the actor model
- transitions - Lightweight, object-oriented finite state machine implementation
- paho-mqtt - MQTT client library
- astral - Calculations for the position of the sun and twilight
- RPi.GPIO - Control Raspberry Pi GPIO channels
- adafruit-circuitpython-ads1x15 - CircuitPython driver for ADS1x15 ADCs
- adafruit-circuitpython-mcp4725 - CircuitPython driver for MCP4725 I2C DAC
- Home Assistant - Open-source home automation platform
- uv - Fast Python package and project manager
- ruff - Fast Python linter and code formatter
- ty - Fast Python type checker
- pytest - Testing framework
- PlatformIO - Build and flash the Arduino firmware (see
arduino/cover/README.md)
