HCPBridge Documentation GitHub

Configuration reference

All settings are made in the web interface and stored in the ESP32's flash (NVS). This page lists every field with its key, default and effect.

How settings are stored

Basic configuration

FieldKeyDefaultDescription
Enable Wi-Fi access pointwifi_ap_enabledonRuns the hotspot in parallel to the Wi-Fi client. SSID = hostname, channel 1, max. 4 clients, IP 192.168.4.1.
Wi-Fi SSIDwifi_ssidemptyNetwork to join. Empty = no client connection (hotspot only).
Wi-Fi passwordwifi_passemptyPrintable ASCII only.
Access point passwordwifi_ap_passgifford47Hotspot password. Shorter than 8 characters → the default is used.
Connect to strongest APwifi_best_aponScans all channels and joins the access point with the best signal. Turn off on single-AP networks for a slightly faster (but signal-agnostic) connect.
HostnamehostnameHCPBRIDGEWi-Fi hostname and hotspot SSID.
MQTT servermqtt_server192.168.1.100Broker host name or IP.
MQTT portmqtt_port1883Plain MQTT (no TLS).
MQTT usermqtt_usermqtt
MQTT passwordmqtt_passpassword
Device IDdevice_idhcpbridgeTopic prefix hormann/<device_id>/ and part of all Home Assistant unique IDs. Max. 14 characters; must be unique per bridge.
Device namedevice_nameGarage DoorHome Assistant device name and name of the cover entity; also used as the device identifier, so use a different name per bridge. Shown as page title in the web interface.
Enable serial debugdebug_enabledoffLog output on the USB serial port at 9600 baud.
Web passwordwww_passemptyEmpty = no login. Otherwise HTTP basic auth with user admin.
MQTT server, user, password and the hostname are held in 64-byte buffers – keep them below 64 characters.

Sensor configuration

Sensor selection

All sensors are off by default.

FieldKeySensor
Temperature / humidity / pressuresen_bme_enBME280 (I²C, address 0x76 or 0x77)
Temperaturesen_ds18_enDS18X20 (OneWire, first sensor on the bus)
Temperature / humiditysen_dht_enDHT22
Distance / parking spacesen_sr04_enHC-SR04 ultrasonic
Motionsen_sr501_enHC-SR501 PIR
Gassen_mq4_enMQ4 methane / natural gas

Pin definition

Defaults depend on the firmware environment. 0 means "not set".

FieldKeyesp32 / v1 / M5Stack*HCP v2HCP v3
I2C SDAsen_i2c_sda212121
I2C SCLsen_i2c_scl223333
DHT datasen_dhtdatapin272726
DS18X20sen_ds18x20pin444
SR04 triggersen_sr04trigpin555
SR04 echosen_sr04echopin184827
SR501sen_sr501pin343432
MQ4 analogsen_mq4analog03635
MQ4 digitalsen_mq4digital01515

* m5stack-atom-lite uses SDA 25 / SCL 21.

Sensor adjustments

FieldKeyDefaultDescription
Sensor query intervalsen_StInterval120 sHow often all sensors except the motion sensor are read (the PIR is checked every 500 ms).
Temperature thresholdsen_temp_thresh0.5 °CMinimum change before a new value is published.
Humidity thresholdsen_hum_thresh1 %Whole numbers.
Pressure thresholdsen_pres_thresh1 mbarWhole numbers.
Proximity thresholdsen_prox_thresh10 cmDistance change that triggers a publish, and the margin of the parking detection.
Gas thresholdsen_gas_thresh50Change of the raw analog value before publishing.
SR04 max. distancesen_sr04maxdist150 cmExpected range; readings above twice this value are treated as invalid.

Regardless of the thresholds, all sensor values are re-published at least every 2 hours. Details: Sensors.

I/O configuration

All four channels are disabled by default. See Digital inputs & outputs for wiring.

Inputs (In1 = io_in1_*, In2 = io_in2_*)

FieldKeyDefaultDescription
Enable Inputio_in1_enoffActivates the channel and its binary_sensor.
Nameio_in1_nameInput 1Entity name in Home Assistant.
GPIOio_in1_pin12 / 14 on HCP v2/v3, otherwise 00 = not configured.
Pull resistorio_in1_pull0 – none0 none (external, correct for the HCP PCBs), 1 internal pull-up, 2 internal pull-down.
Active lowio_in1_invoffInverts the input.
Local actionio_in1_act0 – none0 none, 1 impulse/toggle door, 2 open, 3 close, 4 stop, 5 toggle light, 6 vent, 7 half, 8 toggle Out1, 9 toggle Out2.

Outputs (Out1 = io_out1_*, Out2 = io_out2_*)

FieldKeyDefaultDescription
Enable Outputio_out1_enoffActivates the channel and its switch.
Nameio_out1_nameOutput 1Entity name in Home Assistant.
GPIOio_out1_pinOut1: 37 (v2) / 25 (v3) · Out2: 35 (v2) / 22 (v3) · otherwise 00 = not configured.
Active lowio_out1_invoffInverts the GPIO level.
Restore after rebootio_out1_rstoffOn = the last state is stored and restored at boot. Off = always off after a restart.

Expert configuration

FieldKeyDefaultDescription
RS485 TXDrs485_txd17 (esp32, v1, v2) · 19 (v3) · 13 (StampS3) · 22 (Atom Lite)UART pins of the RS485 converter (57600 baud, 8E1).
RS485 RXDrs485_rxd16 (esp32, v1) · 18 (v2, v3) · 15 (StampS3) · 19 (Atom Lite)

Entity names

Names of the Home Assistant entities created by discovery. Changing a name only changes the display name; the unique ID stays the same.

FieldKeyDefault
Debug stringgd_debug_stringDebug
Restart reasongd_dg_rst_reasRestart Reason
Temperaturesensor_tempTemperature
Humiditysensor_humidityHumidity
Pressuresensor_atmpressAmbient pressure
Free distancesensor_freedistFree distance
Park availabilitysen_park_availPark available
Motionsen_motionMotion
Gas levelsensor_gasGas Level
Gas alarmsen_gas_alarmGas Alarm

Compile-time options

A few values are not configurable at runtime and are set in src/configuration.h before building:

ConstantDefaultMeaning
OTA_USERNAME / OTA_PASSWDadmin / adminLogin of the OTA update page /update.
WWW_USERadminUser name for the web password.
GD_LIGHT, GD_VENT, GD_HALF, GD_TOGGLE, GD_STATUS, GD_DET_STATUS, GD_POSITIOM, GD_AVAILLight, Vent, Half Open, Toggle, Status, Detailed Status, Position, AvailableNames of the remaining Home Assistant entities.
READ_DELAY2000 msInterval of the MQTT task that publishes door state changes.
AlignToOpenHabnot definedUncomment to use openHAB-style cover states (UP/DOWN/STOP) and the position as cover value.
IO_DEBOUNCE_MS / IO_POLL_INTERVAL_MS50 ms / 20 msDebounce and polling of the digital inputs.
HA_VERSIONcurrent versionFirmware version shown in the UI, in Home Assistant and in the release file name.

All other values in configuration.h (Wi-Fi, MQTT, pins, thresholds) are only the first-boot defaults of the settings above.

Resetting the configuration