Connect to your pool with OPNpool

Owning a backyard pool means learning about chemicals, vacuuming, brushing and adjusting the thermostats and circuits. A saltwater pool makes things a bit easier, but you still need to keep a good eye on the system.

The OPNpool project uses an ESP32 to monitor the pool controller, pump and chlorinator. It also lets you change the thermostats, heating modes and switch circuits. E.g. the home automation can run that 800 Watt pump when electricity is cheaper, and make the duration dependent on the temperature.

Thanks to those who reverse engineered the RS485-based protocol, OPNpool can tap into the communication between the pool components. The ESP32 shares the resulting state information as JSON/HTTP and can publish it using MQTT. Last but not least, it integrates nicely with Home Assistant thanks to MQTT Discovery.

Features:

  • Visualizes the status of the thermostats, pump, chlorinator, circuits and schedules.
  • Lets you change the thermostats and toggle circuits.
  • Connects to the internet
  • MQTT and Home Assistant integration
  • Over-the-air updates
  • One time provisioning from an Android phone
  • Web app UI
  • IP68 waterproof case and connectors
  • No power adapter required
  • Open source!
  • Tested with the Pentair SunTouch controller with firmware 2.080, connected to an IntelliFlo pump and IntelliChlor salt water chlorinator.

I have been using it for several years, and now can you can build it yourself for under $50. I released it as open source and hardware https://github.com/cvonk/OPNpool, including board file and bill of materials.

To give you more time in that outdoor chair, the WiFi and MQTT provisioning is from an phone app. It even supports over-the-air updates for when you decide to hack the software.

I assume this is to take the place of something like Haywards OmniLogic system and still requires hardware that would support that?

I have a new Hayward heat pump, a Hayward salt generator, but still using a very old school single phase pump that’s on 24/7. I toggle the pump on/off with a heavy duty smart relay which works just fine. I’ve been contemplating updating the pump with an OmniLogic pump so I could connect it all into HA, but with this would I be able to connect to both the heat pump and salt system and control those while still toggling the pump the way I have been?

This connects to a Pentair controller using the RS-485 bus. I am not familiar with other brands. The setup was all Pentair when we bought the house.

Very interesting project. I was planning to build a controller based on michaelusner design, but this one looks interesting as well. Couple questions, if you don’t mind.

  1. Do i need to use that dev board? If I already have a max485 unit and ESP32, will it do?
  2. Is there a simple step by step instruction how to deploy the firmware? (I mean, it is probably very obvious for people close to coding, but kind of a challenge for me) From a PC, as i don’t have any Android based device))

Thank you.

Hi, this is a very cool project, and i thank you for making it.

I already flashed the firmware on an ESP32 and bought the adapter, but when i went to wire it to my pool controller, the RS485 was already being used.

Does this mean OPNPool witll still work even though there are other things connected?


Also, do you think if i wire it to this board instead of the main one it will work?

Hi shanem, I also have a Pentair Easy Touch controller. Were you able to get OPNpool to communicate with your Pentair controller?

Hello,

at first i need to say thank the creator for the great work.
I also use your v3 board for connection.
But at present I am not able to get further.
The build runs like exprected, but the board does not connect to any wifi.
I hard coded the SSID and the passwort before the build.

any help would be nice.

