The Smart Pool (4/4)

In the preceding article we have connected the pool controller with openHAB. Above the surface of the Sitemap in openHAB settings the parametres can be simply put in the section for the temperatures. The rules react to these changes.

Now it is a matter of making the control also really smart: the regulation runs automatically and can be adapted about WLAN or Internet.

Control control of the pool

For the warming of the pool we have implemented three modes:

Mode: Car

The fully automatic mode switches the filter pump time-steered and automatically warms up the pool water up to a maximum temperature. Nevertheless, this is not fallen short only so long the least temperature in the heat accumulator.

Mode: Boost

Comparably with the mode "car", however, without consideration of the least temperature in the heat accumulator.

Mode: By hand

The pumps are switched on and switched off about the application by hand. Regardless of rules and Schwellwerten.

The limit values

For the control of the temperature of the pool the following three parametres are required:

  • maximum pool temperature: How warm should the pool become?
  • minimum heat accumulator temperature: Which temperature must at least have the water in the buffer memory that the pool can be coheated?
  • Hysterese: How big should the temperature divergence be before the min / max. rules affect?

The smart heart: pool.rules

The rules in pool.rules are deposited the rules from openHAB. These rules use the configuration values which one can fix about the settings.

Here the values of the temperature sensors are compared and steered with the help of the Hysterese then the radio outlets. The Hysterese it is necessary, so that with very low temperature differences the pumps are switch on and switch off not constantly. A value of 0.5K is has turned out complete enough.

The rules are split and serve thus the single company modes.

Add-On: Display module

To pursue the temperatures also without application, we have put a small monitoring application in an old screw box. This module originated on the basis of the LCD display, also in a former one Blog article it was introduced.


This pool monitor is based on an ESP8266 and a display LCD 16 x 2. The ESP receives the temperature values - also about MQTT - and updates the display.

The source code in addition is also in the Code-Repository and has originated derived from the pool controller.

The case is an old screw box which was padded with some filler. Some Tricky was the drilling for the Micro-USB plug. Maybe the next year this box upgegraded and with a solar cell is equipped. Then this can be also installed outdoors near the pool.

Open Source

Aim was from the outset to provide a project based on Open Source. Thus an Open Source project has originated of course also again.

The whole project is available on GitHub:

And thus the installation of the system looks to the author:


Installation with the author



The pool controller is since May in use an application and has functioned after a few improvements all summer long reliably.

Main problem was, actually, the missing check whether the WLAN connection still exists. We always thought, we a Leak has somewhere in the code, besides, the ESP controller has lost now and then only the connection about the WLAN. Now the controller runs reliably, delivers data and steers the pumps.

Since this year there is a nice warm pool and, nevertheless, always enough warm water in the household. A project with clear added value in comfort with relatively low financial application. The project thereby has also a very high one Woman acceptance factor achieves.


There are still some possibilities to improve the project about the next winter and to extend. We think there in

  • Temperature sensor directly in the solar circulation to examine whether the heating is in the solar mode or heating mode
  • Outdoor sensor for surroundings temperature and water temperature with care about solar cells
  • The control control directly in the ESP code on the pool controller (only update of the configuration and monitoring about MQTT)
  • More security by encoding of the MQTT communication
  • Measurement of the water quality (pH, chlorine) by additional sensors
  • Include to the weather forecast to divide the buffer memory even more optimally

We are glad about copies, inspired projects and proposals for other improvements. With pleasure also as Pull-Requests on GitHub.


DisplaysEsp-8266Projects for advancedSmart home





Womit genau wird der solarkreislauf geschaltet? Mit einem stellantrieb oder ähnliches? Danke im Voraus :)

Stephan Strittmatter

Stephan Strittmatter

Hallo Ingo,

leider sehe ich als Autor die Nachricht erst jetzt. Am besten du verscuhts mich mal über Twitter (@_stritti_) oder über das GitHub-Projekt ( zu kontaktieren.

Viele Grüße,




es ist ein sehr interessanter Bericht. Habt ihr gut beschrieben. Könnten wir uns einmal zusammen unterhalten, da ich auch gerade an so etwas ähnlichem Arbeite, für ein Ideenaustausch?

Leave a comment

All comments are moderated before being published

Recommended blog posts

  1. Install ESP32 now from the board manager
  2. Lüftersteuerung Raspberry Pi
  3. Arduino IDE - Programmieren für Einsteiger - Teil 1
  4. ESP32 - das Multitalent
  5. OTA - Over the Air - ESP programming via WLAN