OPENHAPD.CONF(5) File Formats Manual OPENHAPD.CONF(5)

openhapd.confOpenHAP daemon configuration file

openhapd.conf is the configuration file for the openhapd(8) daemon. The file uses a simple key-value format with device blocks for defining HomeKit accessories.

Lines beginning with ‘#’ are comments and are ignored.

The following global options are available:

string
The name of the HomeKit bridge as it appears in the iOS Home app. Default: “OpenHAP Bridge”.
number
TCP port for the HAP server. Default: 51827.
XXXX-XXXX
The 8-digit setup code used for pairing. Format: XXXX-XXXX where X is a digit 0-9. Dashes are for readability only and are stripped during processing. The PIN is validated as an 8-digit number. The PIN is validated as an 8-digit number. Certain values are invalid per the HAP specification (after stripping dashes): 00000000, 11111111, 22222222, 33333333, 44444444, 55555555, 66666666, 77777777, 88888888, 99999999, 12345678, 87654321. Default: 1995-1018.
string
Model name reported to HomeKit. Default: “OpenHAP”.
string
Manufacturer name reported to HomeKit. Default: “OpenBSD”.
path
Directory for storing pairing database and cryptographic keys. Default: /var/db/openhapd.
level
Logging verbosity level. Valid values: debug, info, notice, warning, err, crit, alert, emerg. Default: info.
facility
Syslog facility for log messages. Valid values: daemon, local0local7, user. Default: daemon.
hostname
Hostname or IP address of the MQTT broker. Default: 127.0.0.1.
number
TCP port of the MQTT broker. Default: 1883.
username
Username for MQTT authentication. Optional.
password
Password for MQTT authentication. Optional.

Devices are defined using the following syntax:

device <type> <subtype> <id> {
    name = "<display name>"
    topic = "<mqtt topic>"
    [additional options...]
}

The parameters are:

type
Device driver type. Currently only tasmota is supported.
subtype
Device subtype. For tasmota, valid values are: thermostat, heater, sensor.
id
Unique identifier for the device within the configuration. Used for internal reference.
Display name shown in the iOS Home app. Required.
MQTT topic prefix for the device. For Tasmota devices, this is the topic configured in the device's MQTT settings (default: “tasmota_%06X” where %06X is the last 6 hex digits of the MAC address). Required.

Additional options depend on the device subtype:

Tasmota thermostat devices support the following options:

topic
MQTT topic for current temperature readings. Default: topic/SENSOR.
topic
MQTT topic for target temperature. Default: topic/TARGET.
topic
MQTT topic for heater state (on/off). Default: topic/STATE.
celsius
Minimum temperature in Celsius. Default: 10.0.
celsius
Maximum temperature in Celsius. Default: 30.0.
celsius
Temperature adjustment step size. Default: 0.5.

/etc/openhapd.conf
Default configuration file location.
/etc/examples/openhapd.conf
Example configuration file installed by make install.

Minimal configuration with a single thermostat:

hap_name = "Home Bridge"
hap_pin = 9876-5432

mqtt_host = 192.168.1.10

device tasmota thermostat bedroom {
    name = "Bedroom Thermostat"
    topic = tasmota_AABBCC
}

Multiple devices with custom MQTT settings:

hap_name = "OpenHAP"
hap_port = 51827
hap_pin = 1112-2333

mqtt_host = mqtt.local
mqtt_port = 1883
mqtt_user = homekit
mqtt_pass = secretpassword

log_level = debug
log_facility = local0

device tasmota thermostat bedroom {
    name = "Bedroom"
    topic = tasmota_AABBCC
    min_temp = 15.0
    max_temp = 25.0
}

device tasmota thermostat living_room {
    name = "Living Room"
    topic = tasmota_DDEEFF
}

device tasmota thermostat kitchen {
    name = "Kitchen"
    topic = tasmota_112233
}

syslog.conf(5), hapctl(8), mdnsd(8), mosquitto(8), openhapd(8)

The MQTT topic structure follows the Tasmota firmware conventions. See https://tasmota.github.io/docs/MQTT/ for details on Tasmota MQTT topics.

The openhapd.conf file format first appeared with openhapd(8) in 2025.

Dick Olsson <hi@senzilla.io>

The hap_pin is stored in plain text in the configuration file. Ensure appropriate file permissions (mode 0600, owned by root).

Changing the hap_name or hap_pin after pairing may require re-pairing all controllers.

MQTT passwords are stored in plain text. Consider using certificate-based authentication for production deployments.

December 26, 2025 OpenBSD