NAME

Protocol::HAP::Accessory - base class for HAP accessories

SYNOPSIS

use Protocol::HAP::Accessory;

my $accessory = Protocol::HAP::Accessory->new(
    aid => 1,
    name => 'My Accessory',
    manufacturer => 'Acme Corp',
    model => 'Model X',
);

$accessory->add_service($service);

DESCRIPTION

This module supplies the base class for HomeKit accessories. Each accessory holds the necessary Accessory Information service.

THE LOGGER ARGUMENT

The constructor takes an optional logger argument: an object with debug, info, warning, and error methods that take printf-style arguments. The default is the null logger of Protocol::HAP, which drops every message.

The accessory passes its logger to the services and characteristics it builds itself, such as the Accessory Information service. It never touches the logger of an object it receives.

SEE ALSO

Protocol::HAP, Protocol::HAP::Service, spec/HAP.md