Controlling Rolling Code Garage Doors with Home Assistant

MyQ really needs local control.

Controlling Rolling Code Garage Doors with Home Assistant

MyQ sucks.

Our internet went out, and I was stuck outside, yet again, trying to get the garages to open. I recently figured out how to open the garages with an RF transmitter, so it was time to integrate them into Home Assistant.

I did try to reverse-engineer the MyQ internet gateway, but it uses MQTT over TLS, and it's surprisingly hardened for production, unlike most other IoT devices. I wasn't able to locally emulate Chamberlain's servers...

I started by installing the MQTT broker add-on inside of Home Assistant and set up a new user for this application.


I wrote a basic Node app that connects to an Arduino running a Serial-Manchester converter, linked below. It connects to two Home Assistant MQTT buttons that send commands to trigger the 'remote.'

GitHub - acvigue/gdo-server: Integrate Security+ 2.0 garage doors w/ MQTT
Integrate Security+ 2.0 garage doors w/ MQTT. Contribute to acvigue/gdo-server development by creating an account on GitHub.

Example Home Assistant configuration with MQTT buttons & template covers

button:
  - platform: mqtt
    command_topic: "secplus/garage/1/trigger"
    name: "Big Garage"
  - platform: mqtt
    command_topic: "secplus/garage/2/trigger"
    name: "Small Garage"

cover:
  - platform: template
    covers:
      big_garage:
        device_class: garage
        friendly_name: "Big Garage Door"
        value_template: "{{ states('binary_sensor.big_garage_contact_sensor') == 'on' }}"
        availability_template: "{{ states('sensor.secplus_bridge_availibility') == 'online' }}"
        open_cover:
          - condition: state
            entity_id: binary_sensor.big_garage_contact_sensor
            state: "off"
          - service: button.press
            target:
              entity_id: button.big_garage
        close_cover:
          - condition: state
            entity_id: binary_sensor.big_garage_contact_sensor
            state: "on"
          - service: button.press
            target:
              entity_id: button.big_garage
  - platform: template
    covers:
      small_garage:
        device_class: garage
        friendly_name: "Small Garage Door"
        value_template: "{{ states('binary_sensor.small_garage_contact_sensor') == 'on' }}"
        availability_template: "{{ states('sensor.secplus_bridge_availibility') == 'online' }}"
        open_cover:
          - condition: state
            entity_id: binary_sensor.small_garage_contact_sensor
            state: "off"
          - service: button.press
            target:
              entity_id: button.small_garage
        close_cover:
          - condition: state
            entity_id: binary_sensor.small_garage_contact_sensor
            state: "on"
          - service: button.press
            target:
              entity_id: button.small_garage