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!
Add a virtual device using the installed Virtual Simple Garage Door Controller driver.
Add the Garage Opener app.
Configure the app with the virtual garage door controller and the smart switch that controls your garage door.
Configuration
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
On the Hubitat hub, go to the Drivers Code page and click + New Driver
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
On the Hubitat hub, go to the Apps Code page and click + New App
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:
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.
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...
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.
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?
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)