API Reference HAP v0.2.0

Modules

HAP

HAP is an implementation of the HomeKit Accessory Protocol Specification. It allows for the creation of Elixir powered HomeKit accessories which can be controlled from a user's iOS device in a similar manner to commercially available HomeKit accessories such as light bulbs, window coverings and other smart home accessories.

Represents a single accessory object, containing a number of services

Represents a top-level HAP instance configuration

Functions to aid in the manipulation of characteristics tuples

A behaviour which encapsulates the functinos required to define a characteristic. At runtime, characteristics are modeled via the HAP.Characteristic struct which contains the runtime values for the characteristic itself, as well as metadata about the characteristic. A HAP.CharacteristicDefinition is used to provide the template values for these fields. HAP contains definitions for many common HomeKit characteristics already, and users may define other characteristics by providing an implemenation of this behaviour as the first value in the characteristic definition tuple in a service.

Definition of the public.hap.characteristic.active characteristic

Definition of the public.hap.characteristic.brightness characteristic

Definition of the public.hap.characteristic.color-temperature characteristic

Definition of the public.hap.characteristic.contact-state characteristic

Definition of the public.hap.characteristic.temperature.cooling-threshold characteristic

Definition of the public.hap.characteristic.light-level.current characteristic

Definition of the public.hap.characteristic.heater-cooler.state.current characteristic

Definition of the public.hap.characteristic.horizontal-tilt.current characteristic

Definition of the public.hap.characteristic.position.current characteristic

Definition of the public.hap.characteristic.temperature.current characteristic

Definition of the public.hap.characteristic.vertical-tilt.current characteristic

Definition of the public.hap.characteristic.firmware.revision characteristic

Definition of the public.hap.characteristic.temperature.heating-threshold characteristic

Definition of the public.hap.characteristic.position.hold characteristic

Definition of the public.hap.characteristic.hue characteristic

Definition of the public.hap.characteristic.identify characteristic

Definition of the public.hap.characteristic.leak-detected characteristic

Definition of the public.hap.characteristic.lock-physical-controls characteristic

Definition of the public.hap.characteristic.manufacturer characteristic

Definition of the public.hap.characteristic.model characteristic

Definition of the public.hap.characteristic.motion-detected characteristic

Definition of the public.hap.characteristic.name characteristic

Definition of the public.hap.characteristic.obstruction-detected characteristic

Definition of the public.hap.characteristic.occupancy-detected characteristic

Definition of the public.hap.characteristic.on characteristic

Definition of the public.hap.characteristic.outlet-in-use characteristic

Definition of the public.hap.characteristic.position.state characteristic

Definition of the public.hap.characteristic.rotation.speed characteristic

Definition of the public.hap.characteristic.saturation characteristic

Definition of the public.hap.characteristic.serial-number characteristic

Definition of the public.hap.characteristic.status-active characteristic

Definition of the public.hap.characteristic.status-fault characteristic

Definition of the public.hap.characteristic.status-lo-batt characteristic

Definition of the public.hap.characteristic.status-tampered characteristic

Definition of the public.hap.characteristic.swing-mode characteristic

Definition of the public.hap.characteristic.heater-cooler.target characteristic

Definition of the public.hap.characteristic.horizontal-tilt.target characteristic

Definition of the public.hap.characteristic.position.target characteristic

Definition of the public.hap.characteristic.vertical-tilt.target characteristic

Definition of the public.hap.characteristic.temperature.units characteristic

Definition of the public.hap.characteristic.version characteristic

A behaviour which encapsulates all user-facing display concerns for an accessory. Applications which use HAP may provide their own implementation of this behaviour as a field in a HAP.AccessoryServer. If no such implementation is provided HAP uses a default console based implementation

Represents a single service, containing a number of characteristics

A protocol which allows for arbitrary service definitions to compile themselves into HAP.Service structs for use within HAP. This protocol allows HAP to expose pre-defined services such as HAP.Services.Lightbulb with fields reflecting the domain of the service, while allowing HAP to work internally with a service tree close to taht defined in the HomeKit specification

Struct representing an instance of the public.hap.service.accessory-information service

Struct representing an instance of the public.hap.service.sensor.contact service

Struct representing an instance of the public.hap.service.heater-cooler service

Struct representing an instance of the public.hap.service.sensor.leak service

Struct representing an instance of the public.hap.service.lightbulb service

Struct representing an instance of the public.hap.service.sensor.light service

Struct representing an instance of the public.hap.service.sensor.motion service

Struct representing an instance of the public.hap.service.sensor.occupancy service

Struct representing an instance of the public.hap.service.outlet service

Struct representing an instance of the public.hap.service.protocol.information.service service

Struct representing an instance of the public.hap.service.switch service

Struct representing an instance of the public.hap.service.sensor.temperature service

Struct representing an instance of the public.hap.service.window service

Struct representing an instance of the public.hap.service.window-covering service

Defines the behaviour required of a module that wishes to act as the backing data store for a given HomeKit characteristic