Raspberry Pi Garage Door Opener

My latest project is to replace my cloud based MyQ Garage Door Openers with a Raspberry Pi. It was easier and cheaper than I anticipated, and the result is already working better than the MyQ.

Components

  • Raspberry Pi - I used an older Raspberry Pi 1, but the new ones cost the same as I paid - $35
  • 8 GB SD Card - $7.09
  • 2 channel relay module - Two relays for two garage doors. $7.99
  • USB Wifi Card - I don’t have ethernet in my garage, and this card works with Raspbian out of the box Not Necessary if you buy a Raspberry Pi 3 with onboard wifi- $7.23
  • USB Power Supply - In actuality, I had about 10 of these lying around from old phones. Finding a cable was harder. You can get a new one for $5.99
  • Surface Mount Magnetic Contacts - You only need one of these per door, and you can buy these one at a time for much cheaper, but they take 2 months to ship. a 10 pack cost me $20.50
  • Pin connector wires - I only needed about 10 of these for this project, but a pack of 40 is $3.48
  • 20AWG Wiring - Depending on where your doors are from your openers and your nearest outlet, you’ll need more or less of these. Use this wiring to connect the magnetic contacts on the doors to the Pi, and the relay to your openers. I think I used about 40 feet. $6.99
  • Stand-offs and screws - For mounting your Pi on a board. You’ll need to keep the Pi slightly above whatever you mount it to, because the SD card and solder sticks out the bottom. I had some spare PC parts in the attic, so I didn’t need to buy this. - $9.90

Total: $104.17 (my cost was $88.28 because I had the USB charger and made the mounting hardware)

I ended up with a number of leftover parts at the end, too.

Building

  • Lay out the relay, Raspberry Pi, Wifi card and Power cable so everything fits level. Plug in your power cable, wifi card and HDMI cable, and insert your raspbian imaged SD Card.
  • Install raspian and Garage Door Controller software using instructions Garage Door Controller. Make sure you can SSH to it before you start wiring it up.
  • Disconnect the power from the Raspberry Pi.
  • Attach the Raspberry Pi and Relay board to a piece of wood with the standoffs and the small screws.
  • Wire the Raspberri Pi to the relay jumpers according to the wiring instructions for Garage Door Controller
  • Run wires from the garage door opener to the relay. Screw into the relay terminals and insert into the switch terminals on the back of the garage door opener.
  • Figure out where your have the most clearance around your garage door for the magnetic door sensor. Try to place both the magnetic actuator and the sensor using double sided tape and run your garage door up and down a few times. I sheared my first two sensors off my garage door because the first place I put them didn’t have adequate clearance. Once you’ve got them somewhere that the sensor and actuator are apart when the door is open and nearly touching when the door is closed, peel off the backing paper and attach them using the 3M tape they come with.
  • Run wires from the garage door to the GPIO Pins on the Pi.
  • Screw your wires into your magnetic door sensors.
  • Using zip ties and screws or adhesive mounting brackets, attach your wires to the board, so there isn’t strain directly on the GPIO Pins and Relay terminals.
  • Tidy up loose wires using zip ties or tape.
  • Plug in the Pi and test out the software. It should be working!

GaragePi