RaspberryPi Sprinkler Hijinx
by Allen Plummer
My sprinkler system is pretty dumb. I’m having to constantly remember to turn it off when there is rain in the forecast. There is the ability to toggle it off in the event of moisture detected. However this provides no ‘smart’ ability to be able to turn off when the percentage of rain chance in the future is high, but the sensor is currently dry.
- RaspberryPi - this is good to control things, plus runs Python natively with GPIO control.
- Relay board - this is a mountable board on the RaspberryPi, and can connect directly into my Sprinkler Control panel (in the sensor inputs).
- Weather Underground API - this is a good API to get percentage of precipitation for a given area.
- Cron Job - run the forecast job every hour, if the percentage over the next few “time blocks” is over X percentage, send a signal to the relay to open the switch on the Sprinkler panel.