[Release] Garage Opener app (beta)

Garage Opener app for Hubitat

Make your garage door switch smart.


  • Works with a switch that starts or stops your garage door
  • Optionally detects when garage door is fully open with a contact sensor
  • Optionally detects when garage door is fully closed with a contact sensor
  • Detects if garage door is stuck half way though (when using contact sensors)
  • Can still use the switch to manually control the garage door, keeping the device state in sync

Requires a switch that starts and stops your garage door, and every time it starts it goes in the opposite direction.

If you have a simple contact button that controls the garage door, you can connect a smart relay in parallel to the button. Alternatively, install a smart switch, connect an AC relay (e.g. LY2NJ) instead of a light to short the garage door opener contacts. Consult with your electrician before dealing with mains voltage!

Basic Installation

  1. Install driver and app code.
  2. Add a virtual device using the installed Virtual Simple Garage Door Controller driver.
  3. Add the Garage Opener app.
  4. Configure the app with the virtual garage door controller and the smart switch that controls your garage door.


  • Garage Door Control - virtual device which uses Virtual Simple Garage Door Controller driver
  • Garage Switch - the switch that controls your garage door
  • Garage opening time (in seconds) - the time it takes for the garage door to open
    • If using contact sensors, this value will be used to detect if the door is stuck, so use a slightly large value, e.g. increase the actual time by 1 second
    • If not using contact sensors, this value will be used to time the garage door movement to sync up the virual door state with the physical door state
  • Switch off delay (in milliseconds) - the delay to automatically turn the Garage Switch off so it acts as a momentary switch
  • Reversal delay (in milliseconds) - the delay between stopping the door and starting it again in the opposite direction (used when changing from closing to opening of vice versa)

Step-by-step instructions

Virtual Simple Garage Door Controller

  1. On the Hubitat hub, go to the Drivers Code page and click + New Driver
  2. Copy and paste the contents of virtual-simple-garage-door-controller.groovy and Save
  3. Go to the Devices page, click Add Virtual Device, specify Device Name, Device Label, select Virtual Manual Garage Door Controller for Type and click Done

This device will represent the state of your physical garage door and will enable controlling the door through it.

This driver is needed to avoid automatic change of state of the built-in Virtual Garage Door Controller driver.

Contact Sensors

The app can detect when your garage door is fully closed or fully open.

  • Attach a contact sensor to the garage door when it's fully closed (the contact should be closed in that position)
  • Attach a contact sensor to the garage door when it's fully open (the contact should be closed in that position)

If you only have a single contact sensor it's recommended to use it for detecting fully closed door.

App Installation

  1. On the Hubitat hub, go to the Apps Code page and click + New App
  2. Copy and paste the contents of garage-opener.groovy and Save
  3. Go to the Apps page, click Add User App, select Garage Opener and click Done

Your feedback is welcome.


Thanks for this @muxa. This seems like it's exactly what I want to do with my 2 garage doors. My only worry is that I'm not a programmer and I'm still pretty new to HE. I may be biting off more than I can chew by trying to implement this on my own as my first home automation setup. Any advise from former noobs?

Would this work with the Zooz Zen16 multirelay controlling both doors?


It will work as long as each relay is exposed as a switch device in Hubitat. Even if it doesn't, it should be possible to create some rules to sync relays to virtual switches.

However the app only supports a single garage door currently. It should be relatively straight forward to change this app to support multiple garage door. Not sure when I'll be able to get to doing it though.

In the meantime to control your garage doors you can create rules in a Rule Machine like this:

Screenshot 2020-04-11 12.06.41
Screenshot 2020-04-11 12.06.55

These don't handle timeouts or contact sensors, but they did work my setup. With addition of contact sensors and timeouts the logic will become much more complicated, that's why I created the app.

I hope this helps.

Great app/driver. I am using it with a Hubduino and didn't like how the Hubduino driver didn't allow for reversal of the door mid open/close like your app does very well. Thank you for sharing this!

One thing I would suggest is adding the ability to rename the app or incorporating multiple doors into the one app. I have two garage doors so install two instances of the app but they are both called the same thing.

Thanks for your suggestion. I'll update the app at some point to support multiple garage doors. The updated app won't be backwards compatible though and will need to be setup again (because of the way how multi-instance app configuration state is stored)


Hi There! I have used your code to get this up and running, however I have a tilt sensor instead of a contact switch. Do I need to create a virtual device that refers to the tilt sensor? Can you advise? Thank you!

This might be a dumb question, but after I create this virtual switch and put it on a dashboard, what do I choose as the template so it works as a switch and displays the sensor? Or am I wrong about what this even does? lol...

1 Like

Hi all, I'm new to Hubitat (used HA and Indigo in the past). This seems like exactly what I need to get my DIY MQTT based garage door opener working. I am using Node-red to interface Hubitat with MQTT. I cant seem to get the virtual garage door device to update its status to reflect the state of the contact sensor. The contact sensor is updating fine in hubitat, but it has no affect on the state of the virtual garage door device. Any ideas?

Yes, you'll need to create a virtual device with a Generic Component Contact Sensor driver, setup some rules to set the contact sensor state based on the state of the tilt sensor, and then use the virtual contact sensor in the app.

Can you post a screenshot of the app configuration? Also, app logs would help to understand what might be going wrong in the app

Hi I'm seeing an issue with this, the app works in HE, Alexa and HomeKit I can open and close the door in each. but when I press the hardwired button in the garage or the garage door openers associated wireless remote control the app does not update the Garage Door device.

The contact sensors associated open and close as expected but these do not update the garage door state the the state is not fed back to alexa, HE or HomeKit....any ideas?


@jon.d.tyler There was a bug that prevented the garage controller state from being updated when using a "non-smart" remote for the garage door.

It was fixed in v1.0.1 (which I've just pushed to github)

Update v1.0.1: fixed garage controller state not updating when contact sensor changed without engaging a switch (e.g. using a button on the garage motor)

I have the same question as RONxBURGUNDY, once you have everything setup how to you correctly setup the dashboard?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.