How Konnected re-wrote ratgdo to secure the future of the open garage door

It was just over a year ago when I first heard about ratgdo. At the time we had been a few months into the launch of our first Konnected garage door opener product that used a relay to trigger the garage door. For customers who had newer Security+2.0 openers, we were referring them to these garadget adapters (really just cheap wired wall buttons with wires soldered on) so that their garage openers would work with our device. It wasn’t beautiful, but it worked.

Around this time, the internet was up in arms about myQ’s decision to proactively prohibit 3rd-party integrations with their wildly popular myQ service that was now built-in to many Chamberlain and LiftMaster brand garage openers. DIY smart home enthusiasts and commercial home technology integrators alike were blindsided by myQ’s move, and were left stranded with their garage door no longer under control by their favorite smart home apps.

Ratgdo seemed to arrive on the scene with impeccable timing. Paul Wieland, ratgdo’s creator, got so frustrated with it that he spent the time to reverse-engineer the wireline protocol used by the digital wall buttons to talk to Security+ enabled garage openers, and was able to control and monitor the garage door opener by emulating its native serial protocol!

After I dug into the code and learned how it worked, I knew we had to incorporate this into our product! Paul’s ratgdo board uses an ESP8266 microcontroller, which we’re very familiar with here at Konnected. However, our newer products use the more powerful ESP32 (and in our new GDOs, the ESP32-S3) which adds some nice capabilities over the ESP8266 including Bluetooth/BLE, hardware UART, and the ability to run ESP-IDF, a foundational framework for the ESP32 that enables a host of software features for security and encryption.


While we started designing what ultimately would be named the Konnected GDO blaQ, we set out to adapt ratgdo’s open-source code to run on our preferred ESP32-S3 chip under running on the ESP-IDF framework. To do this, we needed to break the dependency on Arduino, and utilize the ESP32’s hardware UART (instead relying on the SoftwareSerial arduino library). We also aimed to decouple the Security+ wireline commands from the garage door control logic. The result: gdolib. Our open-source adaptation of ratgdo, packaged as a portable library for ESP32 devices running ESP-IDF.

The purpose of extracting gdolib to a portable library was so that we can incorporate it into a couple different firmware platforms that we’re working on for the GDO blaQ – one built on ESPHome and the other built on esp-Matter.

gdolib has some design differences from ratgdo, which of course we think are improvements:

  1. Event-driven instead of polling. This library uses an event-driven architecture to receive data from the garage door unit, instead of polling for updates. This results in a measurably faster response time to state changes.
  2. Two wires instead of three. The obstruction sensor state can now be read via the serial protocol, therefore it doesn’t need to be wired separately to a GPIO. This makes installation simpler, only requiring the red and white wire to the wall button inputs on the garage opener.
  3. Supports a pre-closing warning. To comply with U.S. 16 CFR 1211.14(f) and be able to meet UL 325 standards.
  4. Automatic detection of Security+ vs Security+ 2.0. Less for the end-user to think about.
  5. Removes dry contact trigger support. We feel that this is better handled separately, and this library should focus on the Security+ interaction only.
  6. Removes relay outputs. Again, simplifying the library to do Security+ only.

Safety & Compliance

GDO warning label

Something that I thought was really important, but missing from ratgdo, was compliance with consumer product safety regulations for automated garage door control accessories. The feds don’t want your kids to be crushed by an unexpectedly moving door, and U.S. regulations require an audible and visual warning before the garage door is about to move, along with some specific warnings and installation instructions. In designing a true consumer-ready device, I thought this was really important, and we made sure that gdolib and our resulting firmware applications and product design take these safety requirements seriously and implement them in earnest.

Local and Cloud Optional – not just for Home Assistant

The GDO blaQ has been shipping now for half a year running gdolib and our default firmware built with ESPHome using our secplus_gdo component (also heavily inspired by esphome-ratgdo). This makes it a plug-and-play option for Home Assistant users, with ESPHome supported natively. But in addition to the Home Assistant community, we’ve built and/or supported integrations leveraging ESPHome with SmartThings and Alexa (via our optional Konnected Cloud platform), Hubitat, Homebridge, Control4, Savant, Josh.ai and Crestron. Hoping to add more to that list in 2025!

Matter is Coming

We now have an experimental Matter firmware for the GDO blaQ! Matter is an emerging smart home standard that promises local control, simplicity, and interoperability between a variety of devices and smart home controllers. What a lot of consumer users really want is local support in Apple Home, Google Home and Amazon’s Alexa, and Matter appears to be the silver bullet that will accomplish all of that.

We’re not quite there yet though, as the Matter standard is slow to develop and get adopted. There isn’t even a Matter device type specification designed for garage openers yet, so we have a workaround using a window covering device type instead. It’s not super elegant, but it works, and it gets us experience building on the esp-matter framework.

We’re gonna be working a lot more on the Matter piece in 2025, and I think that might be the year were we see some real traction on the Matter ecosystem.

Keeping the Garage Open

I’ve built my career, and this company, by using open-source software, and I make it a point to contribute back when I can. All of Konnected’s software and firmware for our current garage door opener products is open-source and published on GitHub! We’ve made a number of contributions to the ESPHome project, being sure to share our improvements to the framework back to the community. We’re grateful for the work of all the people who have created and contributed to ratgdo, esphome, ESP-IDF and so many other software libraries, and in the spirit of open-source we’ve contributed everything back*

*Our Matter firmware built on esp-matter will be open-sourced soon, after a bit more testing.

And yes, Paul and I have been in touch and we’re cool :grin:

Try the GDO blaQ

Konnected’s GDO blaQ packs all of the capabilities of ratgdo, plus all of our enhancements and improvements, into a compact ABS plastic enclosure with built in LED and sounder for safety, pre-loaded with firmware ready to plug into your Security+ garage opener and start automating in minutes! It retails for USD $89 and is currently 25% off for Black Friday!

Also, huge thanks to @Ryan_P who did all the heavy lifting here with the gdolib library and device firmwares. He’s really a genious at this stuff! Thank you Ryan! :clap: :clap: :clap:

5 Likes

You mentioned a Crestron integration in the article but I have not been able to find it on your site. Can you direct me? Thanks.

@Ddetton here’s the Crestron driver: GitHub - jbasen/Konnected_GDO_blaQ

It was developed by an independent contributor (Jay) and is brand new. Let us know how it goes!