Jump to content
C4 Forums | Control4

1 button Irrigation control (Rain delay, start, stop, winter/summer)


Recommended Posts

I wanted to make it so I have near full control of everything I usually do with my irrigation system using a single button. The things I wanted to control were:

1) Automatic irrigation every other day at 5 am

2) Rain delay to prevent irrigation from turning on if it rains (>24 or >36 hours depending on amount and timing of rain)

3) Ability to start a full run of irrigation instantly on command

4) Ability to stop a full run of irrigation instantly on command

5) Ability to turn the irrigation system off for the winter

I also wanted visual feedback to let me know if irrigation was scheduled to run the next morning, and to let me know if my button presses/holds had worked to change the timing.

To do this I created:

Scheduler Agents:

1) Irrigation - Executes at 5 am every day

1) Checks variable 'Irrigation Win-Sum' and stops if it is Winter.

2) Checks variable 'Irrigation Yes-No' to decide whether to irrigate or not that day.

2) (OPTIONAL) Irrigation Summer - Sets variable 'Irrigation Win-Sum' to Summer during irrigation months

3) (OPTIONAL) Irrigation Winter - Sets variable 'Irrigation Win-Sum' to Winter during non-irrigation months

Timer:

1) Irrigation - 24 hr timer that sets variable 'Irrigation Yes-No' to True when it expires.

Variables:

1) Irrigation Yes-No: If true irrigation will proceed at 5am, if false it will not.

2) Irrigation Win-Sum: Stops irrigation in winter and changes the buttons LED as a visual indication

3) Irrigation Series On: If true the entire set of irrigation zones will run.

4) Irrigation Run Now: Will allow a full irrigation zone series to run (see button press-hold programming) instantly

5) Multi-Tap (Counter)

Irrigation zones: I have 5 but basically the programming for every zone except for the last one is the same, so Ill do 3 zones as an example.

Programming:

TIMER:

Irrigation:

When timer expires set Var Irrigation Yes-No to True (allows scheduler to run irrigation at the next 5 am in summer)

SCHEDULER:

Irrigation (Every day at 5am):

If Irrigation Win-Sum is NOT Summer

STOP

If Irrigation Yes-No is True

Turn Zone 1 On

Irrigation Series On = True (sequentially runs all zones)

VARIABLES:

1) When Irrigation Yes-No Changes

If Irrigation Win-Sum is NOT Summer

STOP

If False

Reset Timer Irrigation

Turn button LED Off (lets me know irrigation is off tomorrow)

If True

Turn button LED On

2) When Irrigation Win-Sum Changes

If EQUAL to Summer

Set button LED ON to Red

Turn LED On

Delay 5 seconds

Set button LED ON to default (green for me)

Set button LED OFF to default (blue for me)

Variable Irrigation Yes-No = True

If NOT EQUAL to Summer

Set button LED OFF to Light blue

Turn LED OFF

Variable Irrigation Yes-No = False

Stop Timer Irrigation

3) When Irrigation Run Now changes

Delay 1500 milliseconds

If Irrigation Run Now is True (If Press and Hold function of button is true)

Turn on Zone 1

Variables Irrigation Series On = True (Starts full series of irrigation)

Set button LED ON to Yellow

Turn LED On (Visual cue of yellow LED for 3 seconds to let me know press & hold worked)

Delay 3 seconds

Set button LED ON to default (green)

Set LED Off

BUTTON PROGRAMMING:

On button Press:

If variable Irrigation Series On is True

Turn off all zones (Stops irrigation instantly if a full series is running)

Variable Irrigation Series On = False (Delays next irrigation for 24+ hours)

STOP

Variables Irrigation Run Now = True (Press & Hold function)

Variables Multi-Tap = Multi-Tap + 1

On button Release:

Variables Irrigation Run Now = False (Press & Hold function canceled if button released)

Delay 8 seconds (Allows for multitaps and allows for press & hold timing)

If Zone 1 is on (If press & hold function activated immediate irrigation)

Variables Multi-Tap = 0

STOP

If Multi-Tap = 1 (delays irrigation for 24+ hours)

Variable Irrigation Yes-No = False

Multi-Tap = 0

If Multi-Tap = 2 (delays irrigation for 36+ hours)

Variable Irrigation Yes-No = False

Multi-Tap = 0

Delay 720 min

Reset timer Irrigation

If Multi-Tap > or = 3 (changes winter/summer status)

Multi-Tap = 0

If Irrigation Win-Sum = Summer

Irrigation Win-Sum = Winter

STOP

If Irrigation Win-Sum NOT = to Summer

Irrigation Win-Sum = Summer

IRRIGATION ZONES:

When Zone 1 turns on:

Delay X min (X = however long you typically run that zone)

Turn off Zone 1

If Var "Irrigation Series On' is true (only runs entire series of irrigation zones if variable is true)

Turn on Zone 2

Zone 2 through Y-1: Same as Zone 1 except substitute turning on the subsequent zone and change delay timing as appropriate for the zone.

When Zone Y (last zone) turns on:

Delay X min

Turn off Zone Y

If Var Irrigation Series On is True

Var Irrigation Yes-No = False (delays next irrigation 24+ hours)

Var Irrigation Series One = False

Notice with the above programming if you just decide you need to run one zone you can activate it via Control4 and not have to worry about turning it off, it will stop automatically when the delay is up, but it wont affect your irrigation cycle unless the full cycle is running and the appropriate variables (Series On) is True.

I welcome any comments/suggestions, etc.... if you see any glaring mistakes please let me know, as this is as yet untested.

UPDATE/EDIT: See changes in my post below, the initial programming had issues with the Multi-Tap for unknown reasons so I had to tweak a few things to get it to work smoothly and have updated the programming in the post below. Now everything appears to be functioning correctly.

