Wireless (Sorta) Irrigation Extender Using ESPHome

I had an issue with our irrigation system that ESPHome made pretty easy to solve and thought I might share.

We moved into our current house and did a ton of landscaping. While the previous owners had installed an irrigation system, the existing zones didn’t really match up well with our new planting scheme. Our contractor said they could add a couple of valves and split up some of those zones, but the issue would be wiring. Our controller is in our below-grade garage which is basically a concrete box. They would have to drill holes through 6 inches of concrete and then trench the wires in for about 200 feet in order to reach the right valve box. Expensive and we would have to dig up some of the same plants we’d put in earlier.

A while back, we swapped the existing simple irrigation controller out for a Rachio unit. It can handle up to 16 zones, only 8 of which were used in the original install. The Home Assistant Rachio integration is very good, and I use it to help tie in the local rainfall conditions measured by my weather station into the watering schedule. So, I decided to take advantage of that integration and built what I called a wireless irrigation extender.

The hardware is pretty simple – a 24 VAC transformer, 24VAC to variable step-down buck convertor, a 4-way opto-isolated relay board and D1 Mini running ESPHome.

I expose the relays as simple switch entities and use four digital I/O pins to drive the 3.3V opto-isolators that in turn drive the 5VDC relays. (Finding a relay board that would actually work with 3.3V logic took more doing than it should, but this board is very easy to use and supports the use of different voltages for the relay coils and opto-isolators which makes things easier.)

The 24VAC transformer was repurposed from the old irrigation system and powers both the valves and rest of the electronics through the buck convertor. The buck convertor supplies the 5VDC to the D1 Mini, and I tap into the D1 Mini’s 3.3VDC pad to provide Vcc for the optoisolators.

Mains power for the transformer comes from my adjacent landscape lighting controller (which uses a Sonoff Basic also running ESPHome) and I used a weatherproof housing fastened to a wall to enclose the electronics. This is about 25 feet from the valve box, so I just had to bury the wire under my lawn which was easy.

I use a simple Node-RED flow to listen for state changes from the respective Zone entity (Zones 9-12 in my case) exposed by the Rachio integration and that turns the corresponding valve switch entity on or off. Very simple and still supports the normal Rachio scheduling through their app, so it’s effectively transparent to anyone using Rachio.

All in all, a useful and satisfying project and our irrigation system now does what we need it to do.

1 Like

In conduit I hope.

No need, irrigation cable is designed for direct burial.

1 Like

Exactly. Five wire direct-bury cable.

One wire for each valve and one common.

I thought you were referring to the mains.

The mains came from another box below which has a Sonoff relay running my landscape lights. And Yes, those wires are indeed in a short piece of conduit which you just barely see at the bottom of the photo. The mains area also GFCI protected for safety.

Understood, thanks and sorry for the undue noise.