OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Water pump is shared between pool and sprinklers – manual pool filling? Reply To: Water pump is shared between pool and sprinklers – manual pool filling?

#36742

mark
Participant

Not needing a ‘suspend’ function makes things a lot easier.  Ok, in ospi.py there is a call to ‘check_rain()’.  That operation lives in ‘helpers.py’.  Follow how that function sets the values for rain detected.  I’d start by coping that function, then mapping the signal to a different GPIO pin.  Then look at the ‘program_running’ if statement also in ospi.py.  That shuts down the zones if rain (or in your case now) your switch is tripped.  You’ll need to add a new ‘if’ path for your function when the switch is triggered so that you can start your custom zones and do <stuff>.  Of course this is a high overview, but following how that rain on/off works should get you started and close to your goal.