So a month or so ago I finally setup an automated sprinkler to soak the grass between the neighbours house and ours, where we had no sprinkler system already. Once I had a little time, this surprisingly easier than I expected. Basically it required a water solenoid to control the flow of water, some adapters from the 3/4″ standard hose to the 1/2″ of the solenoid, and 12V power to trigger opening the solenoid (by default closed). Using the previous code I used for a rain by-pass, I used it to do the opposite: open the solenoid when there was no rain in the forecast vs the bypass which would break the circuit of the sprinkler when there was rain in the forecast.
This was the setup, the only thing missing here is the source of water which goes into the gold fittings:
The two white wires leading away from the solenoid are in series with the 12V power supply and out of the picture they lead into a relay attached to a Raspberry Pi. The Pi controls the relay, which in turn completes the circuit with the 12V supply and the solenoid, thus opening it, and allowing water to flow through the soaker hose.
This was a fun little project, the wiring being the messiest part, but it’s worked well for the past month without intervention from me. Of course it’s end of summer and fall now so I don’t need this any longer but it’s all ready for next year! The next thing will be to integrate it with the HomeKit project so that I can see it in the new Home app and know when it’s working (with pop-ups on the phone).
I promised previously to go through how I setup control of the Garage door with the Raspberry Pi and to interface with Siri, well, first let’s go through how to wire it up to the Pi and control it with a simple Python script.
What you’ll need:
- Raspberry Pi (I’m using version 1 model B+)
- 2 Channel Relay
- Some small gauge wire for connecting the Garage Door motor with the relay (I used leftover wire from the garage door install)
- USB Wifi dongle for your Pi, I like the TP Link WN725N
- Male to Male Jumper wire, like you can find in a set (see here or Amazon)
There’s nothing quite as delectable for your next home automation project as Raspberry Pi. If you’ve been living under a rock and are unfamiliar with this amazing little device, it is essentially a hobbyist’s dream. It is a small, embeddable computer that costs around $30. Projects with it range from making remote controlled Lego robots, to putting one in space. For physical computing and automating your home, it is a great form-factor, and there are a plethora of projects to choose from. You are really only limited by your creativity. Some example projects I’ve been investigating:
- Automating your home sprinkler system so that it adjusts the schedule depending on the weather
- Wiring up your own Nest-like thermostat controller
- Controlling your garage door with Siri
This last one was a good use case for me, as we had just re-done the garage doors and I didn’t want a control panel marring the new fascia we had installed surrounding the door frame. I wanted to keep it clean but still wanted to be able to open the door if I wasn’t in the car. What better way than with Siri!