| HAPCTL(8) | System Manager's Manual | HAPCTL(8) |
NAME
hapctl — control
utility for openhapd
SYNOPSIS
hapctl |
[-c file]
command |
DESCRIPTION
hapctl is a command-line utility for
managing and querying the
openhapd(8) daemon. It provides
commands for configuration validation, daemon status checks, and device
management.
The options are as follows:
-cfile- Specify the configuration file. The default is /etc/openhapd.conf.
The following commands are available:
check- Validate the configuration file syntax. Parses openhapd.conf(5) and reports any syntax errors or invalid values. Exits with status 0 if the configuration is valid, non-zero otherwise. Also displays the number of configured devices.
status- Display the status of the openhapd(8) daemon and pairing information. Shows whether the daemon is running, its process ID, and the current pairing state (paired, unpaired, or unknown). For paired accessories, displays the number of paired HomeKit controllers.
devices- List all devices configured in
openhapd.conf(5). For each
device, displays:
- Device name as it appears in HomeKit
- Device type and subtype
- MQTT topic prefix
- Internal device identifier
help- Display usage information.
FILES
- /etc/openhapd.conf
- Default configuration file.
- /var/run/openhapd.pid
- Process ID of the running daemon.
- /var/db/openhapd/pairings
- Pairing database used for status checks.
EXIT STATUS
The hapctl utility exits 0 on
success, and >0 if an error occurs. Commands exit with status 0 on
success.
The check command exits with non-zero
status if configuration errors are found.
The status and
devices commands exit with status 0 regardless of
daemon state.
EXAMPLES
Validate the configuration file:
$ hapctl check Configuration file /etc/openhapd.conf is valid Configured devices: 3
Check daemon status:
$ hapctl status openhapd is running (PID 12345) Pairing status: paired (2 controllers)
List configured devices:
$ hapctl devices
Configured devices: 2
Bedroom Thermostat
Type: tasmota/thermostat
Topic: tasmota_AABBCC
ID: bedroom
Living Room Thermostat
Type: tasmota/thermostat
Topic: tasmota_DDEEFF
ID: living_room
Use an alternate configuration file:
$ hapctl -c /etc/openhapd.test.conf check
DIAGNOSTICS
Configuration errors are reported to stderr with descriptive messages.
If openhapd(8) is not
running, status will report:
openhapd is not running
If the pairing database cannot be read,
status will report:
Pairing status: unknown (cannot read storage)
SEE ALSO
HISTORY
The hapctl utility first appeared with
openhapd(8) in 2025.
AUTHORS
Dick Olsson <hi@senzilla.io>
CAVEATS
hapctl reads the pairing database directly
to determine pairing status. This requires read access to
/var/db/openhapd/. When run as a non-root user,
pairing status may be reported as “unknown”.
| December 26, 2025 | OpenBSD |