| OPENHAPD.CONF(5) | File Formats Manual | OPENHAPD.CONF(5) |
NAME
openhapd.conf —
OpenHAP daemon configuration file
DESCRIPTION
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.
GLOBAL OPTIONS
The following global options are available:
hap_namestring- The name of the HomeKit bridge as it appears in the iOS Home app. Default: “OpenHAP Bridge”.
hap_portnumber- TCP port for the HAP server. Default: 51827.
hap_pinXXXX-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.
hap_modelstring- Model name reported to HomeKit. Default: “OpenHAP”.
hap_manufacturerstring- Manufacturer name reported to HomeKit. Default: “OpenBSD”.
db_pathpath- Directory for storing pairing database and cryptographic keys. Default: /var/db/openhapd.
log_levellevel- Logging verbosity level. Valid values:
debug,info,notice,warning,err,crit,alert,emerg. Default:info. log_facilityfacility- Syslog facility for log messages. Valid values:
daemon,local0–local7,user. Default:daemon. mqtt_hosthostname- Hostname or IP address of the MQTT broker. Default: 127.0.0.1.
mqtt_portnumber- TCP port of the MQTT broker. Default: 1883.
mqtt_userusername- Username for MQTT authentication. Optional.
mqtt_passpassword- Password for MQTT authentication. Optional.
DEVICE BLOCKS
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
tasmotais 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.
name- Display name shown in the iOS Home app. Required.
topic- 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:
Thermostat Options
Tasmota thermostat devices support the following options:
current_temp_topictopic- MQTT topic for current temperature readings. Default: topic/SENSOR.
target_temp_topictopic- MQTT topic for target temperature. Default: topic/TARGET.
state_topictopic- MQTT topic for heater state (on/off). Default: topic/STATE.
min_tempcelsius- Minimum temperature in Celsius. Default: 10.0.
max_tempcelsius- Maximum temperature in Celsius. Default: 30.0.
temp_stepcelsius- Temperature adjustment step size. Default: 0.5.
FILES
- /etc/openhapd.conf
- Default configuration file location.
- /etc/examples/openhapd.conf
- Example configuration file installed by
make install.
EXAMPLES
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
}
SEE ALSO
syslog.conf(5), hapctl(8), mdnsd(8), mosquitto(8), openhapd(8)
STANDARDS
The MQTT topic structure follows the Tasmota firmware conventions. See https://tasmota.github.io/docs/MQTT/ for details on Tasmota MQTT topics.
HISTORY
The openhapd.conf file format first
appeared with openhapd(8) in
2025.
AUTHORS
Dick Olsson <hi@senzilla.io>
CAVEATS
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 |