I am a big fan of HomeKit and Apple’s effort to have one central app to control smart home devices. While it has its flaws and limitations, the main value for my household is simply that all of my smart home accessories are centralized in Apple’s Home app. I don’t need to install anything on family members’ phones, and it minimizes tech support from me.

The one thing that was not natively available through HomeKit was my garage door opener. I used meross with HomeKit for a few months, but I was having reliability issues with flaky wifi, and it required using a door sensor, which was also unreliable when wind would move the gate just enough to trip the sensor. A better option would have been ratgdo, but I really wanted a wired network connection. That’s when I settled on the LiftMaster 828LM internet gateway.

For a while, I was content using the 828LM with the homebridge-myq plugin, but it has since been deprecated due to myQ locking down its API. The iOS myQ app is really just a canvas to shove ads into, including abusing notifications to send promos! On top of that, it’s painfully slow to load.

828LM Internet Gateway

The 828LM connects to the internet over ethernet and acts as an RF bridge to compatible garage door and gate operators. It adds internet connectivity to compatible myQ openers and accessories that lack wifi or are outside wifi coverage.

In the US, the Security+ 2.0 generation of openers uses 310, 315, or 390 MHz for handheld remotes and compatible in-car HomeLink systems. Standard remotes are fire and forget: they send a command without getting status back from the opener.

Compatible myQ openers also have a separate, bidirectional radio link in the 902–928 MHz band, which is what the 828LM uses to send commands and receive status updates from the opener.

The 828LM device.

LiftMaster 828LM Internet Gateway

828LM internals

The gateway’s main ICs:

  • MCU: Microchip PIC18F67J60 with 128 KiB of program flash and 3,808 bytes of RAM
  • Radio: Silicon Labs Si4432 for myQ comms in the 900 MHz band
  • EEPROM: Microchip 25AA320A (4 KiB) for storing device specific state, like paired openers and the gateway ID
  • Flash storage: Microchip SST25VF040B (512 KiB) for staging OTA firmware updates (located on the back of the board)
The 828LM board.

Board with visible chips: center PIC18F67J60 MCU, left center EEPROM, and left Si4432 radio

Reverse engineering

Before opening the device, I ran a port scan, but that did not yield anything useful. Capturing TCP traffic was slightly more helpful, as the TLS handshake revealed that the device used TLS 1.2 with a preshared key.

The next step was figuring out where the PSK lived on the device. In addition to dumping the MCU firmware, which I get into below, I also dumped both the EEPROM and flash storage chips using a SOIC-8 chip clip and the Flipper Zero app I made for this project. Both dumps were useful in understanding how the device worked, but neither contained the PSK.

Dumping the firmware

To gain access to the MCU, I traced the board’s J2 header pins to the legs of the chip to identify the programming connections, then soldered in pin headers for connecting jumper wires to the programmer.

J2 pinPIC18F67J60 pin
3MCLR
4PGC
5GND
6PGD

Microchip’s PICkit 5 is the official programmer, but I didn’t want to spend any money on new hardware, so instead I spent orders of magnitude more on tokens to build a Flipper Zero app (called a fap, ha) that can read and write the PIC18F67J60, using the programming specification as a reference.

828LM connected to the Flipper Zero's GPIO

J2 header pins connected to the Flipper’s GPIO

After getting the fap to work, dumping the firmware was easier than expected. I was expecting to get a dump full of 0s due to the chip’s code protection, but the firmware was successfully dumped intact.

Failed C code reconstruction

My initial goal was to decompile and reverse engineer the firmware so that I could enable LAN access directly, eliminate the need for myQ’s cloud service, never have to see another myQ ad, and keep my data private. Reverse engineering binary dumps is way easier now with LLMs, but this 8-bit MCU with a Harvard architecture proved to be especially tricky.

The plan was to rewrite the network stack to interface with my own server and keep the RF stack and behavior identical to the stock firmware. I was able to get a basic HTTP server up and running, but the RF stack turned out to be a dead end, mostly due to my complete lack of expertise with RF, which made me a blind guide for Opus 4.8 (the best model at the time).

After several attempts at reconstructing the C code, I eventually changed the strategy to leave the firmware as is and instead write my own MQTT service to talk to the 828LM. The device uses TLS with a pre-shared key, which is baked into the firmware. The previous work with trying to reconstruct source code uncovered the PSK, letting me decrypt and inspect the traffic and giving me a path forward to building a minimal MQTT server and bypassing the cloud service altogether.

Homebridge plugin

With the goal of HomeKit compatibility, I went down the path of building a Homebridge plugin. The plugin serves as the minimal MQTT server for the 828LM, translates HomeKit commands into gateway commands, and reports state changes back to HomeKit.

What I used:

  • 828LM stock firmware
  • PSK extracted from the binary dump
  • Local DNS override via pi-hole for the 828LM’s cloud hostname (connect-0.cloud.myqdevice.com) to resolve to my Homebridge server on my LAN

MQTT service

The gateway uses MQTT 3.1.1 over TLS 1.2 on port 8883. The plugin implements the server behavior the gateway expects, including connection acknowledgment, subscriptions, keepalives, and the application messages carried in MQTT publications.

The gateway initiates its usual connection, but reaches out to my local Homebridge server instead of the cloud service.

To reverse engineer the 828LM MQTT protocol, I built a quick and dirty debug panel so I can see the messages passed back and forth between the plugin and the 828LM gateway. It was invaluable to have an explainer for the binary payloads as I learned more about the protocol. The ratgdo project was my primary reference for much of the payload decoding. The wired and RF protocols share enough Security+ 2.0 concepts and payload structure for it to be valuable.

Homebridge plugin debug panel.

Debug panel in Codex green showing traffic between the plugin and the gateway. Identifiers replaced for privacy.

Commands to the gateway use topics under G/{gateway_id}/…; reports from it use S/01/{gateway_id}/…. For example:

PurposeTopicPayload
Query paired operatorsG/{gateway_id}/013/0008Empty
Return paired operatorsS/01/{gateway_id}/014/0008Consecutive six-byte operator IDs
Send a commandG/{gateway_id}/011/0000Operator ID followed by command bytes
Report opener statusS/01/{gateway_id}/011/0000Operator ID followed by status bytes

Other observations

The PIC18F MCU is cheap and limited in capabilities. The application payloads use compact binary data instead of JSON, which is quite elegant at the expense of human readability.

All of the myQ enabled openers I experimented with broadcast a heartbeat over RF every 5 minutes. The status report includes a 3-byte status field: door state, light state, obstruction sensor state, remote lockout state, and learn mode state. This helps keep the door state current in the Home app in case an initial open/close message gets missed.

Since all network calls are done locally on my network, the plugin feels much faster than the original homebridge-myq plugin, which is expected since it was based on myQ’s APIs, so every call would need to make a few hops to the cloud and back again. Tapping open/close on my garage door in the Home app feels instant (1-2 seconds), not quite as fast as using the garage door remote, but pretty darn close.

Plugin current state

The plugin is currently working as intended and seems stable after about 3 months of continuous use. All HomeKit automations, notifications, and actions work as expected.

Remaining items needed before publishing the plugin to make it standalone and feature complete:

  • Add learn mode in the config panel to add new doors/gates to the 828LM gateway
  • Ability to remove paired doors from the 828LM gateway in config panel
  • Add garage door light control and surface it as a HomeKit accessory

Future work

It would be awesome to have standalone HomeKit support directly on the 828LM, but the MCU’s limited RAM and program storage, along with the lack of dedicated crypto support, would make that a difficult if not impossible fit. Realistically, a custom board with a more capable MCU would probably be necessary. A nice hardware project for another time.