| OpenHAP::Storage(3p) | Perl Library Manual | OpenHAP::Storage(3p) |
NAME
OpenHAP::Storage - Persistent storage for pairing data
SYNOPSIS
use OpenHAP::Storage;
my $storage = OpenHAP::Storage->new(db_path => '/var/db/openhapd');
# Load/save accessory keys
my ($ltsk, $ltpk) = $storage->load_accessory_keys();
$storage->save_accessory_keys($ltsk, $ltpk);
# Manage pairings
my $pairings = $storage->load_pairings();
$storage->save_pairing($controller_id, $ltpk, $permissions);
$storage->remove_pairing($controller_id);
DESCRIPTION
This module handles persistent storage of pairing data, accessory keys, and configuration state, including the failed pairing attempt counter ("get_auth_attempts"/"set_auth_attempts") that must survive restarts per spec/HAP-Pairing.md section 8.
| 2026-07-27 | OpenBSD |