rule flow clarrification

v1rtu0s1ty

Senior Member
Hi there folks.

I would like to know how our Elk executes each rule specifically the rules below.

When time of day is 12am
THEN TURN (OUT 9) ON for 10 mins
THEN TURN (OUT 10) ON for 10 mins
THEN TURN (OUT 11) ON for 10 mins
THEN TURN (OUT 12) ON for 10 mins
THEN TURN (OUT 13) ON for 10 mins

So here is my question. With the rules above, am I correct that OUTPUT 10 will only TURN ON after OUTPUT 9 completes the 10 mins?
 
Wayne's correct, they will all activate within the same second or so, probably not the answer you were looking for :/
 
Wayne's correct, they will all activate within the same second or so, probably not the answer you were looking for :/

THanks. I changed the rules. Here is my newest. But I am afraid that it might get turned on later which I don't want since the date today is an even date(August 14).

elkrulesprinkler.gif


I copied the logic from here.
Elk Rule for turning on sprinkler on odd days
 
I rewrote the rule again and I think this time, it's bomb proof. LOL. :D It will work even if the system is restarted. I hope so.

elkrulesprinklerv2.gif
 
These won't work as you expect.

Take Rule #17, for example. This rule will execute only when Output 106 is turned on at exactly 6:16 AM,
but there is no corresponding event to do that. Simliarly, Rules 18, 19 and any others will never be executed.

If you really want a follower-type zone activation, a better approach might be to have "cascading outputs," one output permanently associated with each valve, which is turned on when the previous sprinker zone turns off.

OR, why not just have rules for specific times of day that are suppressed when it is not a watering day --

WHENEVER THE TIME IS 6:16 AM
AND OUTPUT 106 IS ON
THEN activate/deactivate zone valves
 
These won't work as you expect.

Take Rule #17, for example. This rule will execute only when Output 106 is turned on at exactly 6:16 AM,
but there is no corresponding event to do that. Simliarly, Rules 18, 19 and any others will never be executed.

From what I understand regarding turning on OUTPUTS like OUTPUT 106 on rule 15, OUTPUT 106 will always stay on. So when the hour comes, 6:00am or 6:16am, it should satisfy the condition since OUTPUT 106 is on. That's how I understood how Elk rule works. Please correct me.

If you really want a follower-type zone activation, a better approach might be to have "cascading outputs," one output permanently associated with each valve, which is turned on when the previous sprinker zone turns off.

OR, why not just have rules for specific times of day that are suppressed when it is not a watering day --

WHENEVER THE TIME IS 6:16 AM
AND OUTPUT 106 IS ON
THEN activate/deactivate zone valves

I cannot just specific choose a day I want to water. The only day we can water the lawn is during dates that ends in an odd number. For example, August 15, 17, 19, 29 etc and only from 6-9am/6-9pm. The rules here in our neighborhood is that if our home address number is an odd number, we can only water during those dates mentioned above. The reason why we are doing this is because we are not getting the water from Michigan.
 
A rule has only one triggering event (the WHENEVER). ANDs can never trigger an event, they only specify the condition(s) that must exist at the time of the trigger for the rule to execute.

Here is what you must do:

1. Late on the even days, turn on an output to signal that the next day is an odd day.

WHENEVER THE TIME IS 11:59 PM
AND THE DAY OF THE MONTH IS A MULTIPLE OF 2
THEN TURN OUTPUT 106 ON FOR 1 DAY

2. Specify one rule for each of your zones on a fixed schedule, conditioned by the "odd-day flag."

WHENEVER THE TIME IS 6:00 AM
AND OUTPUT 106 STATE IS ON
THEN activate zone valve 1

WHENEVER THE TIME IS 6:15 AM
AND OUTPUT 106 STATE IS ON
THEN deactivate zone valve 1
THEN activate zone valve 2
 
A rule has only one triggering event (the WHENEVER). ANDs can never trigger an event, they only specify the condition(s) that must exist at the time of the trigger for the rule to execute.

Here is what you must do:

1. Late on the even days, turn on an output to signal that the next day is an odd day.

WHENEVER THE TIME IS 11:59 PM
AND THE DAY OF THE MONTH IS A MULTIPLE OF 2
THEN TURN OUTPUT 106 ON FOR 1 DAY

2. Specify one rule for each of your zones on a fixed schedule, conditioned by the "odd-day flag."

WHENEVER THE TIME IS 6:00 AM
AND OUTPUT 106 STATE IS ON
THEN activate zone valve 1

WHENEVER THE TIME IS 6:15 AM
AND OUTPUT 106 STATE IS ON
THEN deactivate zone valve 1
THEN activate zone valve 2

It's working now. I didn't use zones though since I don't know how to do it. I wrote it this way.
I wrote the code from your item 1.

then

WHENEVER THE TIME IS 6:00 AM
AND OUTPUT 106 STATE IS ON
THEN TURN OUTPUT 9 ON for 15 mins
THEN TURN OUTPUT 13 ON for 15 mins

