We solve the problems others can't.
Turn a regular Garage Door Opener into a Wifi-enabled Smart opener for under $40
(Written July 17, 2025 by Jason Cousineau)
Replacing a garage door opener just to add WiFi control can be more trouble than it’s worth. The cost alone may be hard to justify — especially if you have a non-standard setup, like a 9-foot door that requires an extension kit. And even after going through the hassle of installation, you’re often locked into using a proprietary app that’s clunky, limited, or requires additional hardware just to function properly. You give up flexibility, and customization becomes difficult or impossible. Expandability is limited, and scalability — whether to multiple doors, sensors, or platforms — is virtually nonexistent.
The following is a cheap, bare-bones, easy-to-expand setup to connect an old garage door opener to Wifi.
Who should NOT attempt this project:
This project is intended for individuals with a solid understanding of electronics, networking, and basic automation. You should be comfortable working with low-voltage wiring and know how to select appropriate wires for small DC loads. Familiarity with concepts such as coding, compiling, and flashing is recommended. You’ll also need basic networking knowledge, including how to connect devices to a 2.4 GHz WiFi network, choose and assign a static IP, and troubleshoot any connectivity issues using your router settings. It's equally important to understand how your specific garage door opener works so you don’t inadvertently bypass or disable any built-in safety features like IR sensors or auto-reverse mechanisms. Additionally, you should be confident using hand tools to mount components securely and safely. If any part of this setup is outside your comfort zone, particularly in regard to electrical safety or garage door mechanics, this project may not be a good fit.
This guide is not a step-by-step blueprint intended for universal application. It documents how a specific solution was implemented successfully using particular components and methods. While the concepts and wiring approach are broadly applicable, individual setups may vary in important ways. Readers are expected to understand the principles behind the system and adapt them to their own environment. This is not a “connect-the-dots” tutorial — it’s a practical reference for those with the background and initiative to customize the solution to fit their needs.
Requirements:
To complete this project, you’ll need the following:
Garage door opener with wall control terminals
Most openers with a wall button or remote will work — we’ll be connecting to the same terminals those use. Some newer models with enhanced security features won't work.
2.4 GHz WiFi network
The NodeMCU (ESP8266) only works on 2.4 GHz, so make sure your router has that band enabled.
Nearby power outlet
You’ll need a standard 120V outlet close to the opener. This project assumes a typical wired setup — not battery-powered or off-grid.
NodeMCU (ESP8266) ($13 CAD on Amazon.ca)
This is the WiFi-enabled microcontroller we’ll use to control the relay.
5V relay module ($8.19 CAD on Amazon.ca)
Used to trigger the garage door opener. We’ll link a compatible one later in the guide.
Magnetic reed switches ($11 CAD on Amazon.ca)
Lets you detect whether the garage door is open or closed.
USB power adapter and cable
Powers both the NodeMCU and the relay.
Wires, solder, and basic tools
You’ll need low-voltage wire (speaker wire is great), a soldering iron (or jumper wires for prototyping), and common tools like a screwdriver and wire strippers. A multimeter is very helpful.
Computer with USB port
Needed to flash the NodeMCU. Linux is recommended for its simplicity and reliability, but Windows and Mac work too with the right tools. Once the NodeMCU is running, the computer is no longer needed.
Getting Started:
The project starts at the existing wall switch. For this example, it's a 2004 Wayne Dalton Quantum opener. This particular opener operates at an odd frequency making replacement remotes and keypads expensive and difficult to find, so being able to use any smartphone as a remote is a real benefit. The existing switch is battery powered, and the batteries require frequent replacement, so previous to this project a 12V LED power supply was hardwired on to eliminate the need for batteries.
The first step is locating the button that directs the opener to open or close the door. It's the large button on the left with the up/down arrows in this example. This will be the target of the project.
Beneath the target button is a 4-pin momentary switch. When pressed, it briefly connects one pair of pins to the other, completing the circuit.
Using a multimeter, it was determined that:
The left-side pins are connected to each other and to ground
The right-side pins are connected to each other and sit at 5V
Pressing the button bridges the left and right sides, closing the circuit
To simulate this button press electronically, a relay will be used to connect the left and right sides together momentarily. The black and red wires shown in the second photo are connected to the relay and will handle this simulated press.
If you are able to locate and solder wires to a switch such as this, you will likely be able to complete this project.
Hardware Descriptions
The ESP8266 NodeMCU is a small, WiFi-enabled microcontroller that serves as the brain of this project. It was chosen because it’s cheap (about $13 CAD), easy to work with on Linux, and readily available on Amazon with fast, free shipping.
To use it, you simply connect it to your computer via USB, flash it with firmware (like ESPHome or custom code), and configure it to join your WiFi and control the relay. Once set up, it can respond to commands from a web interface or smart home system.
We used a 5V 1-channel relay module with optocoupler isolation. It can be powered directly from the NodeMCU, keeping the setup simple with no extra power supply needed.
The optocoupler adds a layer of protection between the relay and the NodeMCU. This relay lets the NodeMCU simulate a button press by briefly closing the circuit — just like pressing the wall switch manually.
Reed switches are simple magnetic sensors used to detect whether the garage door is open or closed. When a magnet is nearby, the internal contacts close (or open, depending on the wiring).
These switches have NO (Normally Open) and NC (Normally Closed) terminals. For this project, the switch is wired so that it only reports the door as closed when the circuit is complete, ensuring the system only shows a closed state when the sensor is functioning properly.
Setting up the Hardware and Firmware:
To program the NodeMCU, the YAML file is compiled into firmware and flashed onto the chip over USB using ESPHome. This process translates the YAML into low-level C++ code that directly controls the chip’s pins and functions. Once flashed, the NodeMCU connects to your WiFi network and begins running the firmware.
The chip interacts with connected components through its GPIO (General Purpose Input/Output) pins, which are physically labeled on the board as D0, D1, D2, etc. In the YAML, these are referenced by their GPIO numbers (e.g., GPIO5 corresponds to D1 on most NodeMCU boards). The WiFi network name and password are stored in the YAML, along with a static IP address such as 192.168.0.250, so the device is easy to locate on your network.
To flash the firmware, the ESPHome command-line tool or the ESPHome dashboard (a browser-based interface) can be used. Both are available on Linux, Windows, and Mac. These tools compile the YAML and send the firmware to the NodeMCU over USB. After the first successful flash, future updates can be sent wirelessly over the network (OTA).
A web interface is also built into the firmware. Once the chip is online, you can visit it from any browser on your network by entering the static IP address (e.g., http://192.168.0.250) to view the current door status, toggle the relay, or make sure everything is working properly.
For this example, we will be using the built-in WebUI. The ESP8266 WebUI will automatically display the switches and allow for Relay control based on the YAML file.
The YAML file below matches the wiring used in this guide. You can use it and change any fields needed to match your particular setup. This is where you provide credentials for your wifi, pick a static IP, set a username and password for the WebUI (if desired), etc.
esphome:
name: garagedoor
friendly_name: Garage Door
esp8266:
board: esp12e
wifi:
ssid: "YOUR_WIFI_NAME"
password: "super_secret_password"
manual_ip:
static_ip: 192.168.0.250
gateway: 192.168.0.1
subnet: 255.255.255.0
dns1: 192.168.0.1
logger:
api:
password: "this_is_not_a_real_password"
ota:
platform: esphome
web_server:
port: 80
auth:
username: user123
password: open_sesame_123
binary_sensor:
- platform: gpio
pin:
number: GPIO4
mode: INPUT_PULLUP
name: "Garage Door Fully Closed"
device_class: garage_door
filters:
- delayed_on: 50ms
- delayed_off: 50ms
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
name: "Garage Door Fully Open"
device_class: garage_door
filters:
- delayed_on: 50ms
- delayed_off: 50ms
switch:
- platform: gpio
pin: GPIO5
id: garage_door_relay
name: "Garage Door Relay"
restore_mode: ALWAYS_OFF
on_turn_on:
- delay: 500ms
- switch.turn_off: garage_door_relay
Wiring:
With the ESP8266 flashed and connected to your WiFi, wiring can begin. The reed switches are a low-risk place to start. One switch should be physically positioned to align when the garage door is fully closed, and another when the door is fully open.
Fast-setting JB Weld epoxy works well for attaching the reed switch to the track. To get the planar alignment right, various pieces of scrap lumber were stacked together to bring the switch up to the correct height so it sits level with the magnet. In this example, the “Fully Open” switch doesn't always align perfectly along it's length, as the door’s stopping position can vary by about 1 cm each time — but it still functions reliably.
Speaker wire was used to connect to the COM and NO (Normally Open) terminals on the reed switches. It’s inexpensive, available in many lengths, and includes two conductors joined together, making it easy to run a single, tidy line for both connections. Another advantage is that speaker wire typically includes polarity markings — such as different colors (e.g., red and black) or a difference in conductor material (copper vs. silver). These markings are important, since over longer runs it becomes difficult to visually trace which conductor is which.
"Fully Closed" Switch
NO → D2 (GPIO4)
COM → GND
"Fully Open" Switch
NO → D3 (GPIO0)
COM → GND
After wiring the Reed Switches, it may be a good time to test out the ESP8266 and see that it's connecting and reporting on the status of the switches. The switch status will update near-instantly as it changes. If you are using the provided YAML, a username and password for the WebUI are pre-set as user123/open_sesame_123
The next step is to wire the Relay to the ESP8266.
Relay IN → D1 (GPIO5)
Relay DC+ → VIN
Relay DC- → GND
After this, you should be able to make the Relay click using the WebUI. It looks something like this:
With the Relay clicking on demand and the Switches reading properly, the next step is to wire the Relay to the Garage Door Controller. In this example there was plenty of room inside the controller, so the wires from the Relay are simply soldered to pins on the left and right of the momentary switch. The plastic casing around the switch was modifed to allow the wires to pass through.
COM on the relay is soldered to the left of the switch which was found to be Ground. NO on the relay is soldered to the right which is 5V.
The YAML defines how long a simulated button press will last. In the Example YAML, the relay will be activated for 1/2 second.
The prototype looks like this. Power is supplied through an old Android phone charger.
Operating the Door:
With the relay connected to the remote, you should now be able to control the door and monitor the status through the WebUI.
The WebUI will only be availalbe on your local network. If you're going to make it more widely available, then at least give it a password. That is accomplished with the following code that already exists in the example YAML file:
web_server:
port: 80
auth:
username: user123
password: open_sesame_123
Some options for opening this up to non-local devices are:
Port Forwarding – Forward a port from your router to the NodeMCU's IP address.
VPN – Set up a home VPN to securely access your local network remotely.
Tailscale or ZeroTier – Peer-to-peer mesh networks for remote access without port forwarding.
ngrok – Create a secure temporary tunnel to your device over HTTPS.
Home Assistant + Cloud – Integrate with Home Assistant and use its cloud service or secure remote access setup.
This is the project with wiring cleaned-up and mounted in a wooden box to keep it safe from accidental contact. The ESP8266 needs to be within range of the router and not blocked by anything metal. (Don't mount it inside a metal box.)
Final Notes:
You can find an ESP8266 and Relay put together on one board. We tried ones of these initially and regretted it for a number of reasons. The parts recommended here worked flawlessly together and were much easier to use.
Port-Forwarding is one way (probably the easiest and quickest) to make the WebUI available outside of your local network. However, your router will need to support Hairpin NAT/NAT Loopback. If it doesn't you may find you can't access the external address while on your local network and require two different WebUI addresses depending which network you are connected to.
This writeup is free to use, modify, and share. If it saved you time, solved a problem, or helped you avoid buying a new garage door opener, consider making a voluntary payment of any amount to support more work like this.
Questions, comments, complaints, and improvements are welcome.
© 2025 Jason Cousineau Solutions Inc.
Built with intelligence —
human and otherwise.