Link to comment
Share on other sites


Oh also, this is how the button works and gives feedback:

Default blue - Summer but will not irrigate tomorrow at 5am (24 hr timer still running)

Default green - Summer and irrigation set to run tomorrow at 5am (24 hr timer expired)

Light blue - Winter

Press & Hold - Irrigation will start immediately

Tap once - If irrigation series is on, it will turn off all zones and delay irrigation to day after tomorrow,

Otherwise it will restart 24 hour timer, thus delaying irrigation to day after tomorrow

Tap twice - 36 hour timer, so if pressed after 5pm it will delay irrigation until day after day after tomorrow

Tap 3x - Toggle Winter/Summer

Link to comment
Share on other sites

I haven't had a chance to read all that yet, but all I can say is this looks like one hell of a solution to your irrigation.

I will give it a closer look later and make sure I understand it all...looks interesting.

Link to comment
Share on other sites

Thanks yeah spent about 3-4 hours on that... initially I had some redundancy built in which made the programming longer (ie resetting the timer at multiple places, etc) but I figure Ill test it out with the shorter programming first and if I have issues I can troubleshoot or add redundancy then.

Link to comment
Share on other sites

Hm so I am having a bit of an issue with this... the press & hold works like a charm, the delay 24 hours on single press works fine, the stop irrigation on single press works fine, but if I try to multi-tap then it automatically starts the press and hold function instead of doing the multi-tap which doesnt make sense to me.

Link to comment
Share on other sites

Ok, not exactly sure why this worked but I made the following changes:

On button Press:

If variable Irrigation Series On is True <MOVED TO TOP>

Variables Irrigation Run Now = True (Press & Hold function) <MOVED TO TOP>

Variables Multi-Tap = Multi-Tap + 1 Turn off all zones (Stops irrigation instantly if a full series is running)

Variable Irrigation Series On = False (Delays next irrigation for 24+ hours)

STOP

On button Release:

Variables Irrigation Run Now = False (Press & Hold function canceled if button released)

Delay 4 seconds (Allows for multitaps and allows for press & hold timing) <CHANGED DELAY TO 4 SECONDS>

If Zone 1 is on (If press & hold function activated immediate irrigation)

Variables Multi-Tap = 0

STOP

If Multi-Tap = 1 (delays irrigation for 24+ hours)

Variable Irrigation Yes-No = False

Multi-Tap = 0

If Multi-Tap = 2 (delays irrigation for 36+ hours)

Variable Irrigation Yes-No = False

Multi-Tap = 0

Delay 720 min

Reset timer Irrigation

If Multi-Tap > or = 3 (changes winter/summer status)

Multi-Tap = 0

If Irrigation Win-Sum = Summer

Irrigation Win-Sum = Winter

STOP

If Irrigation Win-Sum NOT = to Summer

Irrigation Win-Sum = Summer

3) When Irrigation Run Now changes

Delay 2 Seconds <CHANGED DELAY>

If Multi-Tap is GREATER THAN 1 <NEW>

Variables Irrigation Run Now = False <NEW>

If Variables Run Now = False <NEW>

STOP <NEW>

If Irrigation Run Now is True (If Press and Hold function of button is true)

Turn on Zone 1

Variables Irrigation Series On = True (Starts full series of irrigation)

Set button LED ON to Yellow

Turn LED On (Visual cue of yellow LED for 3 seconds to let me know press & hold worked)

Delay 3 seconds

Set button LED ON to default (green)

Set LED Off

2) When Irrigation Win-Sum Changes

If EQUAL to Summer

Set button LED ON to Red

Turn LED On

Delay 5 seconds

Set button LED ON to default (green for me)

Set button LED OFF to default (blue for me)

Variable Irrigation Yes-No = True

STOP <NEW>

If NOT EQUAL to Summer

Set button LED OFF to Light blue

Turn LED OFF

Variable Irrigation Yes-No = False

Stop Timer Irrigation

Link to comment
Share on other sites

It seems to all be working perfectly, although I wont know 100% until winter arrives. Based on the visual feedback the winter/summer change is working though.

I only have 5 zones of irrigation (only front yard) right now so I just have 4 going to the old contact-relay box with 4 relays and the other 1 zone going to one of my HC-300s. If I get more zones Ill probably upgrade to 1.8 and get the I/O extender (since it only works on 1.8+)

Link to comment
Share on other sites

I was thinking there is probably one other function I need to add in, the ability to change the "Irrigation yes-no" variable to true so that if it isnt scheduled to irrigate the following day then it will. The easiest way to do that I think would be to toggle the variable on a single tap rather than set it to false.

Link to comment
Share on other sites

  • 2 months later...

Let me know how it goes. Its been fantastic for me... on hot days I just do a press and hold either in the morning or evening to give the grass an extra dose and then it goes back to the regular schedule, skipping irrigation the next morning.

Link to comment
Share on other sites

Are you able to connect an external rain Sensor and have it talk to the control4 system. I like in Seattle and it rains a lot here, so it would be nice to have a automated way to deal with rainy summer days when I am not home.

Link to comment
Share on other sites

I think the external rain sensor is essentially just a contact, so there should be a way for that to communicate with control 4, similar to if a wired door contact is open or closed, but someone else here would need to confirm.

From what I understand rain sensors are typically 'normally closed' contacts that open when a sufficient amount of rain has fallen. If that is the case then I think all you need is to connect the wires from the rain sensor to the appropriate contacts on a home controller or wireless contact relay.

Link to comment
Share on other sites

  • 1 year later...

^He hasn't posted in awhile but I'll say it doesn't matter one bit what type of variable you use but a string is more logical in keeping track of your programming. Housekeeping with a huge chunk of code like that above is essential for maintaining one's sanity.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.