Skip to content

Cheap and Easy Home Assistant Garage Door Control

Wemos D1 Components for Home Assistant Garage Door Opener

Home Assistant is the main method I use for opening my garage (other than the integrated remote in my car).  I’ve had this setup for the better part of a year and thought I would share it in case it helps anyone else control their garage door.  This hardware has been running with Tasmota firmware for the bulk of that time and recently I’ve discovered ESPHome and have converted this guy.  And while there are plenty of DIY tutorials for garage door control, I think this is the simplest to get up and running.  The parts list is very basic:

  1. Wemos D1 Mini – The Wemos D1 Mini is an ESP8266 based microcontroller that will handle the heavy lifting of WiFi and communicating to your Home Assistant instance [AliExpress | Amazon]
  2. Wemos Relay Shield – The Relay Shield will perform the physical function of closing the circuit on the garage opener to activate it [AliExpress | Amazon ]
  3. Wemos DHT shield – I added the DHT to get temperature and humidity data [AliExpress | Amazon ]
  4. Wired Reed Switch – A magnetic reed switch that will provide state of the door [AliExpress | Amazon ]
  5. LM2596S DC-DC power regulator – It converts garage door’s 12V DC to 5V DC for the Wemos or use a microUSB cable. [AliExpress | Amazon ]

I buy my stuff from AliExpress because it’s so cheap that it’s basically free as long as you can put up with month-long shipping.  I think all of these combined were about 10 bucks. When you finally get these parts from China, you will need to solder the Wemos headers together so you can stack them.  My relay shield was on GPIO5, the DHT shield was on GPIO2, and I connected the reed switch on GPIO13.  My garage door opener has an option for a backup battery, and the connection for this battery provides a 12v DC output when the garage door opener is powered up.  So while I could have powered the Wemos thought a micro USB and a wall wart, I just got the DC-DC power regular.  I connected it to the garage door and used a multimeter to adjust it’s potentiometer to a 5v output and then connected the ground and 5v to the Wemos.

Installation is pretty straight forward, you connect the garage door opener’s control contact (same ones where your local button is wired) to the common and normally open contacts of the relay.  I’ll eventually post some pictures, but I don’t have any right now.

I’m not going to go through the details of setting up ESPHome.  You can watch either Rob’s or digiblur’s videos to get a good explanation on it.  Once you have it up and running, you will need to create a new device by populating the name and WiFi details.   Here is my config:


The components above include

  • A binary sensor component for the reed switch input
  • A sensor component for the DHT temp and humidity
  • A switch gpio component for the relay
  • A switch template for the pulsed output imitating a momentary button press
  • A switch restart component to reboot the Wemos
  • A status LED component for indicating networking/error status.

Now can compile the firmware and flash it to your Wemos D1.  Again, if you’re not familiar with how to do this, reference the videos linked above.  Once it’s flashed, power cycle the device.  Now you should be able to open the web gui for the device by either going to it’s IP or going to esphome_garage_door.local in your browser.  When the page loads up, you should test out the Garage Door Switch by hitting the button next to it.  If when you open the Garage Door Sensor changes state, then everything is working as it should.

Now to integrate it into Home Assistant, you will need to go to configuration > integratios.  Assuming you have discovery enabled, you will have a new ESPHome device, click configure and add it to your system.  In theory, if you don’t have any existing conflicting entities, your entity names should match the ones I have (If not, post in the comments and I’ll try to help).  I’m using lovelace with the following config:

This provides you with a simple button who’s icon shows you the state of the door.

Because I’ve forgotten to close the door a few times, I’ve also set up an alert on the door to notify my phone when the door is open for more than 10 minutes:


A word about security. This setup means that anyone with access to your WiFi network could open your garage door.  This would also assume the intruder is on your WiFi, knows the name or the IP of the device, the fact that it’s running a web server, and could connect to it to open your garage door.  Personally, I tightly control the people that have access to my network so it’s not a big concern for me.  The likely hood of that happening seems lower than someone breaking a window on my house.


Published inDIY HardwareHome Assitsant


  1. David David

    This is a great write up. I’m currently using a Sonoff 4ch pro with ESPhome to control both my garage doors. It worked perfectly for the first month but recently one of the relays started firing randomly so I had to move it to one of the two open relays. Have you seen this at all with the wemos?

    • DK DK

      Personally, I only have great things to say about it. I’ve got them running in several places and they have been rock solid. And I’m loving ESPHome, Otto is doing an incredible job!

  2. Will Will

    How accurate is the AM2302 with the D1 shield? I’ve tried the ESP-01 DHT11 shield and the ESP generates enough heat that the data is garbage.

    • DK DK

      Yea, It’s pretty much garbage. I just looked at the past 24 hours of data and it ranges from 74-82 while it’s 60 degrees outside. My furnace is right next to it so I’m sure it’s contributing to the shitty data.

      It’d be easy enough to extend the temp sensor out via a few feet of wire to eliminate thermals from the Wemos. I might have to do it, but I just haven’t found the need for this data as it never freezes here.

Leave a Reply

Your email address will not be published. Required fields are marked *