HCPBridge Documentation GitHub

Getting started

From unboxing (or soldering) to a garage door in Home Assistant in about 15 minutes.

Overview

  1. Get the hardwareA prebuilt HCP PCB, or an ESP32 + RS485 converter + step-down converter.
  2. Flash the firmwareAlready done on prebuilt PCBs – otherwise with PlatformIO.
  3. First setupJoin the HCPBRIDGE hotspot, enter Wi-Fi and MQTT in the web interface.
  4. Connect to the operator and run a bus scanPlug the RJ12 cable into the operator's bus socket and register the bridge.
  5. Use itControl the door in the browser, via MQTT or in Home Assistant.

1. Hardware

Option A – prebuilt HCP PCB

The prebuilt boards (see the order thread) come with the firmware installed and plug straight into the operator with an RJ12 cable. You need:

Board variants and the matching firmware:

BoardFirmware environmentNotes
HCP PCB v1HCP_Giffordv1Classic ESP32
HCP PCB v2HCP_Giffordv2ESP32-S3 with PSRAM
HCP PCB v3.xHCP_Giffordv3Classic ESP32, In1/In2/Out1/Out2 terminals
HCP miniHCP_Giffordv3Same firmware, but no In/Out terminals

Option B – build it yourself

RJ12 pin-out of the Hörmann bus socket:

RJ12 pinSignalConnect to
1GNDGND of converter and step-down
2GNDGND
3B −RS485 converter B
4A +RS485 converter A
5+24 Vstep-down converter input
6+24 Vstep-down converter input
Wiring of ESP32, RS485 converter and step-down converter to the RJ12 plug
Reference wiring: RJ12 → 120 Ω across A/B → RS485 converter → ESP32 UART; 24 V → step-down → 5 V.
RJ12 plug with numbered pins
Pin numbering of the RJ12 plug.
Set the step-down converter before connecting the ESP32The bus carries about 24 V. Adjust the converter output to 5 V first – 24 V on the ESP32's 5 V pin destroys it.

Default UART pins (configurable later under Expert Configuration):

EnvironmentRS485 TXDRS485 RXD
esp32, HCP_Giffordv1GPIO17GPIO16
HCP_Giffordv2 (ESP32-S3)GPIO17GPIO18
HCP_Giffordv3GPIO19GPIO18
m5stack-stamps3GPIO13GPIO15
m5stack-atom-liteGPIO22GPIO19
If the bus scan does not find the bridge, swap TX and RX – converter modules label these pins inconsistently.

2. Flash the firmware

Skip this step on a prebuilt PCB – the firmware is already installed. For later updates see Updating.

Build and upload with PlatformIO

  1. Install the toolsInstall Visual Studio Code and the PlatformIO IDE extension.
  2. Get the sourceClone the repository or download it as ZIP from GitHub and open the folder HCPBridgeESP32 in VS Code (PlatformIO → Open Project).
  3. Pick your boardIn the PlatformIO sidebar, open the environment for your board (table below) under Project Tasks.
  4. UploadConnect the ESP32 via USB and run Upload. PlatformIO installs all libraries, builds the web interface and flashes bootloader, partition table and firmware.
EnvironmentBoardBuilt by default
esp32Generic ESP32 (NodeMCU-32S)yes
HCP_Giffordv1HCP PCB v1yes
HCP_Giffordv2HCP PCB v2 (ESP32-S3 + PSRAM)yes
HCP_Giffordv3HCP PCB v3.x / HCP miniyes
m5stack-stamps3M5Stack StampS3no
m5stack-atom-liteM5Stack Atom Liteno

Command line equivalent:

cd HCPBridgeESP32
pio run -e HCP_Giffordv3 -t upload
pio device monitor        # 9600 baud, only prints when serial debug is enabled
No need to edit configuration.hAll settings are made in the web interface and stored on the ESP32. src/configuration.h only provides the defaults for the very first boot (and after a factory reset).

Updating (OTA)

Each release contains one binary per board, named <environment>-v<version>.bin (for example HCP_Giffordv3-v1.1.0.bin).

  1. Downloadthe binary for your board from the latest release.
  2. Open the updaterIn the web interface open System information → OTA Update (or browse to http://<device-ip>/update) and log in with user admin, password admin.
  3. UploadSelect the .bin file. The device restarts automatically; the configuration is kept.
Release binaries contain only the application. Use them for OTA updates; a blank ESP32 has to be flashed once with PlatformIO, which also writes the bootloader and the partition table. Older releases had separate …a / …b binaries – there is only one firmware per board now.

3. First setup

  1. Power the bridgevia USB(-C) or 3.3 V. On the HCP PCBs v2 and v3 the LED lights up during start-up and turns off when the bridge is ready.
  2. Join the hotspotConnect a phone or laptop to the Wi-Fi network HCPBRIDGE, password gifford47.
  3. Open the web interfaceBrowse to http://192.168.4.1. There is no login by default.
  4. Enter Wi-Fi and MQTTOpen Basic Configuration, enter your Wi-Fi SSID/password and your MQTT broker (server, port, user, password). Keep the Device ID at 14 characters or less.
  5. Save & RestartThe bridge restarts and joins your network. Find its IP address in your router (hostname HCPBRIDGE) and open it in the browser.
  6. Secure itOnce the bridge works in your network, untick Enable Wi-Fi access point or set your own access point password, and optionally set a Web password.
The HCPBridge web interface
The web interface after the bus scan, with sensors and I/O enabled.
Hotspot detailsThe hotspot is named after the Hostname and runs in parallel to the normal Wi-Fi connection. An access point password shorter than 8 characters is ignored and the default gifford47 is used instead. The Wi-Fi password must consist of printable ASCII characters (32–126).

4. Connect to the operator and run the bus scan

HCP2 operators only talk to accessories that were registered by a bus scan. Plugging in (or removing) an accessory without a scan leads to error 04 on the operator display.

  1. Disconnect the operator from mains power.
  2. Plug in the bridgeConnect the RJ12 cable to the operator's bus socket (green arrow below).
  3. Power the operator onThe bridge is powered from the bus. It answers the operator immediately after boot – the Modbus handler is started before Wi-Fi.
  4. Start the bus scanas described for your operator below.
  5. CheckThe RS485 LEDs of the bridge blink rapidly and the web interface shows Connected and the door state.
Opened operator with the bus socket and the DIP switch marked
Bus socket (green arrow) and bus-scan DIP switch on the ProMatic (blue arrow).

SupraMatic E / P Series 4

  1. Hold PRG until 00 is shown.
  2. Select menu 37 with the arrow keys and confirm.
  3. Select parameter 01.
  4. Hold P until bS appears, then release. bS blinks while scanning.
  5. The display briefly shows 1 – the bridge has been registered.

Illustrated guide: bus scan (EN) · Bus-Scan (DE).

ProMatic Series 4

Set DIP switch H (no. 8) to ON – the scan starts – and back to OFF.

RollMatic v2

  1. Remove mains power, plug in the RJ12 cable, power on and drive the door completely up or down once.
  2. Hold PRG until 10 is shown, press Down until 37, press PRG once (00).
  3. Press Up once (01), then hold PRG until B.S. is shown. It blinks while scanning.
  4. 1 for a few seconds = registered; 01/00 = not found.
Every configuration change restarts the bridgeSaving a form in the web interface reboots the ESP32. If the operator reports an error afterwards, run the bus scan again. To remove the bridge permanently, power the operator off, unplug the bridge and run another scan (the display briefly shows 0).

5. Next steps