How to create a low water level detector for your pool

I have a swimming pool at home, which I need to refill with water every few days due to evaporation. I’d like to know when the water level is below a threshold, but I haven’t found any Tuya sensor to monitor water level.

So I have installed this Zigbee water leakage sensor ( in the swimming pool, and I am using it in an unexpected way – I don’t want to detect water but lack of it.

This sensor has two states: normal and water detected. In normal situation, the sensor is covered by water and it only goes into normal state when water level has decreased a few centimeters.

So I have created a condition that goes TRUE when sensor turns into normal state (no water detected).

Condition only goes TRUE if it has been TRUE for 2 hours. Reason is that, due to the natural water movement (or wind), sometimes sensor switches states every few seconds. Two hours is enough to make sure that water level is well below the threshold.

The logicblock which is triggered by this condition sends a notification to my mobile using an HTTP request to my favorite notification service, Vybit


A nice use case, thanks!
I guess you don’t get a lot of rain to fill up the water… :laughing:
I have a LoRaWAN water detector that I want to put in a rain tank in the garden to let me know when it’s full (because I should then re-route the rainwater to somewhere else :cloud_with_rain: )

1 Like

Rain? What is that? :rofl:

Hi @teknofilo
While it is probably more fun to control it manually, I use a dedicated product to do this, and to fill up my pool automatically, though I needed to import it from the US as it wasn’t available in Europe as far as I could see.
LevelSmart Wireless Autofill: Worlds most reliable pool filler! – Kona Labs Manufacturing and Sales

Although lots of things attached to my pool are controlled by Apilio, this one (which is not) has the advantage that the sensor is truly wireless and can be positioned inside the skimmer so it isn’t visible. As it is linked to an automatic valve that I have plumbed into the pump room, the water level is controlled without needing to worry about it.

However, the way the dedicated product works means that I can offer a suggestion. The valve controller on the Kona system is not too dissimilar to the following Tuya device, which is sold as a “garden irrigation system”

WiFi Control Garden Irrigation System Sprinkler System Controller Outdoor Garden Timer Automatic Watering Device (

If you plumbed this so that it connected between a water supply and your internal pool inlet piping then you could switch it so that water flows to top up your pool when required. I have something similar (from the Kona system) connected so that water can flow into the pipe that goes back to the pool from the circulation pump (after the filter and the heater).


1 Like

Sun? What is that? Although I have an auto top-up device installed, given the weather in Wales is rather different to that in Madrid, I probably would have more use for something that pumped the water out when it got too full :grin:


Great stuff. Is anyone using Apilio to measure chemical levels and dose when necessary?

I don’t know of anything that gives accessible readings frequently enough. I have a Bluriiot device that records pH and ORP, and can be accessed online via their app. But they stopped IFTTT support so you can’t get at the values any more, and in any case it only gives readings every 70 minutes which isn’t enough for fine control. I do have automated pH and redox control for the pool, but by using dedicated systems (POOLeasy pH and POOLeasy redox). These work well, but have no web interface. However, the Bluriiott device keeps me informed, in case things go wrong (such as running out of chemicals…).

The big issue with trying to do something like this with Apilio is that if the online connection failed you would risk making quite dangerous chemical additions, which is not going to happen with the hard-wired devices. Having a lamp not switch on because the WiFi is down is one thing, continuing to pump hydrochloric acid into the pool is quite another!

1 Like

Yeah super interesting but I suppose I would assume one stops dosing if there is no connectivity?

The issue is that you can’t switch something off (or on) if you don’t have connectivity. This is the big limitation of using smart devices that depend on network connectivity.

1 Like

This is how my system is plumbed. The Tuya valve controller that I linked to has very similar connections so it should be possible to use it and control via Apilio as required.

1 Like

Yeah fair point. Sounds like we need an on/off switch, controlled by a keep-alive ping

I share the concern of Internet connectivity or SmartLife cloud going down, and flooding my house so, for the time being, I’ll stick to refilling the pool manually :smiley:


I worry about this too for critical systems. So far I have shied away from implementing remote control in these circumstances, but do have a solution for how to get round this problem (which is basically what @DanT suggests). There are quite inexpensive timer switches that are designed to provide power for only a set period (2 min to 2 hours for the example below)

Electronic Timer Adjustable - 2 Mins - 2 hours | Elkay (320A-1) (

If the input power feed to this was from a Tuya “light” switch, then turning the smart switch on would provide power for a limited period, irrespective of connectivity. In the case of a pool water feed, the dedicated system I have fills the pool for 6 min every hour when the sensor reads that the pool is low. It would be easy to replicate this using a smart switch coupled to the electronic timer, without risking that a Wi-Fi outage could leave the water permanently on.

In other instances, pinging the power on status of a Tuya switch connected to the electronic timer would maintain the “on” state in a way that meant it always switched off (after a short time) in the event of a network outage.

1 Like

where’s the challenge in that? I thought you liked living on the bleeding edge of automation? :crazy_face:

I do, my wife doesn’t… :stuck_out_tongue:


:astonished: yeah it can be lonely on this side of the automation divide…