My legacy garage door opener conversion project

So I have an older genie garage door opener (push button to open/close with 1 button remotes) that I decided to integrate with HE and Homekit. I'm sure there's a lot of these legacy openers out there so I thought I'd publish my solution here. End result is that my opener is now a fully functional garage door device on my HE zigbee network that can also be controlled via siri and accessed from Apple Carplay.

Parts needed:

  • Ademco 958 overhead door contact to show door position
  • Zigbee relay with momentary on capabilities to perform push button garage door actuation.
  • Zigbee contact closure sensor to capture the state of the Ademco 958.

Here's the device that I use to perform the relay and contact functions. It's small, easily mounts in the garage and has a variety of power supply options :

This Sinope device may also work but I'm not sure if it has a momentary on capability for the relay devices:

Of course there are many inexpensive stand-alone zigbee devices out there that can perform the functions too. Feel free to make your own choices.

Next, you will need to load up this driver and create a virtual device:

/*
 * Virtual driver for garage door control.  Useful for Homekit and other implementations when your garage door is controlled by a pushbutton.
 * Needs relay and contact sensor devices.  A good device to use is a Frient I/O module which has both.
 * DoorState is used to change state from opening/closing to opened/closed
 *
 * This driver is designed to work in conjunction with a rule machine rule that manipulates the device.  
 * The required hubitat compatible devices are an auto off relay controlling the door pushbutton and a NO contact sensor connected to a magnetic sensor
 * such as an Ademco 958 for door position sensing.
 * See the "Garage Door Controller" rule which integrates the two I/O devices to control a virtual garage opener device using this driver
 */
metadata {
    definition (name: "Push Button Garage-Opener device", namespace: "sleuth255", author: "Sleuth255") {
        capability "GarageDoorControl"
        capability "ContactSensor"
        command "SetDoorState", [[name:"Set Door State",type:"NUMBER", description:"1 = Closed, 0 = Open"]]
    }
}
preferences {
    section("Garage Door Logging") {
        input name: "logEnable", type: "bool", title: "Enable debug logging", defaultValue: false
    }
}

void SetDoorState(DoorState){
    if (DoorState == 0) //Door is open
       sendEvent(name: "door", value: "open", isStateChange: true);
    else
       sendEvent(name: "door", value: "closed", isStateChange: true);
}

//
//-----------------------------------------------------------------------------
// Standard stuff
//-----------------------------------------------------------------------------
//
void installed()
{
    if (logEnable) log.debug "Garage Opener driver Installed";
}

def logsOff() {
    log.warn "debug logging disabled...";
    device.updateSetting("logEnable", [value: "false", type: "bool"]);
}

def updated() {
    log.info "updated..."
    log.warn "debug logging is: ${logEnable == true}"
    if (logEnable) runIn(1800, logsOff)
}

def parse(String description) {
   // Shouldn't be used
   log.debug(description)
}
//
//-----------------------------------------------------------------------------
// Operations
//-----------------------------------------------------------------------------
//
def close() {
    if (logEnable) log.debug "Received Close command";
    sendEvent(name: "door", value: "closing", isStateChange: true);
}

def open() {
    if (logEnable) log.debug "Received Open command";
    sendEvent(name: "door", value: "opening", isStateChange: true);
}

Finally you will need to add this rule machine rule to control the device:

In the above rule, "Garage Door Position" is the zigbee contact sensor attached to the ademco 958, the "Garage Door Actuator" is the zigbee momentary on relay wired in parallel with the door activation push button in the garage and "Garage Door" is the virtual device created from the above driver. Its important that you make sure the rule test for "Garage Door Position" uses the actual name you give to your contact sensor device.

Once you have everything set up, you will be able to use your legacy opener as a fully functional HE Garage Door device and you will also be able to publish it via Homekit integration to your homekit installation.

Here's some shots of my implementation:

1 Like

Nice right-up, thanks for sharing.

The following isn't a criticism, just an offering of opinion. :thinking:

