Your garage door is probably the biggest moving object in your house, and also the one most likely to be left open at 2 AM. Let's fix that. Here's how to get full local control with Home Assistant, whether you buy a commercial solution or build your own for under 15 euros.
Most garage door openers are surprisingly simple. A dry contact (two wires shorting together) triggers the motor, the same thing your wall button does. Smart controllers just simulate that button press over Wi-Fi or Zigbee.
A relay or smart device connects to your opener's terminals. It triggers open/close commands.
A reed switch or tilt sensor tells Home Assistant whether the door is open or closed.
Creates a "cover" entity that you can control from dashboards, automations, and voice commands.
From plug-and-play to full DIY. Pick your level of effort.
The gold standard for garage door control in the HA community. If you have a LiftMaster, Chamberlain, or Craftsman opener, this is the one. It speaks the Security+ 2.0 protocol directly, so you get door state, obstruction detection, and light control without extra sensors.
Wire it to the same terminals as your wall button. Add a reed switch for state. Simple, cheap, reliable. Works with any garage door opener that uses a dry contact trigger.
The easiest option if you want something that just works. Includes the sensor, wiring harness, and mounting hardware. The HA integration works locally after initial cloud setup.
Great if you already have a Z-Wave network. The built-in garage door mode prevents accidental toggles. Can control up to 3 devices with one unit.
Premium option with a polished app and HA integration. The camera add-on lets you see your garage from the HA dashboard. Worth it if you want zero tinkering.
An ESP32, a relay, and a reed switch. That's it. Flash with ESPHome and you have a fully local garage door controller that rivals commercial options.
esphome:
name: garage-door
platform: ESP32
board: esp32-c3-devkitm-1
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
api:
encryption:
key: !secret api_key
# Reed switch on GPIO4 (door state)
binary_sensor:
- platform: gpio
pin:
number: GPIO4
mode: INPUT_PULLUP
inverted: true
name: "Garage Door Contact"
device_class: garage_door
id: garage_contact
# Relay on GPIO5 (triggers opener)
switch:
- platform: gpio
pin: GPIO5
name: "Garage Door Relay"
id: garage_relay
on_turn_on:
- delay: 500ms
- switch.turn_off: garage_relay
# Cover entity (open/close logic)
cover:
- platform: template
name: "Garage Door"
device_class: garage
lambda: |-
if (id(garage_contact).state) {
return COVER_OPEN;
} else {
return COVER_CLOSED;
}
open_action:
- switch.turn_on: garage_relay
close_action:
- switch.turn_on: garage_relay
stop_action:
- switch.turn_on: garage_relay The relay pulses for 500ms (simulating a button press), then turns off. The reed switch reports whether the door is open or closed. Home Assistant sees it as a proper cover entity with open/close controls.
A smart garage door without a state sensor is just a remote toggle. You need to know whether it's open or closed before you can automate safely.
The most reliable option. A two-part sensor: one piece on the frame, one on the door. When the magnet is close, the circuit closes. Reports open/closed with zero ambiguity.
Best for: any door type. Wired version costs โฌ3, wireless Zigbee versions (Aqara) around โฌ12.
Mounts on a door panel. Detects whether the panel is vertical (closed) or horizontal (open). No second piece needed. The Meross MSG200 includes one.
Best for: sectional/roll-up doors where magnetic placement is tricky.
An ESP32 with an HC-SR04 sensor mounted on the ceiling. Measures distance to the door or the floor below it. Can detect partially open states, not just binary open/closed.
Best for: advanced setups where you want percentage-based position tracking.
Once your door is connected, these automations make it genuinely smarter.
Left the door open? This closes it automatically. The single most useful garage automation.
automation:
- alias: "Auto-close garage after 10 minutes"
trigger:
- platform: state
entity_id: cover.garage_door
to: "open"
for: "00:10:00"
action:
- service: notify.mobile_app_phone
data:
message: "Garage door open for 10 minutes. Closing now."
- service: cover.close_cover
target:
entity_id: cover.garage_doorCombines presence detection with garage control. When the last person leaves home, close the door.
automation:
- alias: "Close garage when everyone leaves"
trigger:
- platform: state
entity_id: zone.home
to: "0"
condition:
- condition: state
entity_id: cover.garage_door
state: "open"
action:
- delay: "00:02:00"
- service: cover.close_cover
target:
entity_id: cover.garage_doorEvery night at 11 PM, check if the garage is still open. If so, close it and send a notification.
automation:
- alias: "Bedtime garage check"
trigger:
- platform: time
at: "23:00:00"
condition:
- condition: state
entity_id: cover.garage_door
state: "open"
action:
- service: cover.close_cover
target:
entity_id: cover.garage_door
- service: notify.mobile_app_phone
data:
message: "Garage was still open at bedtime. Closed it for you."Uses phone GPS to open the garage as you pull into the driveway. Add a condition for time of day so it only works during reasonable hours.
automation:
- alias: "Open garage on arrival"
trigger:
- platform: zone
entity_id: person.your_name
zone: zone.home
event: enter
condition:
- condition: state
entity_id: cover.garage_door
state: "closed"
- condition: time
after: "07:00:00"
before: "22:00:00"
action:
- service: cover.open_cover
target:
entity_id: cover.garage_doorGet a phone notification if the garage opens when nobody is home. Simple but important for security.
automation:
- alias: "Alert on unexpected garage opening"
trigger:
- platform: state
entity_id: cover.garage_door
to: "open"
condition:
- condition: state
entity_id: zone.home
state: "0"
action:
- service: notify.mobile_app_phone
data:
message: "โ ๏ธ Garage door opened but nobody is home!"
data:
push:
sound: default
interruption-level: time-sensitiveA garage door can cause serious injury. Take these precautions seriously.
Never automate a garage door without knowing its actual state. A controller without a sensor is just a blind toggle. You need to know if it's open or closed before sending commands.
Make sure your opener's built-in safety sensors still work. Place a box under the door and trigger a close. The door should reverse immediately. If you're wiring a controller directly, never bypass these sensors.
Add a notification (or even a siren/buzzer) a few seconds before an automated close. This gives anyone in the garage time to stop it. Especially important for auto-close timers.
Smart controllers are added alongside your existing wall button and remotes, not replacing them. If your network or Home Assistant goes down, you can always open and close the door manually.
Pick your path based on your comfort level.
Meross MSG200
~30 minutes, ~โฌ35
Shelly 1 + Reed Switch
~1 hour, ~โฌ15
ESP32 + ESPHome
~2 hours, ~โฌ12
Not sure what's compatible with your setup? Run a free scan and we'll tell you what works.
Scan Your Smart Home