Enumeration HAPServerEventTypesConst

Enumeration Members

ACCESSORIES: "accessories"

This event is emitted when a client requests the complete representation of Accessory data for this Accessory (for instance, what services, characteristics, etc. are supported) and any bridged Accessories in the case of a Bridge Accessory. The listener must call the provided callback function when the accessory data is ready. We will automatically JSON.stringify the data.

ADD_PAIRING: "add-pairing"
CONNECTION_CLOSED: "connection-closed"
GET_CHARACTERISTICS: "get-characteristics"

This event is emitted when a client wishes to retrieve the current value of one or more characteristics. The listener must call the provided callback function when the values are ready. iOS clients can typically wait up to 10 seconds for this call to return. We will automatically JSON.stringify the data (which must be an array) and wrap it in an object with a top-level "characteristics" property.

IDENTIFY: "identify"

Emitted when a client wishes for this server to identify itself before pairing. You must call the callback to respond to the client with success.

LISTENING: "listening"

Emitted when the server is fully set up and ready to receive connections.

LIST_PAIRINGS: "list-pairings"
PAIR: "pair"

This event is emitted when a client completes the "pairing" process and exchanges encryption keys. Note that this does not mean the "Add Accessory" process in iOS has completed. You must call the callback to complete the process.

REMOVE_PAIRING: "remove-pairing"
REQUEST_RESOURCE: "request-resource"
SET_CHARACTERISTICS: "set-characteristics"

This event is emitted when a client wishes to set the current value of one or more characteristics and/or subscribe to one or more events. The 'events' param is an initially-empty object, associated with the current connection, on which you may store event registration keys for later processing. The listener must call the provided callback when the request has been processed.