7-Day Rain Log and Sprinkler Control


#1

I tackled a big project this summer and got my in-ground sprinklers working again. (I can’t wait to see my next water bill. :roll_eyes:) I’d really like a fancy new smart timer, but all I have is an ancient dumb daily/weekly timer with 6 zones. It’s so old it uses the old red LEDs like the calculators from the '70s. It used to have a rain gauge too, but that’s long gone. Anyway, I was determined to make it smart, so I connected a 120v relay (https://www.amazon.com/gp/product/B000LESCI2/) that breaks the common to the solenoids and plugged it into a regular smart plug. Then I set the dumb timer to run every day.

Next I jumped in to webCoRE to do the smart part. First I log the rain every day of the week and add in any rain that’s expected over the next few days. I add those together and log it to a global variable. Then my sprinkler control piston checks the rain+expected for the week and IF it’s below a threshold AND IF the sprinklers have run in ‘n’ days, turn the solenoid relay plug on.

Basically the dumb timer runs every day for the amount I want each zone to run. Then the pistons either allow the solenoid circuit to complete (or not) based on rain and number of days since the sprinklers last ran.

Here’s the rain log. You have to let it run for a full week before it’s accurate, but you’ll get the idea if you run it once.

…and the sprinkler control. You may have to set the last run date with a variable (like ‘today’) for it to start working. I don’t remember how I did that.

Both are actually pretty simple. I think most of the code is setting the piston state, logging info, and sending me texts so I can keep an eye on if it’s working or not. :wink:

I’m sharing because I’m sure I’m not the only one using dumb timers for something like this. :+1:


#2

Here’s what the rain log looks like when it gets populated…

And the sprinkler control…
sprinkler-edit

It makes a lot more sense when you can see the actual data sometimes. :slight_smile:


#3

Cool, I did something similar. My sprinkler controller is newer, missing part of the rain sensor, and dumb. I’m just using a smart plug to turn off the sprinkler controller at the time of day it is set to start (mental note, this will probably break when time changes). I am currently just checking for rain earlier today, raining now, or forecast to rain, then turn off the smart plug / controller for 20 minutes. Also created a virtual Master Switch that I leave off if I feel like it’s been raining enough like it has most of this past summer.

I should add a ‘rained yesterday’ check or borrow your piston ideas :slight_smile:

Thanks for posting!


#4

That’s exactly how I started. I found that my timer would burn through the 9V battery, so every time the plug was switched back on after a few days the time and timer settings were lost. I had to figure out how to have the timer plugged in and control the on/off another way. :+1:


#5

What are pros and cons of global variables vs the big do loop that I planned using my method?
My irrigation is a single solenoid I control with a MIMO2+ feeding a 4-Zone K-Rain indexing valve


#6

The benefit for me was that I could separate my pistons into two. I have one that only logs the rain and writes it to a global variable. Them my second one uses the global variable and decides if it should turn the sprinkler on. I suppose I could have made them one piston, but in my brain these were two distinct steps to watering my lawn. What has it done for the last week and what is expected? Has the lawn been watered enough or should the sprinklers run?


#7

Instead of using a smart outlet, I did it the hard way :grinning: