Cover Image

Homebridge garage door

13 August 2025 - Reading time: 2 minutes

I have an Hoermann garage door (Promatic 4), and I needed to integrate in my HomeKit, via Homebridge.
Looking for possible solutions I have discovered this nice project on Github: HCPBridgeMqtt
Built a custom PCB, programmed the firmware on the ESP32 and everything is neat. Except a few issues that I have corrected modifying the original code. In a nutshell, an extra "door_state" topic that would make the mqttThing Homebridge plugin happier and retain on the published topic so the garage door status will be accurate when the Homebridge restarts.

The MqttThing config is:

{
    "type": "garageDoorOpener",
    "name": "Garage Door",
    "accessory": "mqttthing",
    "username": "homebridge",
    "password": "secretpass",
    "topics": {
        "getOnline": "hormann/hcpbridge/availability",
        "getCurrentDoorState": "hormann/hcpbridge/door_status",
        "getTargetDoorState": "hormann/hcpbridge/door_status",
        "setTargetDoorState": "hormann/hcpbridge/command/door"
    },
    "onlineValue": "online",
    "offlineValue": "offline",
    "doorCurrentValues": [
        "open",
        "closed",
        "opening",
        "closing",
        "stopped"
    ],
    "doorTargetValues": [
        "open",
        "close"
    ],
    "doorValues": [
        "open",
        "closed",
        "opening",
        "closing",
        "stopped"
    ],
    "manufacturer": "Hormann",
    "model": "Promatic 4",
    "serialNumber": "123-45667889",
    "firmwareRevision": "1.0"
}

I then added a second button on my Homebridge for the venting position. As the air is stale after a while in the garage I have added a special button for the venting position as HomeKit does not implements a partial open action.
So I have added a button that would set the door on venting:

{
    "type": "switch",
    "name": "Garage Vent",
    "accessory": "mqttthing",
    "username": "homebridge",
    "password": "secretpass",
    "topics": {
        "setOn": "hormann/hcpbridge/command/door",
        "getOn": {
            "topic": "hormann/hcpbridge/state",
            "apply": "try { var msg = (typeof message === 'string') ? message : message.toString(); var j = JSON.parse(msg); return j.vent; } catch(e) { return ''; }"
        }
    },
    "integerValue": false,
    "onValue": "venting",
    "offValue": "close"
}

About

I’m Cristi, a technical problem solver with a focus on embedded electronics, IoT, home automation and automotive tech.
This blog is my personal notebook for documenting what works, what doesn’t, and why — shared in case it helps someone else along the way.