View Source HAP.AccessoryServer (HAP v0.6.0)
Represents a top-level HAP instance configuration
Summary
Types
A unique identifier string in the form "AA:BB:CC:DD:EE:FF"
A HAP specified value indicating the primary function of this device as found in Section 13 of Apple's HomeKit Accessory Protocol Specification. Valid values include
The model of this accessory server, for example 'HAP Co. Super Bridge III'
The name to advertise for this accessory server, for example 'HAP Bridge'
A pairing code of the form 123-45-678
A pairing URL suitable for display in a QR code
A 4 character string used as part of the accessory discovery process
Represents an accessory server consisting of a number of accessories. Contains the following fields
Functions
Generates the pairing url to be used to pair with this accessory server. This URL can be encoded in a QR code to enable pairing directly from an iOS device
Types
@type accessory_identifier() :: String.t()
A unique identifier string in the form "AA:BB:CC:DD:EE:FF"
@type accessory_type() :: integer()
A HAP specified value indicating the primary function of this device as found in Section 13 of Apple's HomeKit Accessory Protocol Specification. Valid values include:
- Other
- Bridge
- Fan
- Garage
- Lightbulb
- Door Lock
- Outlet
- Switch
- Thermostat
- Sensor
- Security System
- Door
- Window
- Window Covering
- Programmable Switch
- Range Extender
- IP Camera
- Video Door Bell
- Air Purifier
- Heater
- Air Conditioner
- Humidifier
- Dehumidifier
- Sprinkler
- Faucet
- Shower System
- Remote
@type model() :: String.t()
The model of this accessory server, for example 'HAP Co. Super Bridge III'
@type name() :: String.t()
The name to advertise for this accessory server, for example 'HAP Bridge'
@type pairing_code() :: String.t()
A pairing code of the form 123-45-678
@type pairing_url() :: String.t()
A pairing URL suitable for display in a QR code
@type setup_id() :: String.t()
A 4 character string used as part of the accessory discovery process
@type t() :: %HAP.AccessoryServer{ accessories: [HAP.Accessory.t()], accessory_type: accessory_type(), data_path: String.t(), display_module: module(), identifier: accessory_identifier(), model: model(), name: name(), pairing_code: pairing_code(), setup_id: setup_id() }
Represents an accessory server consisting of a number of accessories. Contains the following fields:
name
: The name to assign to this device, for example 'HAP Bridge'model
: The model name to assign to this device, for example 'HAP Co. Super Bridge III'identifier
: A unique identifier string in the form "AA:BB:CC:DD:EE:FF"pairing_code
: A pairing code of the form 123-45-678 to be used for pairing. If not specified one will be defined dynamically.setup_id
: A 4 character string used as part of the accessory discovery process. If not specified one will be defined dynamically.display_module
: An optional implementation ofHAP.Display
used to present pairing and other information to the user. If not specified then a basic console-based display is used.data_path
: The path to where HAP will store its internal data. Will be created if it does not exist. If not specified, the default value depends on the value ofMix.target/0
. If it is:host
then a value ofhap_data
is used. If it is anything else (as it will be when compiling for a Nerves target, for example), the value of/root/hap_data
is used. This allows HAP to work out-of-the-box in conventional and Nerves environments.accessory_type
: A HAP specified value indicating the primary function of this device. SeeHAP.AccessoryServer.accessory_type/0
for detailsaccessories
: A list ofHAP.Accessory
structs to include in this accessory server
Functions
Generates the pairing url to be used to pair with this accessory server. This URL can be encoded in a QR code to enable pairing directly from an iOS device