Automation 2.0 lesson 20. Plugin for the Aqara leak sensor, water control in the pool (tank)

Lesson 19(2)___Automation 2.0 continuation of lesson 19. Open/closed status information for the Aqara U200 lock (as well as locks of all types of Aqara)
Good afternoon.
I will start my anniversary 20th lesson due to the inspiration of this post on this topic ( [Easy Points] What if you could design your own device plugins? )
I wanted to write the topic of water level control back that year, but I could not get around to it. After @Sonja request, I decided to write my lesson on creating automation for water level control. Just for information, I have been using this control in the food water tank for more than 4 years.
Let’s get started.
Introduction.
We use the following devices.
1- Aqara leak sensor (emergency level).
2 - Aqara leak sensor (working water level).
3 - Aqara socket (square EU) or Aqara Power Plug H2.
The tank, pump and pins (electrodes) in the tank by default.
The first part.
We install Aqara leak sensors. The leak sensors have electrodes that can be easily unscrewed with a hexagon and connected to the water level electrodes located in the tank. The figure shows 1 sensor (emergency) and 2 working sensors connected.
The pump pumps water into the tank using the square EC Aqara socket.
Fig.1

The second part.
We use automation 2.0.
Automation of turning on the pump by sensor √2. “On pomp REZERVUAR”.
Description - if the leak sensor is dry, the pump will turn on after 30 minutes. Automation is started using the “…” “Duration” option. The user can set his own turn-on delay time, it depends on the rate of water use (experimentally).
The algorithm of operation, if the water in the tank drops below the level, water use continues, but after 30 minutes, the pump will turn on and pump water to the sensor. With this method, I use one sensor to make a hysteresis for the water level (not a fixed water level but a variable one).
Fig.2

Automation of turning off water pumping “Off pomp REZERVUAR”.
Description - if the water level has increased to the level of the Aqara leak sensor electrode (2), we delay the shutdown for 2 minutes to make a water supply. This delay time can be chosen by everyone, depending on the tank and the power of the pump.
Fig.3

Automation of emergency water shutdown “Alarm!!! Off pomp!!! Alarm water!!!”
To ensure water overflow (flooding of the room, overflow in the pool …) we use an additional Aqara leak sensor √1.
There is a group of automations for this.
In case of sensor √2, the Aqara smart socket is turned off.
And the automation is turned on, which always turns off the socket when it is turned on “Alarm!!! Off pomp!!! Off switch!!!”
Fig.4,5


When the sensor √1 becomes dry, then the automation “NO Alarm!!! On pomp!!! On water!!!” is turned off, the automation “Alarm!!! Off pomp!!! Off switch!!!” and the control system works in normal mode.
Fig.6.

I supplement this description of the operation of my automation with drawings of plugins that I generated in AI.
Fig.7

This will end this lesson.
Thank you for reading and sharing the topic (you can also on other platforms with a link to our forum).
More to come.

Lesson 1_ Automation 2.0 Tutorial Collection - Lesson 1 report

14 Likes

Very interesting idea. Posibilities are unlimited. Thanks for sharing your lesson with us !

5 Likes

:clap: Extremely helpful!

2 Likes

Awesome and great project you showed us @gafich10
Always a pleasure to see your automations and ideas :bulb:
I think your complete house is a huge Aqara lab :enqjol2bgmcitcrmcmgdyz_61:

4 Likes

Hello.
Not that big, but a laboratory. :rofl: I’m currently working on the next topic on Aqara locks.

4 Likes