HAP.Display behaviour (HAP v0.1.1) View Source

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 an argument to HAP.build_accessory_server/1. If no such implementation is provided HAP uses a default console based implementation found at HAP.ConsoleDisplay

Link to this section Summary

Callbacks

Stop displaying any currently displayed pairing information to the user. This is most commonly because a pairing has been established with a controller

Display a notification to the user containing information on how to pair with this accessory server. The QR code often seen on HomeKit devices to facilitate pairing contains the value of pairing_url; see HAP.ConsoleDisplay for an example of how to display it to the user.

Display a notification to the user that identifies the named device or accessory. This comes from a user request within the Home app to identify the given device or accessory.

Link to this section Callbacks

Specs

clear_pairing_code() :: any()

Stop displaying any currently displayed pairing information to the user. This is most commonly because a pairing has been established with a controller

Link to this callback

display_pairing_code(arg1, arg2, arg3)

View Source

Specs

Display a notification to the user containing information on how to pair with this accessory server. The QR code often seen on HomeKit devices to facilitate pairing contains the value of pairing_url; see HAP.ConsoleDisplay for an example of how to display it to the user.

Specs

identify(String.t()) :: any()

Display a notification to the user that identifies the named device or accessory. This comes from a user request within the Home app to identify the given device or accessory.