Terminal output:
I (27) boot: ESP-IDF v4.4.4 2nd stage bootloader
I (27) boot: compile time 12:24:24
I (27) boot: chip revision: v3.0
I (30) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (37) boot.esp32: SPI Speed : 40MHz
I (42) boot.esp32: SPI Mode : DIO
I (47) boot.esp32: SPI Flash Size : 4MB
I (51) boot: Enabling RNG early entropy source…
I (57) boot: Partition Table:
I (60) boot: ## Label Usage Type ST Offset Length
I (67) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (75) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (82) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (90) boot: 3 factory factory app 00 00 00010000 00150000
I (97) boot: 4 ota_0 OTA app 00 10 00160000 00140000
I (105) boot: 5 ota_1 OTA app 00 11 002a0000 00140000
I (112) boot: 6 coredump Unknown data 01 03 003e0000 00020000
I (120) boot: End of partition table
I (124) boot: Defaulting to factory image
I (129) boot_comm: chip revision: 3, min. application chip revision: 0
I (136) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=24ba0h (150432) map
I (199) esp_image: segment 1: paddr=00034bc8 vaddr=3ffb0000 size=0592ch ( 22828) load
I (208) esp_image: segment 2: paddr=0003a4fc vaddr=40080000 size=05b1ch ( 23324) load
I (218) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=b0088h (721032) map
I (479) esp_image: segment 4: paddr=000f00b0 vaddr=40085b1c size=10804h ( 67588) load
I (519) boot: Loaded app from partition at offset 0x10000
I (519) boot: Disabling RNG early entropy source…
I (530) cpu_start: Pro cpu up.
I (531) cpu_start: Starting app cpu, entry point is 0x400812f4
0x400812f4: call_start_cpu1 at C:/espressif/esp-idf/components/esp_system/port/cpu_start.c:148

I (0) cpu_start: App cpu up.
I (547) cpu_start: Pro cpu start user code
I (547) cpu_start: cpu freq: 160000000
I (547) cpu_start: Application information:
I (551) cpu_start: Project name: interface
I (556) cpu_start: App version: v1.2.4-419-gb5d7baa-dirty
I (563) cpu_start: Compile time: Jun 4 2023 13:09:07
I (569) cpu_start: ELF file SHA256: c975ca0ef98206df…
I (575) cpu_start: ESP-IDF: v4.4.4
I (580) heap_init: Initializing. RAM available for dynamic allocation:
I (587) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (593) heap_init: At 3FFBA8C8 len 00025738 (149 KiB): DRAM
I (599) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (606) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (612) heap_init: At 40096320 len 00009CE0 (39 KiB): IRAM
I (620) spi_flash: detected chip: generic
I (623) spi_flash: flash io: dio
I (628) esp_core_dump_flash: Init core dump to flash
I (633) esp_core_dump_flash: Found partition ‘coredump’ @ 3e0000 131072 bytes
I (641) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (747) main: starting …
I (747) factory_reset_task: Waiting for 3 sec BOOT/RESET press …
I (757) wifi:wifi driver task: 3ffc45c4, prio:23, stack:6656, core=0
I (757) system_api: Base MAC address is not set
I (757) system_api: read default base MAC address from EFUSE
I (787) wifi:wifi firmware version: 6567a16
I (787) wifi:wifi certification version: v7.0
I (787) wifi:config NVS flash: enabled
I (787) wifi:config nano formating: disabled
I (787) wifi:Init data frame dynamic rx buffer num: 32
I (797) wifi:Init management frame dynamic rx buffer num: 32
I (797) wifi:Init management short buffer num: 32
I (807) wifi:Init dynamic tx buffer num: 32
I (807) wifi:Init static rx buffer size: 1600
I (817) wifi:Init static rx buffer num: 10
I (817) wifi:Init dynamic rx buffer num: 32
I (817) wifi_init: rx ba win: 6
I (827) wifi_init: tcpip mbox: 32
I (827) wifi_init: udp mbox: 6
I (827) wifi_init: tcp mbox: 6
I (837) wifi_init: tcp tx win: 5744
I (837) wifi_init: tcp rx win: 5744
I (847) wifi_init: tcp mss: 1440
I (847) wifi_init: WiFi IRAM OP enabled
I (847) wifi_init: WiFi RX IRAM OP enabled
W (857) main: Using SSID from Kconfig
I (977) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
I (1077) wifi:mode : sta (e0:5a:1b:62:d0:38)
I (1077) wifi:enable tsf
W (1087) wifi_connect: WIFI_EVENT_STA_START
W (3497) main: Wifi disconnect connectCnt=0, authErrCnt=0