Friday, October 9, 2015

Open Sprinkler

As summer approached this year I realized my sprinkler controller was broken and my grass started to die. As a new homeowner, I was terrified and needed to find a new controller. Not wanting to buy a dinosaur i looked into smart controllers and found Open Sprinkler. There are other smart sprinkler systems but this one is by far the cheapest and from what i could tell, there are no real disadvantages.

As the name indicates it is an open source project and thus there is probably more assembly required than with a branded commercial product. But when it came down to it, installation was very easy. I simply switched the wires from the old controller


to the different zones on the new controller.



I was also able to reuse the power cord from my old controller and do all this setup in less than 20 minutes.

The real problem then came when i had to figure out a way to get my device connected to the internet. The controller has an ethernet port and wifi adapters can be purchased separately, but i had decided ahead of time i would try to convert my old raspberry pi into an adapter. After about two days following every tutorial i could and with no success i finally found an alternative solution. I used an old router (flashed with DD-WRT) to create a bridge. Now the router was working in reverse to receive internet connection over Wi-Fi and send it out through the ethernet into the Open Sprinkler controller. Within 30 minutes I had a connected open sprinkler system and was able to test all the zones.


Since that time i have not needed to use or even look at the controller sitting in the garage as all configuration can be done through either a free app or on a website which is served by the controller on your local network. Oh and did i mention that you can do remote access as well via port 80. Since I was already running a web server on port 80, I had to setup a subdomain and proxy to forward requests to the controller. It looks like this.
<VirtualHost *:80>
 ServerName sprinkler.tengentllc.com
 ProxyRequests Off
 <Proxy *>
  Order deny,allow
  Deny from all
  Allow from 192.168.1.4
 </Proxy>
 ProxyPass / http://192.168.1.4:80/
 ProxyPassReverse / http://192.168.1.4:80/
 <Location />
  Order allow,deny
  Allow from all
 </Location>
</VirtualHost>

Other great features include Weather and logs. By creating a developer account with weatherundergound.com your system can automatically access weather information and prevent recurring cycles if for example, it just rained that day. The logs are great as well and allow me to see total water usage and runtimes.

So glad I decided not to replace my broken controller with something like this!