The Pool Monitor is a small additional device to show current pool data using e-ink displays:
- Temperature of the pool water
- Temperature of solar storage
- Pool pump status (on/off)
- Solar heating status (on/off)
- Configurable MQTT server
- Automatically connect to MQTT messages of pool controller
- Open hotspot (captive portal) to configure WiFi and MQTT server
- Home Assistant MQTT Discovery compatible (reads pool-controller state topics)
- Time sync via NTP (europe.pool.ntp.org)
- Deep sleep operation for battery-powered use
- OTA firmware updates via GitHub Releases
- System monitoring with watchdog and memory checks
- Boot-loop detection for reliable operation
- Solar powering using solar panel
- Nice case to place outdoor at pool
- Support of different displays
- Ability to switch on/off solar heating
- Ability to switch on/off pool pump
- Ability to change controller mode (auto, manual, ...)
- Ability to configure pool controller
The Pool Monitor follows the same architectural patterns as the Pool Controller for consistency and maintainability:
All code is organized under the PoolMonitor namespace, matching the PoolController namespace pattern.
- PoolMonitorContext: Main singleton context that owns all subsystems
- SystemMonitor: Watchdog, memory monitoring, and boot-loop detection
- NetworkManager: WiFi and MQTT connection management
- DisplayManager: E-Ink display management
- OtaUpdater: OTA firmware update checker and installer
- TimeClientHelper: NTP time client and timezone support
- RAII: Resources are managed through constructors/destructors
- Singleton Pattern: Subsystems are accessed through static methods
- Dependency Injection: Preferences and other dependencies are passed during initialization
- Error Handling: Graceful degradation with clear error messages
- Memory Safety: Stack-allocated buffers instead of heap allocation where possible
Run the local quality gates before pushing changes so lint findings are fixed before CI:
- Install Python-based linters once with
python3 -m pip install --user cpplint yamllint markdownlint-cli2andjscpdare executed on demand vianpx- Stage your changes first, then run the following Bash-only snippet (
mapfile, arrays andgit diff --cachedrequire Bash)
platformio check --environment LILYGO_T5_V231 --skip-packages
platformio run --environment LILYGO_T5_V231
mapfile -t cpp_files < <(git diff --cached --name-only -- '*.cpp' '*.hpp' '*.h')
((${#cpp_files[@]})) && cpplint "${cpp_files[@]}"
mapfile -t md_files < <(git diff --cached --name-only -- '*.md')
((${#md_files[@]})) && npx --yes markdownlint-cli2 "${md_files[@]}"
mapfile -t yaml_files < <(git diff --cached --name-only -- '*.yml' '*.yaml')
((${#yaml_files[@]})) && yamllint "${yaml_files[@]}"
npx --yes jscpd --config .jscpd.json src .github/workflows
python -m json.tool .jscpd.json > /dev/nullsee: https://github.com/smart-swimmingpool/smart-swimmingpool.github.io/discussions