OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Get and Display Rain Sensor Re: Re: Get and Display Rain Sensor


Dan in CA


Cool, Glad to see you have it working.

The only problem with putting the

where you have it is that it will be missed if a program is already running. You could put it at the start of the loop before the preceding “if” statement or at the end just before the


where the rain delay stuff is and it will get checked once per second.
In the process of adding some rain sensor logic to the program I added:

if program_running:
if and # Stop stations if use rain sensor and rain detected.

In the main loop at ~line 235 in my version, and also:

if # Skip if rain delay
if and # Skip if use rain sensor and rain detected.

in the schedule_stations function.

I will include this in the next update as it is similar to what the Arduino based OpenSprinkler does. I don’t know how many folks will add a rain sensor to their system so I won’t do much more than that for now but I will be glad to work with you to get the more advanced selective feature going.

You describe it as a per program selection but I think a per zone/station selection would be doable .