OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Does OSPi system have a way to detect open/close states of DIY sensor? › Reply To: Does OSPi system have a way to detect open/close states of DIY sensor?
While not under $10 i did find this which might be what I would use https://www.amazon.com/dp/B00RCPDCQU it’s $18. It’s analog so you’ll need to also have an ADC somewhere between the sensor and your Pi. you could use an Arduino or an esp8266 for that it you’ve got one. I don’t think you need a separate switch – just turn the irrigation valve off through the API. I don’t recall if it supports it but you might even be able to disable the zone through the API to prevent the program from opening the valve back up the next time it is scheduled to run.