Smart Garage door opener feature

How to Make a DIY Smart Garage Door Opener that Works with Any Protocol

In Home Automation by Jody28 Comments

I know you’ve gotten 5 minutes down the road and asked yourself, “Did I close the garage door?”.

Now, instead of turning around or leaving your garage and house vulnerable to thieves, you can check and close it with your phone with your choice of home automation protocol!

Z-wave? Of course.

WiFi garage door opener? Sure.

Insteon? Why not?

Want a Homekit garage door opener? No problem!

We’ll cover the installation and setup in detailed steps so that anybody can do it. It’s pretty easy to install. You may also check our other post for tips on how to lock your garage door using supplemental locks.

DIY Smart Garage Door Opener Shopping List

Here’s what you’ll need:

  1. 120 VAC relay for the US ($5) – the link is to the one I picked that came with a handy terminal block, any will work as long as the coil voltage will work for your power source.  It happened to come with a nice terminal block that made making connections much easier.Relay Connection Diagram
  2. Smart outlet or plug ($29-45) – Here’s where you choose your protocol. I used a Z-Wave outlet, but you could get a WeMo (WiFi), Insteon, or proprietary outlet that works with your home automation hub and easily links to other smart home devices.
  3. Old (or bought) power cord (Free) – Have old electronics still hanging around? Just cut the cord off and re-purpose it.
  4. Garage door sensor – Standard entry sensors or tilt sensors can work here, just anything to let you know whether the garage is open or closed
  5. Small wire (~22 AWG) – This is to connect the relay to your garage door opener. You can use the same size as the wire used to connect the existing garage door controls so that you know it’s sized correctly.
  6. Probably an electrical box – to throw all of the stuff into
  7. Possibly a new outlet cover ($2) – This would have saved me a trip to the store, so I’m including it here. The outlet I picked up requires a square cover, which was different than what I had originally installed.
  8. Possibly mounting hardware for the relay – Zip ties will work if you have them, as will a nut and bolt.

Please don’t laugh at me for keeping dead electronics. Occasionally, I am glad I threw them in the shop.  You may notice, I’m using a hair dryer cord.

I will warn you that the shipping on that particular relay took forever, slow boat from China speed!

How Does it Work?

The button on your wall that controls your garage doors are most likely momentary contact (normally open, often abbreviated as NO) single pole, single throw (SPST) switches. They usually connect via a wire to two terminals on your garage door opener.

I say usually because you may have a wireless opener (especially if it requires power or batteries), in which case you should definitely heed the warning below.

Make sure you check the manual for your opener to confirm the right terminals are available
It’s possible that your garage door opener doesn’t accept open/close commands via an exposed terminal, but most do!
What to do if you don't have exposed open/close terminals
Even if you have a system that sends a code to the opener from the keypad, you can still connect to the keypad itself to simulate a button press. Then, it does the work of talking to the opener for you!
We will be using those terminals to connect our “smart switch” in parallel with (AKA at the same time as) your existing garage door controls. That way, you can still use the manual controls if you need to.

There is one catch:

The default control for smart outlets is to turn on and stay on.

But, we need a momentary switch!

So, we’ll have to do some work on the hub side to make our switch close and then reopen so that the garage door doesn’t get confused and reverse the initial command.  Consider it a virtual momentary contact switch.

If your hub doesn’t support that level of programming, don’t sweat it. There’s a workaround possible, but it does add some complexity.

Setting up Your DIY Smart Garage Door Opener

You can probably tell where this is going, but we’ll be using the smart outlet to control the relay, which then sends the signal to the garage door opener to open and close. We’ll go through the steps to install everything in that order.

First, here are the tools that you’ll need:

  • Screwdriver (Philips + flat to be sure)
  • Knife, lighter or wire strippers

Easy right?!?

  1. Turn off the power to the outlet that controls your garage door opener at the breaker (always test that it’s actually off before starting your work).
  2. Remove the existing outlet.
  3. Follow the instructions to install the smart outlet. For the one listed above:Use the included wire nuts to connect the flying leads (fancy name for wires attached to the switch) to the wires in the outlet box. It will simply be white to white, black to black, and green to bare copper in most cases. If you have something different and don’t know what you’re looking at, seek help before flying blind!Zwave outlet wiring
  4. Cut the power cord to length and strip 1/4″ from the cut end of the cord, then connect those across the coil of the relay. This voltage is what causes the relay’s switch to open.Prepped WiringWired Relay
  5. Strip 1/4-1/2″ from both ends of the signal wire that you’re using and connect it from the relay common and normally opened (NO) terminals to the terminals on the garage door that you identified via the manual or by following the existing wires back to the opener.Garage Opener Connections
  6. Mount the relay somewhere on your garage door openerInstalled Relay
  7. Add the new outlet to your home automation hub using the instructions for your hub. Usually,it’s as simple as selected “Add device” and then pressing the button on the front of the outlet.  Be sure to plug the relay into the switched outlet, most of these switches have one side that’s always on and another that is turned on and off.Smart Outlet Installation

