OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › OSPi – Interval – Garage Door Sensing and Control – Success › Re: Re: OSPi – Interval – Garage Door Sensing and Control
Dan in CA
Denny,
Check the Python GPIO info at:
http://www.raspberrypi-spy.co.uk/2012/05/install-rpi-gpio-python-library/
Look under the Example Usage section at the bottom of the page to see how to set the pins for input/output.
To get the Rain sensor state to show on the OpenSprinkler home page you just need to set the var gv.sd = 1 for rain sensed, gv.sd = 0 for no rain.
EDIT: Scratch that. It needs more to make it work. I’ll let you know when I have the correct incantations.
OK. I added +’,rs=’+str(gv.sd) to one of the script lines (~426) in the class home: definition. Now if you check “Use rain sensor:” on the Options page and have gv.sd = 1 it will show “rain detected” on the home page and all stations will have a strike through. Bit it does not actually stop the stations from running – yet. I’ll work on adding that to the next update.
Dan