WHENEVER THE TIME IS 6:16 AM
AND OUTPUT 106 STATE IS ON
THEN TURN OUTPUT 10 ON for 15 mins
THEN TURN OUTPUT 12 ON for 15 mins

WHENEVER THE TIME IS 6:32 AM
AND OUTPUT 106 STATE IS ON
THEN TURN OUTPUT 11 ON for 15 mins

then I also wrote another code when time is 12:00am and day of month is 1. It turns on 106 to ON for 1 day.

Thanks.
 
then I also wrote another code when time is 12:00am and day of month is 1. It turns on 106 to ON for 1 day.
Good catch. Otherwise you would miss watering on the first day of a month following a month with 31 days.

You are privileged over your neighbors in having seven extra watering days per year.
 
Do you have enough water pressure to use 2 zones at once? Most people don't. Also, the way you have it coded it is not flexible. If you ever want to change the length a zone runs you need to rewrite all your rules. It would be better to have a single start time then just configure each zone to run for x minutes and then start next zone when previous zone finishes. You could even have the runtimes in custom settings so you never have to change your rules. This approach is described here.
 
Do you have enough water pressure to use 2 zones at once? Most people don't. Also, the way you have it coded it is not flexible. If you ever want to change the length a zone runs you need to rewrite all your rules. It would be better to have a single start time then just configure each zone to run for x minutes and then start next zone when previous zone finishes. You could even have the runtimes in custom settings so you never have to change your rules. This approach is described here.

Yep, water pressure is fine since the sprinkler valves are actually separated to 2 spigots. The spigot on the south side has 3 sprinkler valves(output 11, 12 and 13) while the spigot on the west side has 2 sprinkler valves(output 9 & 10). I turn on 1 output per spigot. If you look at the ruled again, I turn on 9 & 13 at the same time, then 12 and 10 and lastly, just output 11. Thanks for the link.

lawnsprinklervalves20090814.jpg
 
then I also wrote another code when time is 12:00am and day of month is 1. It turns on 106 to ON for 1 day.
Good catch. Otherwise you would miss watering on the first day of a month following a month with 31 days.

You are privileged over your neighbors in having seven extra watering days per year.

Steve,

With tasks, are we still able to automate it? From what I've read(and I might be wrong), that tasks were created so we can control it via the keypad.

Hopefully you can provide me an example because the example from the link you mentioned show a task that is controlled by the keypad and not the rules.

Please let me know.

Thanks!
 
You can execute tasks using rules, very easy, just look in the rules popup menus. Using tasks is actually very useful, treat them like 'functions' (assuming you are familiar with programming). Put all the code under a task, you can either schedule the task to execute at a certain time, or manually execute it using phone or touch screen interface.
 
You can do whatever you want really. A task can be activated from the kpd, a rule, etc. You don't even need to use a task at all if you don't want. The suggestion was mainly to make it more flexible. If I need to change a run time, I just update a custom setting and I am done. My irrigation rules are pretty old but they work and are based on that link. I'm sure they can be made more efficient but I have not modified them from their original yet. Here they are:

Code:
WHENEVER  F4 KEY ON ANY KEYPAD ACTIVATES
			THEN ACTIVATE Disable Sprklers (Task 4)
 
WHENEVER  Disable Sprklers (Task 4)  IS ACTIVATED
			THEN TURN Sprinkler Front (Out 9) OFF
			THEN TURN Sprinkler North (Out 10) OFF
			THEN TURN Sprinkler Back (Out 11) OFF
			THEN TURN Sprinkler South (Out 12) OFF
			THEN TURN Output 207 ON
			THEN TURN Output 206 OFF

WHENEVER THE TIME IS 4:00 AM
	  AND THE DAY(S) OF THE WEEK IS/ARE ---W--S
	  AND Output 207 STATE IS OFF
			THEN ACTIVATE Water Lawn (Task 3)

WHENEVER  Water Lawn (Task 3)  IS ACTIVATED
			THEN TURN Output 206 ON
			 THEN TURN Sprinkler Front (Out 9) ON FOR Sprklr Front (Cust Set 1)

WHENEVER  Sprinkler Front (Out 9) STATE IS TURNED OFF
	  AND Output 207 STATE IS OFF
	  AND Output 206 STATE IS ON
			THEN TURN Sprinkler North (Out 10) ON FOR Sprklr North (Cust Set 2)

WHENEVER  Sprinkler North (Out 10) STATE IS TURNED OFF
	  AND Output 207 STATE IS OFF
	  AND Output 206 STATE IS ON
			THEN TURN Sprinkler Back (Out 11) ON FOR Sprklr Back (Cust Set 3)

WHENEVER  Sprinkler Back (Out 11) STATE IS TURNED OFF
	  AND Output 207 STATE IS OFF
	  AND Output 206 STATE IS ON
			THEN TURN Sprinkler South (Out 12) ON FOR Sprklr South (Cust Set 4)
			THEN TURN Output 206 OFF
 
Back
Top