OpenHAP::HAP(3p) Perl Library Manual OpenHAP::HAP(3p)

OpenHAP::HAP - Main HAP server

    use OpenHAP::HAP;
    my $server = OpenHAP::HAP->new(
        port => 51827,
        pin => '123-45-678',
        name => 'My Bridge',
    );
    $server->add_accessory($accessory);
    $server->run();

This module implements the main HAP server with HTTP endpoints, pairing, and accessory management.

Characteristic changes - whether written over HTTP or reported by a device - are delivered to subscribed connections as EVENT/1.0 notifications, coalesced over a 250 ms window except for the immediate-delivery characteristic types (see spec/HAP-HTTP.md section 14). The connection whose request caused a change never receives an event for its own write, and a connection's subscriptions end when it closes.

spec/HAP.md, spec/HAP-HTTP.md

2026-07-27 OpenBSD