There is a thread here - Garden Irrigation - which whilst old and long is an excellent resource that I encourage anyone interested in using HA in conjunction with their garden irrigation systems to read. It is full of very useful information and various different ideas and implementations for setting up a system.
Some months ago I posted my own code there and I know from feedback that it was picked up by a few people. It’s been winter here for several months so I haven’t used it for a while but I have been maintaining it to deal with breaking changes and have made a few small additions and improvements based on things I have learnt from others in this forum. I also updated it to work with Lovelace.
I recently had a message form someone asking if I would share the most recent version so I have decided to put the code on GitHub for anyone who is interested.
Awesome stuff. For completeness I would love to see the hardware you have in this thread too, can do?
I’m so close to this adventure now after so many delays. Just waiting on a final design from the irrigation company so we can kick off on the plumbing.
Looks like I’ll be using your code! I’ll be looking to integrate a flow meter - this way I can see how much I have used in the garden and current flow rate per minute, but also if the pipes/solenoids have started leaking (showing an unexpected flow) or if watering isn’t happening when the system says it should be (pump or solenoid fail)…
I’m also looking at a pool top off zone… Should be easy!
Love the simplicity of your solution.
(My hardware should be an esp8266 or esp32 depending on WiFi reception, a small display, and an 8 way relay board - 24v Hunter irrigation gear and Toro fittings)
I am one of those who uses the Klogg code that I still thank the incredible work done, as hardware I use a Sonch 4ch with Tasmota firmware and following this guide (https://www.youtube.com/watch?v=_ymyczBpmec ) with only 30 $ I did everything! in the past I built the hardware myself but I preferred to use the Sonoff for the low costs.
I have a 5th zone which is separate as we only set it up when we go on holiday and it too uses a Sonoff Basic and another of the same transformers and has it’s own valve. It feeds some drip lines and a soaker hose.
I am pretty sure I haven’t done things the most economical way but it works
And better still my wife (who is chief gardener here) loves it and appreciates HA because of it
Why have 4 transformers? Do you ever run more than one station at a time?
I run a single transformer and switch the 24VDC side with relays connected to an ESP8266.
You have certainly put A LOT of effort into the control side of things regards to weather offsets etc. (well done!) I went with a basic approach and just look at any rainfall that has been recorded prior to the irrigation running, or the chance of rainfall for the rest of the day. No where near as impressive as what you have.
Great ideas. I am still at the workbench stage. So far I have a single Nodemcu esp8266 driving 16 relays using esphome. My plan is to have 2 separate zones but using a esp32, one zone for the back yard, the other for the front.
On my todo list:
For each ESP32:
8 ouputs (easily expand) driving the relays
8 inputs (easily expand) to allow manual operation via a rotary switch with manual over-ride (Something the wife wants), albeit this still talk to hass. So you can switch between auto or manual.
Bluetooth to receive from miplant sensors due to their limited range and relay to hass
While the ESP32 has bluetooth I haven’t actually tried it as per above yet.
All of my valves run off 24VAC.
Just a little pic of the NodeMCU ESP8266 with 16 relays. I did do it with 80 relays, just to see how it would go, and it was fine. Only tried 80 as I ran out of relays. Not that I could see myself ever needing that many.
Yes… As I have already said this was the first thing I did with HA and coming from an entirely ‘Big Corporate’ IT background I had never really come across ‘small’ IT before. This was my first RPi and I had never even heard of Arduino or NodeMCU, never really had any visibility of (dare I say it) ‘hobbyist’ sensors and still thought a breadboard was something you, err, cut bread on. That along with only having (proficient) DIY level electrical skills means that, yes I am pretty sure now that what I have done was overkill!
Because I didn’t know any better! To be honest I’m still not confident enough to play with mains wiring unless I am 100% sure it will work and be safe. I’m getting there though… (and see above, you can add ESP8266 to the list of invisibility!)
Yes but whilst what I have done might look impressive and does provide (I think) a solid framework it sounds like you have something that actually uses rainfall data! Where do you get the amount of rainfall prior to irrigation running?
Thank you. The solenoid valve box is I think an Australian product but widely available in the UK (which is where I am) - I got it from here and yes, as I said, I am sure there are more economical ways of doing this.
I’m not sure about the new Sonoff 4CH, but I don’t think so. I won’t say anymore because I am not qualified to (or confident yet of my ability to be correct!!) but if you find out otherwise that would be a good solution.
@Paul_Flavel This just highlights how little I know! I understand everything you are say but could never have come up with it myself!!
One final point in my defence… I discovered HA in March and we needed something in place by June, including my wife and I digging in all the water hoses, and we all know how long it takes to get used to HA and yaml so to be honest I was only too happy to spend a bit more on the hardware and remove the pressure of the learning curve for the electronics side.
Thanks all for the feedback, I hope what I have done is useful to others, it’s nice to give something back after all the other help I’ve had from this community.
This looks really good <3. Looking forward to see how rain calculations works. I used your work last summer and it worked fantastic. Looking forward to update my HA today with this. I am using sainsmart 16 relays and ESP8266 flashed with konnected to controll my irrigation. Flashed konnected because I found it more reliable then ESPhomeyaml. Only thing I would suggest is to post lovelace snipps to your first thread.