Introduction: YAWT (Yet Another Watering Timer)

In my house by the sea, I have an irregularly shaped garden. The water available (from the consortium well) has a limited flow rate: it is necessary to divide the irrigation into numerous areas, to be activated in sequence. So I make two timers to handle 8 zones.

Each timer manages 4 zones: with 'smartLife' or with 'tuyaDeamon' I can program the intervention times and the weekly schedule per zone, getting full control from anywhere.

At the same time, in local, a remote control allows me to start and stop the irrigation of each zone at any time.

Step 1: Hardware

A distributor connects 4 solenoid valves to a tap: it is made with standard ½ inch PVC joints.
Solenoid valves are spare parts for standard household appliances (https://www.aliexpress.com/item/32691601093.html) (3.00 €).

In the joints I used Teflon (PTFE) tape, but this solution does not mechanically block the individual joints well: it is better, for this application, to use a suitable PVC glue.

Starting from left, all PVC ½ inch thread:

  • 90deg Elbow Fitting F-M
  • Tee Fitting Sockets F-F-F
  • Double nipple
  • Tee Fitting Sockets F-F-F
  • Double nipple
  • Tee Fitting Sockets F-F-F
  • 90deg Elbow Fitting F-M

As seen in the photo, the openable connection between the tap (1 inch) and the distributor (½ inch) is made of brass.

A ½ thread quick connector (Gardena) is fitted to each valve output.

Step 2: Electronics

The two circuits envisaged by the project are contained in a watertight box:

  1. 220VAC/ 5VDC / 5W "Hi Link" monolithic power block (https://www.aliexpress.com/item/32610673886.html) (2 for 5.7 €)
  2. Tuya compatible board with 4 relays (https://www.aliexpress.com/item/4001268704361.html) (13.31 €)

The wiring needs to be done with some care, but it's simple.

For the 5V I used a mini USB connector, with the cable tied to the power block: I used a small board and two-terminal screw connectors.

For the 220 AC, I used two big terminal blocks barrier screw.

To ensure insulation and safety, I used polyurethane foam over each solenoid valve, and then I individually covered each valve with a small plastic container, which acts as waterproof protection. As further protection, a metal cabinet (connected to earth) with a door is provided to enclose the whole.

Of course, the 220 AC line is equipped with a differential breaker safety switch.

WARNING: The 220 AC near the water is potentially very dangerous. Follow all local regulations in force for wiring and insulation. Keep children and animals away.

Step 3: Notes on SmartLife

For the remote control, I used a 'ZigBee 3.0 Wireless Portable Remote Control' with 3 push buttons (https://www.aliexpress.com/item/1005003432430621.html, € 14.35, available with 1,2,3,4 buttons) that allows you to send 9 different commands.

And of course, I use a ZigBee gateway (shared by other devices as well, a Tuya Smart Home Multi-function -IR, BLE, ZigBee- WiFi gateway), and a WiFi router (I use the YIZLOAO 4G WIFI Router LM321-2 with a free data sim 50 G/mo by Vodafone).

SmartLife, the standard free Tuya app, requires that the Tuya relay boards and the remote control be added according to the instructions, with the relay board having a dedicated button and the remote control having to be linked to the ZigBee gateway (long press button 1).

In SmartLife about the relay board:

  • set 'Device mode' to 'Interlock', to activate only one relay at a time.
  • in the 'timers' define days and times for switching ON and OFF each relay.

For the 3 Gang:

  • For each button, there are three programmable conditions: single click, double click, and long press.
  • As task, I set 'toggle status' for the required relay.
  • I added also 'switch all: OFF' to the other timer so that two relays will never be ON at the same time.

This is a very simple solution, which requires only the standard Tuya automation.

TuyaDAEMON can be used for more advanced automation purposes, such as minimizing water consumption based on season and rainfall (see for example the 'watering_sy' project https://github.com/msillano/tuyaDAEMON/wiki/deriv... ).

Step 4: WEB Map Interface

To manage photovoltaics and irrigation, I installed TuyaDEAMON in a [Andtroid X88 top-box] (https://github.com/msillano/tuyaDAEMON/wiki/deployment:-android-server#2022-update) and I made a dynamic interface: The garden map (created with the Gardena program) with 7 dynamic icons, in two colors (ON-OFF), one for each irrigated area.

The icons are updated in polling, and a mouse click causes the valve to toggle.


I also measured the flow rate in liters/minute of each sprinkler and evaluated the affected area. The target for the lawn is 6 liters / square meter/day (summer). With these data, I was able to calculate the watering times for each zone, which vary from 10 to 35 minutes.