It’s really that easy. If you have any questions about something that you have that’s different than this setup, don’t hesitate to ask them in the comments.

Share this Post

Setting up the Hub

Remember how I said we have to make sure the outlet switches off after you turn it on?

There are a couple of ways you could do that:

  1. Manually turn it on and off
  2. Set up a task to turn it on and then immediately turn it off
  3. Wire in a circuit to create a momentary closure.
  4. Get a hub to do it for you!

Number 1 is the easiest to implement but could make future automation hard. Of course, it depends on the features of your hub’s software. What if you wanted to automatically close the garage door when you went to bed?

Number 2 gets the job done (just right in my book).

Number 3 is possible, but requires from extra components and wiring.

For my purposes, I just went into the SmartThings dev area and configured the switch as a momentary control, and it’s all taken care of.

What about door number 3?

Option 3 is a bit more involved and requires adding a capacitor and resistor in series with the coil so that the effect of the switch is only temporary until the capacitor charges up. You could do that more easily with a DC power source and relay than you could with the AC components I picked out above.

In my book, the extra components and connections make it a non starter when there is another acceptable solution. But if your hub doesn’t allow you to easily turn the outlet back off quickly and reliably enough to make your garage door happy, you may have to consider that approach.

If there’s enough interest, I can put together a detailed schematic and instructions for you.

What’s the Competition?

Some of you are wondering, “Why not just buy a connected garage door kit?”.

For one, they can be pricey. Some are up to $350 with a compatible opener.

Two, some people might not have support for their home automation protocol of choice. Whereas, smart outlets are easy to come by for any protocol.

But if your hub supports a commercial solution without the DIY hassle, then by all means, go for it. Or you may explore open home automation software to work on your system.

Here are several options for you:

MyQ by Chamberlain – Chamberlain sells a kit that works with other openers similar to the GarageIO for $130. With a MyQ enabled garage opener, you can directly control the door from your phone.

GarageIO – We wrote about the new GarageIO opener previously. When controlling more than 1 door, this isn’t a bad solution. But, it’s expensive for just 1 door.

Linear Garage Door Controller – This Z-Wave controller bundles a garage sensor and a controller that has the intelligence to provide the momentary switch closure without extra tinkering.

Linear FS20z-1 Switch Module – I’ve seen some people suggesting and writing up the Linear Z-Wave switch module as a potential solution. It will do the same thing as the solution above if it’s compatible with your hub. But, I wanted to write about something that could be more universally used. After all, there are plenty of home automation hubs that DON’T have Z-Wave support.

Your Smart Garage Door Opener Options

Solution# of Doors SupportedCost ($)ProtocolNotes
Garageioup to 3200 - 220WiFiIFTTT support
Gogogateup to 3135WiFiIFTTT support
Chamberlain MyQ1110WiFi
Linear GD00Z-4190Z-WaveMore secure than relay solutions
Linear FS20Z-1 + Tilt sensor163Z-Wave
Smart outlet + Relay + Tilt sensor172AnySee our how-to guide!
Quirky Ascend1100WiFi

A Brief Word of Caution

One word of warning about this solution and the FS20Z-1 switch module is that the security associated with the Z-Wave interfaces implemented by these devices are less secure than (some) dedicated garage door solutions.  It has to do with additional encryption used for the command to open or close the door, over and above that required from the hub for other devices that are paired with it.  In practice, it isn’t something that’s likely to be exploited since all sensors have to be manually paired with your hub anyway.  And, it’s tough for a hacker to insert himself into that process to capture the keys exchanged that allow future communication with devices.  But, you should be aware that the possibility exists.

If you run into any issues, just let me know in the comments, and I’ll do my best to sort them out.  And, feel free to share your own ideas and improvements to solve your garage door problem or check out our ranking of other great home automation ideas.

Did you find this tutorial helpful? Share it so your friends can enjoy it too.

Hi, I’m Jody. I graduated with honors with a Masters of Science in Computer Engineering and have over 15 years of experience working as an engineer with electronics products. I’m a lifelong learner and tinkerer and enjoy automating things around the house so I can solve bigger problems than getting out of bed to check if the garage door is closed . . . like too little sleep!

