Help With Pausing and Resuming Rachio Sprinklers


#1

1) Give a description of the problem
Need help with piston to help pause and resume sprinklers if they are running based on if certain bathroom light switches are turned on or off.

2) What is the expected behaviour?
Switch 13-18 are the 5 zones plus the master controller for the Rachio. Keypad 1 & 4 are the bathroom lights. If any of the sprinkler zones are running and ANY of the light switches are on or change to on then the sprinklers should pause watering. Once ALL of the light switches are off or change to off then the sprinklers should resume.

3) What is happening/not happening?
My code is just poor

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)


#2

Are the sprinklers controlled by a Rachio schedule? Meaning, can the sprinklers come on without this piston?


#3

Yes, the only time the sprinklers ever run is by Rachio schedule


#4

OK, this project can/will get somewhat complex from the beginning, so let’s walk through this together. This could be a rather large piston, or you can break it up into smaller pistons. I like smaller pistons because it is much easier for me to debug. But, you may want it all in one big piston. So let’s start simple. Certainly there are MANY ways to do this and others here may have good insight. I have sketched out 3 small pistons that have not been tested. I am using a variable, Pause_Rachio, that can either be local or global based on your choice of piston arrangement. You will need triggers and conditions in the correct place and sequence to achieve your goal. I would get one piston at a time working properly, then move on to the next.

Piston 1 - If any of the bathroom lights turn ON and the Rachio is ON, pause the Rachio

IF
  Any of Keypad 1, Keypad 4 Switch changes to ON
  and
  Any of 13,14,15,16,17,18 is ON
  THEN
    With 13,14,15,16,17,18
      Do
        Pause
        Set Pause_Rachio = true
END IF

Piston 2 - If the Rachio turns ON and any of the bathroom lights are ON, pause the Rachio

IF
  ANY of 13,14,15,16,17,18 changes to ON
  AND
  ANY of Keypad 1, Keypad 4 is ON
  THEN
    WITH 13,14,15,16,17,18
      DO
        Pause
        Set Pause_Rachio = true
END IF

Piston 3 - If both lights turn OFF and the Rachio has been paused, turn the Rachio back ON

IF
  Keypad 1 changes to OFF
  AND
  Keypad 4 is OFF

  OR

  Keypad 4 changes to OFF
  AND
  Keypad 1 is OFF

  THEN
    IF Pause_Rachio is true    (If the Rachio was not running, don't turn it on)
      THEN
        runAllZones
        Set Pause_Rachio to false
    END IF
END IF

#5

Wow! Thanks for the great ideas. I never thought about creating separate pistons for this but it makes sense. Unfortuately I won’t be able to test until spring time when we turn our sprinklers back on. I just wanted to get everything prepped since I just added some z-wave switches to the bathrooms this month.

Also, quick question on the running of all zones. Usually a sprinkler runs 1 zone at a time. When pausing, I’m not exactly sure which zone would be running as it could be any of the 5 we have. Does that make a difference with your example code here?

Again, thanks for all the help. I really appreciate it!


#6

Yes, that is what I was referring to when I said that this piston(s) can get complex. If zones 1-4 have finished already, then you don’t want to start them all over again after the bathroom lights turn off. Play with it and see what you like. I (we) are happy to help anytime.

There may be a method to determine which sprinkler(s) have run and not turn them on again. You would have to experiment with your Rachio to see if each zone can be addressed individually.