Just wanted to share my hardware setup and where I am going with the software. Thanks to all in this thread for the inspirations. Most of the parts for mine I had lying around so this hasn’t cost me that much. By the sound of it many other people have done something similar.
The brains is an ESP32 (labelled F). I initially started with an ESP8266 until I saw that the ESP32 had a bunch of analogue inputs available that I want to use for moisture sensors. So the row of connectors marked C are connected to one ground and nine analogue pins. I plan to use one or a couple for powering the sensors and the rest to take the readings. I am going to power them on only as necessary. After doing some research I am going to use capacitive sensors and waterproof them as per here: https://www.instructables.com/id/Waterproofing-a-Capacitance-Soil-Moisture-Sensor/
For power I am using a 24VAC 1A brick that I found in my box of bits. I then built my own rectifier (marked D) with 4x 1N4004 diodes and the capacitor you can see. I could have gone with a smaller cap but that is one I had in my box. I 3D printed the little box it is in to insulate it from other parts.
I had the small voltmeter also lying around so I added that in just to monitor the output of the converter. The 5V DC is connected directly to the relay bank and the ESP32. The relays are connected to the terminals marked B. The terminals marked A are the common AC line.
All of this is in a waterproof enclosure with any holes silicon-ed up.
From a software perspective I am planning on using elements from @sparkydave specifically the ideas of inhibiting the sprinklers if the chance of rain is high or there has been recent rainfall. I have a weather station at home so I use my own rainfall data. As I previously mentioned I do plan on using moisture sensors so depending on the success of that I hope to move to that primarily. I was concerned about scaling up @sparkydave 's programming mechanism from 2 zones to 8 so instead I am going to use the google calendar integration as @oscill8ory did.
Whilst everything is still sitting on my desk being tested I plan to install this week. My frontend for the sprinklers currently looks like this:
Groups, before Lovelace UI, were used to organise the cards in the display as well as organise multiple entities into one. Since Lovelace UI groups are not used for display purposes.
I am not sure how to do what you are after with a popup menu but you can just add all those entities to a lovelace entities card and it will appear in your UI. https://www.home-assistant.io/lovelace/entities/
hi,
i try to follow your code but at begin when i create the sensor i’ve this error:
Invalid config for [sensor.template]: [next_run_front_shrubs_time] is an invalid option for [sensor.template]. Check: sensor.template->next_run_front_shrubs_time. (See ?, line ?)
Nice, that’s the code I needed to sort out my “it might rain” sensor. Between that and a D1-Mini connected to a soil capacitance senor, I’m hoping I can do away with schedules altogether.
Wish I had found this thread earlier in my sprinkler project research. It’s full of great info. So far I’ve got a Tasmotized Sonoff 4CH Pro r2 controlling three Gardena 24vac valves and the above-mentioned soil moisture sensor I built. Hardware is 99% sorted, just a lot of testing and refining to dial it all in.
By any chance, are you able to post your code for the 11 zones. I have 10 zones and just have not managed to come back to this package to amend it for my zones (running an automation at the moment, but would like to include BOM data, so want to use this excellent package from sparkydave.
Just wanted to post my irrigation control for some feedback. It’s a simple 3-zone (lawn sprinklers, flower beds soaker pipe, and garage roof veggie garden soakers) with a capacitance soil sensor. Currently testing the sensor so it’s actually sitting in the kitchen monitoring a basil plant instead of outside.
Basically, I have manual control for the 3 zones, forecasted rain data and a 5-day history of the soil sensor, actual rainfall and the history of the control valve actuation. I need to change the manual control to a script with a fixed time so I can’t accidentally leave it running and I need to finalize my control logic. My plan is to check the soil sensor each morning at 6AM. If the soil is above X%, skip watering that day, if it’s below X% but more than Y mm of rain is predicted, skip watering that day, if it’s below X% and less than Y mm of rain predicted, then water for Z minutes. Repeat for all three zones.
What soil moisture sensor did you use? I initially tested out the cheap ones you can get on Aliexpress / Banggood but found they don’t last long despite me running code to only switch them on briefly when wanting to take a reading. I now use the Xiaomi wireless ‘Flower’ sensors which seem pretty good.
I didn’t know any better, so I have the cheap ones from Aliexpress connected to a Wemos D1-Mini and a 24v-5v converter (I have 24 VDC available from the patio lights). What happens when they’re powered constantly, they eventually fail completely, or just give erroneous readings?
I looked at the Xiaomi sensor, I thought it wasn’t Zigbee though, BT?
Edit: Looks like it’s BT but the MiFlora integration looks pretty simple to use. My only issue is figuring out a way to extend the BT range as my RPi is not in BT range of where I’d be using these sensors.
Edit #2: Seems like I can use an ESP32 to handle the BLE devices
correct. they corrode badly. Energise them only when you want to take a reading for max lifespan but look to swap them with the Xiaomi MiFlora that Nick listed as they are much better plus give you additional data
Cheers for the BLE/ESP32/Xiaomi solution. I’ve got a couple of sensors on order and a NodeMCU to set up. I’ve only ever used Tasmota, so this will be a good project to learn ESPHome.
I have developed an integration that may be useful to people reading this thread. It’s an alternative to lengthy and complex automation scripts designed specifically for managing irrigation valves.
Good luck and thanks to all for the information on this site.
Reviving an old one here. I built my own today with an ESP8266. Has a capacitive sensor and DHT22 Temp and Humidity sensor attached. I’ve built one for outside and one for inside for now… Plan is to slowly build an irrigation system using solenoid valves that will maintain certain moisture levels in the soil, hopefully resulting in some decent tomatos.
I had accidentally ordered the resistive type sensor and yes, after a day, they were already showing corrosion on about 30% of the contacts.