Comments

  1. Any idea what would be keeping the relay from toggling the garage door? I had to shave the wires down some to fit them into the holes where the push button wires lead to, but I wouldn’t think that would be the issue.

    the power end is correct and the hub found it with no issues. I changed it to a z wave virtual momentary contact switch. It triggers and I can hear the relay click, but I don’t believe it’s sending power since the door wont open.

    1. This may be just the way you phrased your description, but you aren’t “sending power” to the garage door opener. The open just senses a closed circuit when the relay closes.

      First, if you hear the relay click, then there’s no worry about the connections across the coil that operate the relay. I would double check that the two wires connected from the relay are the common and the normally open terminals. If you have a multimeter, you can set it to a resistance measurement and test that you’re getting near zero ohms when the relay is active (i.e. voltage applied to the coil). You can also test the opener end by using something metal to short across the two contacts to see if the door opens. If you have screw terminals exposed, a screw driver works. Otherwise, a single wire with two exposed ends will do the job. One more thing to check is how long is the relay active for? It’s very likely that your garage door opener has circuitry to debounce the switch (a fancy way to say it’s configured to ignore noise on the line), so it’s also possible that the relay is closed and then opens again so quickly that it isn’t being picked up by the opener.

      Hope that helps! Let me know how you end up.

  2. I’m just getting into home automation. Lots of info in this article. Please let me know how the open/close switch gets wires into the works so I can see if the door is open or closed?

    1. Author

      I personally use a Z-wave tilt sensor. It’s wireless and sends open/close information via my hub to my phone.

  3. I’ve been using the TP-Link Smart Switch (HS200) for most of my smart home stuff (no hub). I thought of letting the swith itself be the relay. Of course you are right that you want it to turn ON, then back OFF. But because the OFF command could hickup, I ordered a 110v relay from Amazon to be sure of the toggle not failing from a lost command.

    Now, I still will have to turn my Smart Switch OFF. How did you send the ON, wait 500ms, Then OFF? I have been thinking to use IFTTT, but they don’t have channels for the TP-Link. Do you have any ideas?

    Rico

    1. Author

      Well, initially I would just tap the control for the switch twice. It was easy enough and if the second command didn’t get to the switch, it’s no worse than holding the garage door push button down for too long. Usually, it just kills the light on your button temporarily.

      Or assuming you have a tilt sensor to see if your door is up or down, you could set up a routine to turn off the outlet when the sensor indicates that the door is closed. That will be a few seconds later.

      Finally, if you have SmartThings, you could write a smart app to implement whatever delay you want. Actually, I haven’t even looked, but there may already be one there if you look.

  4. I have a viper gate opener hard wired that operates via two chamberlain remote wireless keypads. I also have three chamberlain MYQ garage door openers – what is my best option to convert the viper to operate via MYQ short of buying a chamberlain gate opener???? Sdgold@att.net

    1. Author

      The only integration that I have seen for MyQ is the Wink home automation hub. So, you link the gate opener through that potentially. But, you may spend less on a new opener unless you already have an interest in home automation and would use the Wink for other things. Are you wanting to control everything from the MyQ app?

  5. If you’re familiar with Openhab, an open source smart hub project, there is a solution for simulating a momentary switch with a standard relay controlled by smart switch. A new Expire binding allows you to implement a control to return the switch to the OFF state after a defined time as short as 1 second. I have used the instructions in the article above as a guideline to create a wifi controlled garage door using a Belkin Wemo switch, a Digital-Loggers ac controlled relay and my OpenHab hub. Total cost (not including my Raspberry Pi 3 based OpenHab server) was $19.99 for the Belkin Wemo switch and $8.95 for the Digital-Loggers AC Sense Relay. I highly recommend the Digital-Loggers relay for the quality of build. It’s worth a couple of bucks more with Amazon prime delivery and controls either 15 Amp 120VAC or up to 48VDC power by sensing the presence of 120v AC power.
    I used the Wemo switch due the availability of an OpenHab binding for ease of implementation, but many switches have bindings or can be controlled via http or mqtt. I have integrated ITEAD ESP8266 based smart relays and serial controlled devices using Node.js and Python. I was also able to revive the abandoned TCP Connect LED bulbs that Home Depot used to carry and update most of my home lighting for less that $4 per bulb, including recessed can lighting. All devices can be controlled remotely using the myopenhab cloud service without exposing your home network. There is also a method for integrating the Alexa and Google Home services by emulating your devices as Hue devices. An Alexa skill for OpenHab has been submitted and is pending. There is also an OpenHab IFTTT channel.
    OpenHab isn’t plug and play yet. It takes some technical knowledge and perseverance to understand how to get things working, but there is a community forum and wiki that helps. It can talk to most device bridges and/or replace them. In my opinion, it’s the best solution available for integrating all of your smart devices into a single user interface.
    It is Java based, so it is available for PCs, Macs, Linux, etc. The Raspberry Pi 3 is cheap ($35) and very stable with built in ethernet, usb, wifi and bluetooth. One of the community contributors has created a build script that makes it very easy to set up an OpenHab server on a RPI3. If you’re willing to spend some time, give it a try. You can try it out on an existing computer and if you’re happy with it, migrate to a stand alone server.

    1. I do something similar too. I love OpenHab. I have a bunch of ESP8266 devices that I made that are controlled by OpenHab on RPi3. The ESP8266-01 has enough GPIOs to control two garage doors and two sensors. And you can build in the logic for the 500ms ON then OFF. But I think the cheapest method for a smart relay is the 433Mz transmitter with the Etekcity wireless outlets. You can get the transmitter for about $1 and connect it to your RPi3. And I got a 5 pack of the Etekcity wireless outlets for $15 (I think the price is $30 now). So basically $3 each when there is a sale. You have to do a little modification to the wireless outlet since you only want to use the relay part for the garage door. But you don’t have to modify it at all if you want to keep it as an outlet. I can use Siri or Alexa (through OpenHab) to control it . Do a search on raspberry pi 433Mhz.

  6. how do you connect the sensor to know if the garage is closed or opened?

    1. Author

      I did kind of breeze by that, didn’t I? You just follow the directions for your hub to add a device. For most, that means putting the hub into inclusion mode and inserting the battery into the sensor to complete the handshaking required.

  7. Hello Jody, I could read in article that some Liftmaster MyQ models not working with Linear GD00Z-4 ! what about : Liftmaster LM100EV & Liftmaster LM70EVK ?
    will it work with your system? …exept ac outlet in my country is 230volt ac

    I also have a Fibaro Rollershutter 2 rele`(motor rele`)..can that be used?

    regards trond

    1. Author

      Some garage door openers use a complex communication protocol between the opener and the wall switch that prevents using this directly. You can either check your manual or just connect a wire across the appropriate contacts to see if the door opens. But even if that’s the case, you can still wire a relay into your wall switch contacts. Then, it will relay the signals to your opener.

  8. If you wanted to make the wiring diagram for a circuit that creates momentary closure that would be fantastic. I don’t have a hub, I plan to use a HomeKit outlet switch to trigger the relay to open and close my electric gate. So it needs a momentary switch.

    1. Author

      David,

      You can find relays that will take a switched signal and convert it to a pulse. But the down side is that you still need to turn the outlet off at some point for it to work the next time. So, it would be easier to find software that can do that for you. What app are you using to control the outlet?

      The Chamberlain MyQ is the only Homekit ready garage door opener that I know of.

      1. Cool, then I should get one of them relays, what would the technical description be so I can find one?

        The best would be a relay that generates a pulse whenever the state of the AC side changes, e.g. One pulse when turned on and one pulse when turned off.

        I would just use the Homekit iOS app to turn on a wifi outlet when I want the gate to open, then turn off and back on again to close. I can also set up an automation so that when I leave my home geofence it turns off the outlet.

        Thanks!

        1. Author

          It’s an “interval on” relay. As I said, your challenge will be to de-energize the relay to reset it. You could buy two of them, use 2 half-wave rectifiers in front of them to convert your power input to IN and IN_bar by taking the upper and lower halves of the AC waveform, and connect the output of the interval on relays to an OR gate. But, after you’ve done all of that you may be better off just picking up a Chamberlain and saving some time and frustration. 🙂

  9. I know I’m coming to this late but one part of the project wasn’t clear to me and I thought it might be confusing others as well.

    What I didn’t realize at first was that the smart outlet is basically like a half-hot where one side is a pass through and is always powered. That is the side connected to the garage door opener itself so it always has power. The other side is connected to the relay and triggered by the sensor/zwave trigger.

    1. Author

      That’s a good point, thanks for pointing it out. I added a note to the instructions for future visitors.

  10. I built an automated opener using sonoff sv and mqtt as the protocol. The device cost less than $20 to build…

    1. Author

      Cool, any interest in doing a detailed write-up that people could follow along with?

  11. If your house were to lose power would the relay get tripped when the power comes back on in turn opening the garage door?

  12. I found your article when searching for a relay to use exactly for remote garage door operation as you describe. In my application everything works fine with a Leviton (HAI) Omnipro controller, a UPB lamp module, and some simple programming. The only recommendations I have are to:
    1. Mount the relay in a NEMA enclosure to prevent exposure to line voltage
    2. Use a 3 prong plug and ground (bond) the enclosure, if metal.
    3. Use a strain relief bushing for the power cord – enclosure.

    1. Author

      I’m definitely with you on points 1 & 2. The strain relief seems unnecessary given the fixed installation in my situation though.

  13. Ok. So I purchased an additional myq style single button button. I soldered wires to the back of the micro switch and then integrated this to my zwave garage door controller. But it seems that the input is so sensitive that even when the relay isnt tripped it keeps triggering the keypad. simply holding the wires in my fingers sends a command to open and close. Any thoughts on this?

    1. Author

      My only thought is that maybe you’re not tied in where you think you are and the short across the connections is making the switch act oddly. Did you confirm the operation of the switch with a meter before soldering your new wires to it to confirm you had the right spot?

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.