I don’t know where I got the idea to measure the temperature in the swimming pool. But it was an interesting project.

Hardware

It should be battery-operated, as 230V at the pool… You know what I mean. So a Raspberry was out of the question – it needs too much power. Something smaller was needed, a microcontroller, an ESP, or more precisely a Wemos D1 mini. Plus a battery and a board to charge the battery and supply the ESP with power.

The wiring of the sensor is relatively simple – plus (red) to 5V, GND (black) to GND and the data pin (yellow) to D4. The 4.7kOhm resistor must then be connected between D4 and 5V.

For the deepSleep to work later, we have to connect D0 to RsT. However, since the connection via USB will then no longer work, it is not particularly useful to solder them directly together. I do this with 2 short cables and a clamp.

In my case, the whole thing looks like this:

Software

One thing first: my program is not pretty and there are certainly many ways to make it better, but it works. I send my values directly to the Influx database ( it would probably make more sense – especially with multiple sensors – via MQTT).

The ESP then sends the temperature every 30 minutes. The data ends up on my Homeserver, where I can then visualise it with Grafana.

Visualisation

Here is some sample data over 7 days. In green the swimming pool temperature and in yellow the outdoor temperature:

Beispieldaten Pooltemperatursensor