Unless you have no way to mount the position related contact sensor aka magnet/reed switch, the best mounting location is to attach it to the top of multi-panel garage doors.
The design of the multi-panel doors means the top panel moves a larger distance relative to the garage door opener movement at the very start of opening/end of closing.
So, same as you mount the contact sensor on a swing door away from the hinges for maximum sensitivity, mounting on the top of a multi-panel garage door will give the best results.

But whatever works for your application is always the best answer. :smiley:

Edit: Added picture.

Pic of installed sensor.

1 Like

Your solution would also have the advantage of keeping the sensor out of the elements (albiet with a somewhat more difficult installation requirement). You can see in my picture that the sensor itself is a bit pitted from getting wet over the years.

From a reliability perspective however, I've been using the floor mounted installation for quite some time now and its been absolutely reliable at reporting the door's open/closed state. It also has the advantage of returning an empirically accurate state for "closed" (which is what I want the most since most of my home related automation is about making sure the door is closed). In fact, before developing this implementation for HE, I used it with a UPB I/O module to close the door if it was left open after I had shut down the house for the night.

A single sensor yields an empircal "state" and an empirical "not state". So, if the sensor was at the top then it would be able to empirically indicate "open" and "not open". Converesly if the sensor was at the bottom it would be able to empirically indicate "closed" and "not closed". So, when you command the door to close with only a sensor at the top, you can never be sure it closes and doesn't actually stop somewhere between open and closed. Not a good thing from a home security perspective... So, my shutdown logic commands the door to close then waits 15 seconds. If the door state isn't closed, it tries again. If another 15 seconds expire and the door state still isn't closed then I TTS the bedroom speaker that the door is open.

For myself I felt it was easier to simply use a zen 16 controller and a security 2.0 switch. (MH Cozy relay works just as well if you prefer zigbee) Allows the oem system and safety sensors to stay in place. Also a tilt sensor.

The zooz zen16 controller looks like a good z-wave relay/contact sensor combination. It would work well with the above driver/rule combination if the relay supports a pulse capability. Is the security 2.0 switch you mention specific to MyQ enabled liftmaster openers?

It's simply for anything past 2011/12. It's a security 2.0 to dry contact adapter...

Zen-17 also works, as does MHCozy for zigbee.

I used a MHCozy dual gang relay for a while to control a heating register in the lower level bathroom. The dual gang was a bit of a pita to get up and running and it doesn't have a "pulse" capability (since I actually had to use a Zemismart ZigBee Wall Switch Multi-Gang driver to control it). I ended up switching the register over to a Frient IO module that I was also using for general HVAC control. The above rule could be modified to perform the pulse function with any relay too via an on,delay 1 sec, off sequence.

That's correct - more specifically, it's for yellow-button Liftmaster/Chamberlain openers.

The bare-bones dumb Genie opener I installed in 2021 does not require anything like that -- for it, I use a Zen17 and 2 wired dumb reed sensors on the rail (1 full-closed, 1 full-open).

1 Like

Yup, having sensors at both ends is the best solution for sure. "Opening" and "Closing" garage door states both become empirically accurate and can be timed out to indicate jammed/error conditions. In my solution above, only the "Closing" garage door state is accurate. "Opening" becomes "Open" as soon as the door moves up far enough for the door mounted magnet to lose its control over the relay.

I just use a tilt sensor on the garage door and it works fine.

1 Like

I first did mine with a Zen 16 but switched it out for a Zen 58 as I have a single door. Works well for my use case.

1 Like

My garage door top panel is the last thing to close at the end of travel.
The bottom panel can be essentially closed with a significant gap still open at the top.

This is only with a multi-panel garage door.

1 Like

Got it. You are mounting the pickup magnet at the top of the door and the sensor at the position where the top of the door is at its closed position. That would work just as well at giving an empirically closed state and also keep the sensor out of the elements. You can also use the same pickup to trigger two sensors: one for open and one for closed.

I have Liftmaster openers as well. As long as the switch closure is less than 500-700 mSec the wall panel will not reset. So I made up a trivial Arduino board and relay that after power up it delays 500 msec then closes the relay for 300msec then opens it. That's all it does. This way the wall panel clock is not constantly resetting.

It would be nice if some of the dry contact guys did <1 second closures....