hap-nodejs

  • Version 1.0.0
  • Published
  • 2.35 MB
  • 10 dependencies
  • Apache-2.0 license

Install

npm i hap-nodejs
yarn add hap-nodejs
pnpm add hap-nodejs

Overview

HAP-NodeJS is a Node.js implementation of HomeKit Accessory Server.

Index

Functions

Classes

Interfaces

Enums

Type Aliases

Namespaces

Functions

function clone

clone: <T extends object, U>(object: T, extend?: U) => T & U;
  • A simple clone function that also allows you to pass an "extend" object whose properties will be added to the cloned copy of the original object passed. Utils

function decode

decode: (buffer: Buffer) => Record<number, Buffer>;
  • This method is the legacy way of decoding tlv data. It will not properly decode multiple list of the same id. Should the decoder encounter multiple instances of the same id, it will just concatenate the buffer data.

    Parameter buffer

    TLV8 data

    Note: Please use decodeWithLists which properly decodes list elements.

    TLV8

function decodeList

decodeList: (data: Buffer, entryStartId: number) => Record<number, Buffer>[];
  • This method can be used to parse a TLV8 encoded list that was concatenated.

    If you are thinking about using this method, try to refactor the code to use decodeWithLists instead of decode. The single reason of this method's existence are the shortcomings decode, as it concatenates multiple tlv8 list entries into a single Buffer. This method can be used to undo that, by specifying the concatenated buffer and the tlv id of the element that should mark the beginning of a new tlv8 list entry.

    Parameter data

    The concatenated tlv8 list entries (probably output of decode).

    Parameter entryStartId

    The tlv id that marks the beginning of a new tlv8 entry.

    TLV8

function decodeWithLists

decodeWithLists: (buffer: Buffer) => Record<number, Buffer | Buffer[]>;
  • Decode a buffer coding TLV8 encoded entries.

    This method decodes multiple entries split by a TLV delimiter properly into Buffer arrays. It properly reassembles tlv entries if they were split across multiple entries due to exceeding the max tlv entry size of 255 bytes.

    Parameter buffer

    The Buffer containing TLV8 encoded data.

    TLV8

function encode

encode: (
type: number,
data: TLVEncodable | TLVEncodable[],
...args: any[]
) => Buffer;
  • TLV8

function epochMillisFromMillisSince2001_01_01

epochMillisFromMillisSince2001_01_01: (millis: number) => number;
  • Utils

function epochMillisFromMillisSince2001_01_01Buffer

epochMillisFromMillisSince2001_01_01Buffer: (millis: Buffer) => number;
  • Utils

function HAPLibraryVersion

HAPLibraryVersion: () => string;
  • This method can be used to retrieve the current running library version of the HAP-NodeJS framework.

    Returns

    The SemVer version string.

    Utils

function IsKnownHAPStatusError

IsKnownHAPStatusError: (status: HAPStatus) => boolean;
  • Determines if the given status code is a known HAPStatus error code.

    HAP Accessory Server

function isSerializableController

isSerializableController: (
controller: Controller
) => controller is SerializableController<ControllerServiceMap, any>;
  • Parameter controller

    Controller API

function once

once: <T extends Function>(func: T) => T;
  • Function wrapper to ensure a function/callback is only called once.

    Utils

function readUInt16

readUInt16: (buffer: Buffer) => number;
  • readUInt16LE TLV8

function readUInt32

readUInt32: (buffer: Buffer) => number;
  • readUInt32LE TLV8

function readUInt64LE

readUInt64LE: (buffer: Buffer, offset?: number) => number;
  • TLV8

function readVariableUIntLE

readVariableUIntLE: (buffer: Buffer) => number;
  • Reads variable size unsigned integer writeVariableUIntLE.

    Parameter buffer

    The buffer to read from. It must have exactly the size of the given integer. TLV8

function writeFloat32LE

writeFloat32LE: (value: number) => Buffer;
  • TLV8

function writeUInt16

writeUInt16: (value: number) => Buffer;
  • writeUInt16LE TLV8

function writeUInt32

writeUInt32: (value: number) => Buffer;
  • writeUint32LE TLV8

function writeVariableUIntLE

writeVariableUIntLE: (number: number) => Buffer;
  • Writes variable size unsigned integer. Either: - UInt8 - UInt16LE - UInt32LE

    Parameter number

    TLV8

Classes

class AccessControlManagement

class AccessControlManagement extends EventEmitter {}
  • Television

constructor

constructor(password?: boolean);
  • Instantiates a new AccessControlManagement.

    Parameter password

    if set to true the service will listen for password settings

constructor

constructor(password?: boolean, service?: AccessControl);
  • Instantiates a new AccessControlManagement.

    Parameter password

    if set to true the service will listen for password settings

    Parameter service

    supply your own instance to sideload the AccessControl service

method destroy

destroy: () => void;
  • This destroys the AccessControlManagement. It unregisters all GET or SET handler it has associated with the given AccessControl service. It removes all event handlers which were registered to this object.

method getAccessLevel

getAccessLevel: () => AccessLevel;

method getPassword

getPassword: () => string | undefined;
  • Returns

    the current password configured for the Home or undefined if no password is required.

method getService

getService: () => AccessControl;
  • Returns

    the AccessControl service

class Accessory

class Accessory extends EventEmitter {}
  • Accessory is a virtual HomeKit device. It can publish an associated HAP server for iOS devices to communicate with - or it can run behind another "Bridge" Accessory server.

    Bridged Accessories in this implementation must have a UUID that is unique among all other Accessories that are hosted by the Bridge. This UUID must be "stable" and unchanging, even when the server is restarted. This is required so that the Bridge can provide consistent "Accessory IDs" (aid) and "Instance IDs" (iid) for all Accessories, Services, and Characteristics for iOS clients to reference later.

    Accessory

constructor

constructor(displayName: string, UUID: string);

    property aid

    aid: number;

      property bridge

      bridge?: Accessory;

        property bridged

        bridged: boolean;

          property bridgedAccessories

          bridgedAccessories: Accessory[];

            property category

            category: Categories;

              property controllerStorage

              controllerStorage: ControllerStorage;
              • Private API.

              property displayName

              displayName: string;

                property getPrimaryAccessory

                getPrimaryAccessory: () => Accessory;
                • Returns the bridging accessory if this accessory is bridged. Otherwise, returns itself.

                  Returns

                  the primary accessory

                property lastKnownUsername

                lastKnownUsername?: string;

                  property reachable

                  reachable: boolean;

                    property services

                    services: Service[];

                      property shouldPurgeUnusedIDs

                      shouldPurgeUnusedIDs: boolean;

                        property UUID

                        UUID: string;

                          method addBridgedAccessories

                          addBridgedAccessories: (accessories: Accessory[]) => void;

                            method addBridgedAccessory

                            addBridgedAccessory: (accessory: Accessory, deferUpdate?: boolean) => Accessory;

                              method addService

                              addService: {
                              (service: Service): Service;
                              <S extends typeof Service>(
                              serviceConstructor: S,
                              ...constructorArgs: ConstructorArgs<S>
                              ): Service;
                              };
                              • Add the given service instance to the Accessory.

                                Parameter service

                                A Service instance.

                                Returns

                                Returns the service instance passed to the method call.

                              • Adds a given service by calling the provided Service constructor with the provided constructor arguments.

                                Parameter serviceConstructor

                                A Service service constructor (e.g. Service.Switch).

                                Parameter constructorArgs

                                The arguments passed to the given constructor.

                                Returns

                                Returns the constructed service instance.

                              method cleanupAccessoryData

                              static cleanupAccessoryData: (username: MacAddress) => void;

                                method configureController

                                configureController: (
                                controllerConstructor: Controller | ControllerConstructor
                                ) => void;
                                • This method is used to set up a new Controller for this accessory. See Controller for a more detailed explanation what a Controller is and what it is capable of.

                                  The controller can be passed as an instance of the class or as a constructor (without any necessary parameters) for a new Controller. Only one Controller of a given ControllerIdentifier can be configured for a given Accessory.

                                  When called, it will be checked if there are any services and persistent data the Controller (for the given ControllerIdentifier) can be restored from. Otherwise, the Controller will be created with new services.

                                  Parameter controllerConstructor

                                  The Controller instance or constructor to the Controller with no required arguments.

                                method deserialize

                                static deserialize: (json: SerializedAccessory) => Accessory;

                                  method destroy

                                  destroy: () => Promise<void>;
                                  • Removes this Accessory from the local network Accessory object will no longer valid after invoking this method Trying to invoke publish() on the object will result undefined behavior

                                  method disableUnusedIDPurge

                                  disableUnusedIDPurge: () => void;

                                    method enableUnusedIDPurge

                                    enableUnusedIDPurge: () => void;

                                      method findCharacteristic

                                      protected findCharacteristic: (
                                      aid: number,
                                      iid: number
                                      ) => Characteristic | undefined;

                                        method getAccessoryByAID

                                        protected getAccessoryByAID: (aid: number) => Accessory | undefined;

                                          method getService

                                          getService: <T extends WithUUID<typeof Service>>(
                                          name: string | T
                                          ) => Service | undefined;

                                            method getServiceById

                                            getServiceById: <T extends WithUUID<typeof Service>>(
                                            uuid: string | T,
                                            subType: string
                                            ) => Service | undefined;

                                              method publish

                                              publish: (info: PublishInfo, allowInsecureRequest?: boolean) => Promise<void>;
                                              • Publishes this accessory on the local network for iOS clients to communicate with. - info.username - formatted as a MAC address, like CC:22:3D:E3:CE:F6, of this accessory. Must be globally unique from all Accessories on your local network. - info.pincode - the 8-digit pin code for clients to use when pairing this Accessory. Must be formatted as a string like 031-45-154. - info.category - one of the values of the Accessory.Category enum, like Accessory.Category.SWITCH. This is a hint to iOS clients about what "type" of Accessory this represents, so that for instance an appropriate icon can be drawn for the user while adding a new Accessory.

                                                Parameter info

                                                Required info for publishing.

                                                Parameter allowInsecureRequest

                                                Will allow unencrypted and unauthenticated access to the http server

                                              method purgeUnusedIDs

                                              purgeUnusedIDs: () => void;
                                              • Manually purge the unused ids if you like, comes handy when you have disabled auto purge, so you can do it manually

                                              method removeAllBridgedAccessories

                                              removeAllBridgedAccessories: () => void;

                                                method removeBridgedAccessories

                                                removeBridgedAccessories: (accessories: Accessory[]) => void;

                                                  method removeBridgedAccessory

                                                  removeBridgedAccessory: (accessory: Accessory, deferUpdate?: boolean) => void;

                                                    method removeController

                                                    removeController: (controller: Controller) => void;
                                                    • This method will remove a given Controller from this accessory. The controller object will be restored to its initial state. This also means that any event handlers setup for the controller will be removed.

                                                      Parameter controller

                                                      The controller which should be removed from the accessory.

                                                    method removeService

                                                    removeService: (service: Service) => void;

                                                      method serialize

                                                      static serialize: (accessory: Accessory) => SerializedAccessory;

                                                        method setupURI

                                                        setupURI: () => string;

                                                          method unpublish

                                                          unpublish: () => Promise<void>;

                                                            class AccessoryInfo

                                                            class AccessoryInfo {}
                                                            • AccessoryInfo is a model class containing a subset of Accessory data relevant to the internal HAP server, such as encryption keys and username. It is persisted to disk. Model

                                                            property category

                                                            category: Categories;

                                                              property deviceIdPattern

                                                              static readonly deviceIdPattern: RegExp;

                                                                property displayName

                                                                displayName: string;

                                                                  property model

                                                                  model: string;

                                                                    property paired

                                                                    paired: () => boolean;

                                                                      property pairedAdminClients

                                                                      pairedAdminClients: number;

                                                                        property pairedClients

                                                                        pairedClients: Record<string, PairingInformation>;

                                                                          property pincode

                                                                          pincode: string;

                                                                            property setupID

                                                                            setupID: string;

                                                                              property signPk

                                                                              signPk: Buffer;

                                                                                property signSk

                                                                                signSk: Buffer;

                                                                                  property username

                                                                                  username: string;

                                                                                    method addPairedClient

                                                                                    addPairedClient: (
                                                                                    username: HAPUsername,
                                                                                    publicKey: Buffer,
                                                                                    permission: PermissionTypes
                                                                                    ) => void;
                                                                                    • Add a paired client to memory.

                                                                                      Parameter username

                                                                                      Parameter publicKey

                                                                                      Parameter permission

                                                                                    method assertValidUsername

                                                                                    static assertValidUsername: (username: MacAddress) => void;

                                                                                      method checkForCurrentConfigurationNumberIncrement

                                                                                      checkForCurrentConfigurationNumberIncrement: (
                                                                                      configuration: AccessoryJsonObject[],
                                                                                      checkFirmwareIncrement?: boolean
                                                                                      ) => boolean;
                                                                                      • Checks based on the current accessory configuration if the current configuration number needs to be incremented. Additionally, if desired, it checks if the firmware version was incremented (aka the HAP-NodeJS) version did grow.

                                                                                        Parameter configuration

                                                                                        The current accessory configuration.

                                                                                        Parameter checkFirmwareIncrement

                                                                                        Returns

                                                                                        True if the current configuration number was incremented and thus a new TXT must be advertised.

                                                                                      method create

                                                                                      static create: (username: MacAddress) => AccessoryInfo;

                                                                                        method getClientPublicKey

                                                                                        getClientPublicKey: (username: HAPUsername) => Buffer | undefined;

                                                                                          method getConfigVersion

                                                                                          getConfigVersion: () => number;

                                                                                            method hasAdminPermissions

                                                                                            hasAdminPermissions: (username: HAPUsername) => boolean;

                                                                                              method isPaired

                                                                                              isPaired: (username: HAPUsername) => boolean;
                                                                                              • Check if username is paired

                                                                                                Parameter username

                                                                                              method listPairings

                                                                                              listPairings: () => PairingInformation[];

                                                                                                method load

                                                                                                static load: (username: MacAddress) => AccessoryInfo | null;

                                                                                                  method persistKey

                                                                                                  static persistKey: (username: MacAddress) => string;

                                                                                                    method remove

                                                                                                    static remove: (username: MacAddress) => void;

                                                                                                      method removePairedClient

                                                                                                      removePairedClient: (connection: HAPConnection, username: HAPUsername) => void;
                                                                                                      • Remove a paired client from memory.

                                                                                                        Parameter connection

                                                                                                        the session of the connection initiated the removal of the pairing

                                                                                                        Parameter username

                                                                                                      method save

                                                                                                      save: () => void;

                                                                                                        method updatePermission

                                                                                                        updatePermission: (username: HAPUsername, permission: PermissionTypes) => void;

                                                                                                          class AdaptiveLightingController

                                                                                                          class AdaptiveLightingController
                                                                                                          extends EventEmitter
                                                                                                          implements
                                                                                                          SerializableController<
                                                                                                          ControllerServiceMap,
                                                                                                          SerializedAdaptiveLightingControllerState
                                                                                                          > {}
                                                                                                          • This class allows adding Adaptive Lighting support to Lightbulb services. The Lightbulb service MUST have the Characteristic.ColorTemperature characteristic AND the Characteristic.Brightness characteristic added. The light may also expose Characteristic.Hue and Characteristic.Saturation characteristics (though additional work is required to keep them in sync with the color temperature characteristic. see below)

                                                                                                            How Adaptive Lighting works: When enabling AdaptiveLighting the iDevice will send a transition schedule for the next 24 hours. This schedule will be renewed all 24 hours by a HomeHub in your home (updating the schedule according to your current day/night situation). Once enabled the lightbulb will execute the provided transitions. The color temperature value set is always dependent on the current brightness value. Meaning brighter light will be colder and darker light will be warmer. HomeKit considers Adaptive Lighting to be disabled as soon a write happens to either the Hue/Saturation or the ColorTemperature characteristics. The AdaptiveLighting state must persist across reboots.

                                                                                                            The AdaptiveLightingController can be operated in two modes: AdaptiveLightingControllerMode.AUTOMATIC and AdaptiveLightingControllerMode.MANUAL with AUTOMATIC being the default. The goal would be that the color transition is done DIRECTLY on the light itself, thus not creating any additional/heavy traffic on the network. So if your light hardware/API supports transitions please go the extra mile and use MANUAL mode.

                                                                                                            Below is an overview what you need to or consider when enabling AdaptiveLighting (categorized by mode). The AdaptiveLightingControllerMode can be defined with the second constructor argument.

                                                                                                            AUTOMATIC (Default mode):

                                                                                                            This is the easiest mode to setup and needs less to no work form your side for AdaptiveLighting to work. The AdaptiveLightingController will go through setup procedure with HomeKit and automatically update the color temperature characteristic base on the current transition schedule. It is also adjusting the color temperature when a write to the brightness characteristic happens. Additionally, it will also handle turning off AdaptiveLighting, when it detects a write happening to the ColorTemperature, Hue or Saturation characteristic (though it can only detect writes coming from HomeKit and can't detect changes done to the physical devices directly! See below).

                                                                                                            So what do you need to consider in automatic mode: - Brightness and ColorTemperature characteristics MUST be set up. Hue and Saturation may be added for color support. - Color temperature will be updated all 60 seconds by calling the SET handler of the ColorTemperature characteristic. So every transition behaves like a regular write to the ColorTemperature characteristic. - Every transition step is dependent on the current brightness value. Try to keep the internal cache updated as the controller won't call the GET handler every 60 seconds. (The cached brightness value is updated on SET/GET operations or by manually calling Characteristic.updateValue on the brightness characteristic). - Detecting changes on the lightbulb side: Any manual change to ColorTemperature or Hue/Saturation is considered as a signal to turn AdaptiveLighting off. In order to notify the AdaptiveLightingController of such an event happening OUTSIDE of HomeKit you must call disableAdaptiveLighting manually! - Be aware that even when the light is turned off the transition will continue to call the SET handler of the ColorTemperature characteristic. - When using Hue/Saturation: When using Hue/Saturation in combination with the ColorTemperature characteristic you need to update the respective other in a particular way depending on if being in "color mode" or "color temperature mode". When a write happens to Hue/Saturation characteristic in is advised to set the internal value of the ColorTemperature to the minimal (NOT RAISING an event). When a write happens to the ColorTemperature characteristic just MUST convert to a proper representation in hue and saturation values, with RAISING an event. As noted above you MUST NOT call the Characteristic.setValue method for this, as this will be considered a write to the characteristic and will turn off AdaptiveLighting. Instead, you should use Characteristic.updateValue for this. You can and SHOULD use the supplied utility method ColorUtils.colorTemperatureToHueAndSaturation for converting mired to hue and saturation values.

                                                                                                            MANUAL mode:

                                                                                                            Manual mode is recommended for any accessories which support transitions natively on the devices end. Like for example ZigBee lights which support sending transitions directly to the lightbulb which then get executed ON the lightbulb itself reducing unnecessary network traffic. Here is a quick overview what you have to consider to successfully implement AdaptiveLighting support. The AdaptiveLightingController will also in manual mode do all the setup procedure. It will also save the transition schedule to disk to keep AdaptiveLighting enabled across reboots. The "only" thing you have to do yourself is handling the actual transitions, check that event notifications are only sent in the defined interval threshold, adjust the color temperature when brightness is changed and signal that Adaptive Lighting should be disabled if ColorTemperature, Hue or Saturation is changed manually.

                                                                                                            First step is to setup up an event handler for the AdaptiveLightingControllerEvents.UPDATE, which is called when AdaptiveLighting is enabled, the HomeHub updates the schedule for the next 24 hours or AdaptiveLighting is restored from disk on startup. In the event handler you can get the current schedule via AdaptiveLightingController.getAdaptiveLightingTransitionCurve, retrieve current intervals like AdaptiveLightingController.getAdaptiveLightingUpdateInterval or AdaptiveLightingController.getAdaptiveLightingNotifyIntervalThreshold and get the date in epoch millis when the current transition curve started using AdaptiveLightingController.getAdaptiveLightingStartTimeOfTransition. Additionally AdaptiveLightingController.getAdaptiveLightingBrightnessMultiplierRange can be used to get the valid range for the brightness value to calculate the brightness adjustment factor. The method AdaptiveLightingController.isAdaptiveLightingActive can be used to check if AdaptiveLighting is enabled. Besides, actually running the transition (see AdaptiveLightingTransitionCurveEntry) you must correctly update the color temperature when the brightness of the lightbulb changes (see AdaptiveLightingTransitionCurveEntry.brightnessAdjustmentFactor), and signal when AdaptiveLighting got disabled by calling AdaptiveLightingController.disableAdaptiveLighting when ColorTemperature, Hue or Saturation where changed manually. Lastly you should set up a event handler for the AdaptiveLightingControllerEvents.DISABLED event. In yet unknown circumstances HomeKit may also send a dedicated disable command via the control point characteristic. Be prepared to handle that.

                                                                                                            Adaptive Lighting

                                                                                                          constructor

                                                                                                          constructor(service: Lightbulb, options?: AdaptiveLightingOptions);
                                                                                                          • Creates a new instance of the AdaptiveLightingController. Refer to the AdaptiveLightingController documentation on how to use it.

                                                                                                            Parameter service

                                                                                                            The lightbulb to which Adaptive Lighting support should be added.

                                                                                                            Parameter options

                                                                                                            Optional options to define the operating mode (automatic vs manual).

                                                                                                          method configureServices

                                                                                                          configureServices: () => void;

                                                                                                          method constructServices

                                                                                                          constructServices: () => ControllerServiceMap;

                                                                                                          method controllerId

                                                                                                          controllerId: () => ControllerIdentifier;

                                                                                                          method deserialize

                                                                                                          deserialize: (serialized: SerializedAdaptiveLightingControllerState) => void;

                                                                                                          method disableAdaptiveLighting

                                                                                                          disableAdaptiveLighting: () => void;
                                                                                                          • This method can be called to manually disable the current active Adaptive Lighting transition. When using AdaptiveLightingControllerMode.AUTOMATIC you won't need to call this method. In AdaptiveLightingControllerMode.MANUAL you must call this method when Adaptive Lighting should be disabled. This is the case when the user manually changes the value of Hue, Saturation or ColorTemperature characteristics (or if any of those values is changed by physical interaction with the lightbulb).

                                                                                                          method getAdaptiveLightingBrightnessMultiplierRange

                                                                                                          getAdaptiveLightingBrightnessMultiplierRange: () => BrightnessAdjustmentMultiplierRange;

                                                                                                            method getAdaptiveLightingNotifyIntervalThreshold

                                                                                                            getAdaptiveLightingNotifyIntervalThreshold: () => number;
                                                                                                            • Returns the minimum interval threshold (in milliseconds) a accessory may notify HomeKit controllers about a new color temperature value via event notifications (what happens when you call Characteristic.updateValue). Meaning the accessory should only send event notifications to subscribed HomeKit controllers at the specified interval.

                                                                                                              Typically this evaluates to 600000 milliseconds (10 minutes).

                                                                                                            method getAdaptiveLightingStartTimeOfTransition

                                                                                                            getAdaptiveLightingStartTimeOfTransition: () => number;
                                                                                                            • Returns the time where the current transition curve was started in epoch time millis. A transition curves is active for 24 hours typically and is renewed every 24 hours by a HomeHub. Additionally see getAdaptiveLightingTimeOffset.

                                                                                                            method getAdaptiveLightingTimeOffset

                                                                                                            getAdaptiveLightingTimeOffset: () => number;
                                                                                                            • It is not necessarily given, that we have the same time (or rather the correct time) as the HomeKit controller who set up the transition schedule. Thus we record the delta between our current time and the the time send with the setup request. timeOffset is defined as Date.now() - getAdaptiveLightingStartTimeOfTransition();. So in the case were we actually have a correct local time, it most likely will be positive (due to network latency). But of course it can also be negative.

                                                                                                            method getAdaptiveLightingTransitionCurve

                                                                                                            getAdaptiveLightingTransitionCurve: () => AdaptiveLightingTransitionCurveEntry[];

                                                                                                              method getAdaptiveLightingUpdateInterval

                                                                                                              getAdaptiveLightingUpdateInterval: () => number;
                                                                                                              • This method returns the interval (in milliseconds) in which the light should update its internal color temperature (aka changes it physical color). A lightbulb should ideally change this also when turned of in oder to have a smooth transition when turning the light on.

                                                                                                                Typically this evaluates to 60000 milliseconds (60 seconds).

                                                                                                              method getCurrentAdaptiveLightingTransitionPoint

                                                                                                              getCurrentAdaptiveLightingTransitionPoint: () =>
                                                                                                              | AdaptiveLightingTransitionPoint
                                                                                                              | undefined;

                                                                                                              method handleControllerRemoved

                                                                                                              handleControllerRemoved: () => void;

                                                                                                              method handleFactoryReset

                                                                                                              handleFactoryReset: () => void;

                                                                                                              method initWithServices

                                                                                                              initWithServices: (
                                                                                                              serviceMap: ControllerServiceMap
                                                                                                              ) => void | ControllerServiceMap;

                                                                                                              method isAdaptiveLightingActive

                                                                                                              isAdaptiveLightingActive: () => boolean;
                                                                                                              • Returns if a Adaptive Lighting transition is currently active.

                                                                                                              method serialize

                                                                                                              serialize: () => SerializedAdaptiveLightingControllerState | undefined;

                                                                                                              method setupStateChangeDelegate

                                                                                                              setupStateChangeDelegate: (delegate?: StateChangeDelegate) => void;

                                                                                                              class Bridge

                                                                                                              class Bridge extends Accessory {}
                                                                                                              • Bridge is a special type of HomeKit Accessory that hosts other Accessories "behind" it. This way you can simply publish() the Bridge (with a single HAPServer on a single port) and all bridged Accessories will be hosted automatically, instead of needed to publish() every single Accessory as a separate server.

                                                                                                                Accessory

                                                                                                              constructor

                                                                                                              constructor(displayName: string, UUID: string);

                                                                                                                class CameraController

                                                                                                                class CameraController
                                                                                                                extends EventEmitter
                                                                                                                implements
                                                                                                                SerializableController<CameraControllerServiceMap, CameraControllerState> {}
                                                                                                                • Everything needed to expose a HomeKit Camera.

                                                                                                                  Camera

                                                                                                                constructor

                                                                                                                constructor(options: CameraControllerOptions, legacyMode?: boolean);

                                                                                                                  property motionService

                                                                                                                  motionService?: MotionSensor;

                                                                                                                    property occupancyService

                                                                                                                    occupancyService?: OccupancySensor;

                                                                                                                      property recordingManagement

                                                                                                                      recordingManagement?: RecordingManagement;
                                                                                                                      • The RecordingManagement which is responsible for handling HomeKit Secure Video. This property is only present if recording was configured.

                                                                                                                      property streamManagements

                                                                                                                      streamManagements: RTPStreamManagement[];

                                                                                                                      method configureServices

                                                                                                                      configureServices: () => void;

                                                                                                                      method constructServices

                                                                                                                      constructServices: () => CameraControllerServiceMap;

                                                                                                                      method controllerId

                                                                                                                      controllerId: () => ControllerIdentifier;

                                                                                                                      method deserialize

                                                                                                                      deserialize: (serialized: CameraControllerState) => void;

                                                                                                                      method forceStopStreamingSession

                                                                                                                      forceStopStreamingSession: (sessionId: SessionIdentifier) => void;
                                                                                                                      • Call this method if you want to forcefully suspend an ongoing streaming session. This would be adequate if the rtp server or media encoding encountered an unexpected error.

                                                                                                                        Parameter sessionId

                                                                                                                        id of the current ongoing streaming session

                                                                                                                      method generateSynchronisationSource

                                                                                                                      static generateSynchronisationSource: () => number;

                                                                                                                        method handleControllerRemoved

                                                                                                                        handleControllerRemoved: () => void;

                                                                                                                        method handleFactoryReset

                                                                                                                        handleFactoryReset: () => void;

                                                                                                                        method handleSnapshotRequest

                                                                                                                        handleSnapshotRequest: (
                                                                                                                        height: number,
                                                                                                                        width: number,
                                                                                                                        accessoryName?: string,
                                                                                                                        reason?: ResourceRequestReason
                                                                                                                        ) => Promise<Buffer>;

                                                                                                                        method initWithServices

                                                                                                                        initWithServices: (
                                                                                                                        serviceMap: CameraControllerServiceMap
                                                                                                                        ) => void | CameraControllerServiceMap;

                                                                                                                        method migrateFromDoorbell

                                                                                                                        protected migrateFromDoorbell: (serviceMap: ControllerServiceMap) => boolean;

                                                                                                                          method retrieveEventTriggerOptions

                                                                                                                          protected retrieveEventTriggerOptions: () => Set<EventTriggerOption>;

                                                                                                                            method serialize

                                                                                                                            serialize: () => CameraControllerState | undefined;

                                                                                                                            method setMicrophoneMuted

                                                                                                                            setMicrophoneMuted: (muted?: boolean) => void;

                                                                                                                              method setMicrophoneVolume

                                                                                                                              setMicrophoneVolume: (volume: number) => void;

                                                                                                                                method setSpeakerMuted

                                                                                                                                setSpeakerMuted: (muted?: boolean) => void;

                                                                                                                                  method setSpeakerVolume

                                                                                                                                  setSpeakerVolume: (volume: number) => void;

                                                                                                                                    method setupStateChangeDelegate

                                                                                                                                    setupStateChangeDelegate: (delegate?: StateChangeDelegate) => void;

                                                                                                                                    class Characteristic

                                                                                                                                    class Characteristic extends EventEmitter {}
                                                                                                                                    • Characteristic represents a particular typed variable that can be assigned to a Service. For instance, a "Hue" Characteristic might store a 'float' value of type 'arcdegrees'. You could add the Hue Characteristic to a Service in order to store that value. A particular Characteristic is distinguished from others by its UUID. HomeKit provides a set of known Characteristic UUIDs defined in HomeKit.ts along with a corresponding concrete subclass.

                                                                                                                                      You can also define custom Characteristics by providing your own UUID. Custom Characteristics can be added to any native or custom Services, but Siri will likely not be able to work with these.

                                                                                                                                      Characteristic

                                                                                                                                    constructor

                                                                                                                                    constructor(displayName: string, UUID: string, props: CharacteristicProps);

                                                                                                                                      property AccessCodeControlPoint

                                                                                                                                      static AccessCodeControlPoint: typeof AccessCodeControlPoint;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property AccessCodeSupportedConfiguration

                                                                                                                                      static AccessCodeSupportedConfiguration: typeof AccessCodeSupportedConfiguration;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property AccessControlLevel

                                                                                                                                      static AccessControlLevel: typeof AccessControlLevel;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property AccessoryFlags

                                                                                                                                      static AccessoryFlags: typeof AccessoryFlags;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property AccessoryIdentifier

                                                                                                                                      static AccessoryIdentifier: typeof AccessoryIdentifier;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property Active

                                                                                                                                      static Active: typeof Active;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property ActiveIdentifier

                                                                                                                                      static ActiveIdentifier: typeof ActiveIdentifier;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property ActivityInterval

                                                                                                                                      static ActivityInterval: typeof ActivityInterval;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property additionalAuthorizationHandler

                                                                                                                                      additionalAuthorizationHandler?: AdditionalAuthorizationHandler;

                                                                                                                                      property AdministratorOnlyAccess

                                                                                                                                      static AdministratorOnlyAccess: typeof AdministratorOnlyAccess;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property AirParticulateDensity

                                                                                                                                      static AirParticulateDensity: typeof AirParticulateDensity;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property AirParticulateSize

                                                                                                                                      static AirParticulateSize: typeof AirParticulateSize;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property AirPlayEnable

                                                                                                                                      static AirPlayEnable: typeof AirPlayEnable;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property AirQuality

                                                                                                                                      static AirQuality: typeof AirQuality;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property AppMatchingIdentifier

                                                                                                                                      static AppMatchingIdentifier: typeof AppMatchingIdentifier;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property AssetUpdateReadiness

                                                                                                                                      static AssetUpdateReadiness: typeof AssetUpdateReadiness;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property AudioFeedback

                                                                                                                                      static AudioFeedback: typeof AudioFeedback;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property BatteryLevel

                                                                                                                                      static BatteryLevel: typeof BatteryLevel;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property Brightness

                                                                                                                                      static Brightness: typeof Brightness;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property ButtonEvent

                                                                                                                                      static ButtonEvent: typeof ButtonEvent;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CameraOperatingModeIndicator

                                                                                                                                      static CameraOperatingModeIndicator: typeof CameraOperatingModeIndicator;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CarbonDioxideDetected

                                                                                                                                      static CarbonDioxideDetected: typeof CarbonDioxideDetected;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CarbonDioxideLevel

                                                                                                                                      static CarbonDioxideLevel: typeof CarbonDioxideLevel;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CarbonDioxidePeakLevel

                                                                                                                                      static CarbonDioxidePeakLevel: typeof CarbonDioxidePeakLevel;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CarbonMonoxideDetected

                                                                                                                                      static CarbonMonoxideDetected: typeof CarbonMonoxideDetected;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CarbonMonoxideLevel

                                                                                                                                      static CarbonMonoxideLevel: typeof CarbonMonoxideLevel;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CarbonMonoxidePeakLevel

                                                                                                                                      static CarbonMonoxidePeakLevel: typeof CarbonMonoxidePeakLevel;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CCAEnergyDetectThreshold

                                                                                                                                      static CCAEnergyDetectThreshold: typeof CCAEnergyDetectThreshold;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CCASignalDetectThreshold

                                                                                                                                      static CCASignalDetectThreshold: typeof CCASignalDetectThreshold;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CharacteristicValueActiveTransitionCount

                                                                                                                                      static CharacteristicValueActiveTransitionCount: typeof CharacteristicValueActiveTransitionCount;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CharacteristicValueTransitionControl

                                                                                                                                      static CharacteristicValueTransitionControl: typeof CharacteristicValueTransitionControl;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property ChargingState

                                                                                                                                      static ChargingState: typeof ChargingState;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property ClosedCaptions

                                                                                                                                      static ClosedCaptions: typeof ClosedCaptions;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property ColorTemperature

                                                                                                                                      static ColorTemperature: typeof ColorTemperature;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property ConfigurationState

                                                                                                                                      static ConfigurationState: typeof ConfigurationState;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property ConfiguredName

                                                                                                                                      static ConfiguredName: typeof ConfiguredName;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property ContactSensorState

                                                                                                                                      static ContactSensorState: typeof ContactSensorState;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CoolingThresholdTemperature

                                                                                                                                      static CoolingThresholdTemperature: typeof CoolingThresholdTemperature;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CryptoHash

                                                                                                                                      static CryptoHash: typeof CryptoHash;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentAirPurifierState

                                                                                                                                      static CurrentAirPurifierState: typeof CurrentAirPurifierState;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentAmbientLightLevel

                                                                                                                                      static CurrentAmbientLightLevel: typeof CurrentAmbientLightLevel;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentDoorState

                                                                                                                                      static CurrentDoorState: typeof CurrentDoorState;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentFanState

                                                                                                                                      static CurrentFanState: typeof CurrentFanState;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentHeaterCoolerState

                                                                                                                                      static CurrentHeaterCoolerState: typeof CurrentHeaterCoolerState;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentHeatingCoolingState

                                                                                                                                      static CurrentHeatingCoolingState: typeof CurrentHeatingCoolingState;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentHorizontalTiltAngle

                                                                                                                                      static CurrentHorizontalTiltAngle: typeof CurrentHorizontalTiltAngle;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentHumidifierDehumidifierState

                                                                                                                                      static CurrentHumidifierDehumidifierState: typeof CurrentHumidifierDehumidifierState;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentMediaState

                                                                                                                                      static CurrentMediaState: typeof CurrentMediaState;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentPosition

                                                                                                                                      static CurrentPosition: typeof CurrentPosition;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentRelativeHumidity

                                                                                                                                      static CurrentRelativeHumidity: typeof CurrentRelativeHumidity;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentSlatState

                                                                                                                                      static CurrentSlatState: typeof CurrentSlatState;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentTemperature

                                                                                                                                      static CurrentTemperature: typeof CurrentTemperature;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentTiltAngle

                                                                                                                                      static CurrentTiltAngle: typeof CurrentTiltAngle;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentTransport

                                                                                                                                      static CurrentTransport: typeof CurrentTransport;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentVerticalTiltAngle

                                                                                                                                      static CurrentVerticalTiltAngle: typeof CurrentVerticalTiltAngle;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property CurrentVisibilityState

                                                                                                                                      static CurrentVisibilityState: typeof CurrentVisibilityState;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property DataStreamHAPTransport

                                                                                                                                      static DataStreamHAPTransport: typeof DataStreamHAPTransport;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property DataStreamHAPTransportInterrupt

                                                                                                                                      static DataStreamHAPTransportInterrupt: typeof DataStreamHAPTransportInterrupt;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property DiagonalFieldOfView

                                                                                                                                      static DiagonalFieldOfView: typeof DiagonalFieldOfView;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property DigitalZoom

                                                                                                                                      static DigitalZoom: typeof DigitalZoom;
                                                                                                                                      • Characteristic Definitions

                                                                                                                                      property displayName

                                                                                                                                      displayName: string;

                                                                                                                                        property DisplayOrder

                                                                                                                                        static DisplayOrder: typeof DisplayOrder;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property EventRetransmissionMaximum

                                                                                                                                        static EventRetransmissionMaximum: typeof EventRetransmissionMaximum;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property EventSnapshotsActive

                                                                                                                                        static EventSnapshotsActive: typeof EventSnapshotsActive;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property EventTransmissionCounters

                                                                                                                                        static EventTransmissionCounters: typeof EventTransmissionCounters;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property FilterChangeIndication

                                                                                                                                        static FilterChangeIndication: typeof FilterChangeIndication;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property FilterLifeLevel

                                                                                                                                        static FilterLifeLevel: typeof FilterLifeLevel;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property FirmwareRevision

                                                                                                                                        static FirmwareRevision: typeof FirmwareRevision;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property FirmwareUpdateReadiness

                                                                                                                                        static FirmwareUpdateReadiness: typeof FirmwareUpdateReadiness;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property FirmwareUpdateStatus

                                                                                                                                        static FirmwareUpdateStatus: typeof FirmwareUpdateStatus;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property HardwareFinish

                                                                                                                                        static HardwareFinish: typeof HardwareFinish;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property HardwareRevision

                                                                                                                                        static HardwareRevision: typeof HardwareRevision;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property HeartBeat

                                                                                                                                        static HeartBeat: typeof HeartBeat;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property HeatingThresholdTemperature

                                                                                                                                        static HeatingThresholdTemperature: typeof HeatingThresholdTemperature;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property HoldPosition

                                                                                                                                        static HoldPosition: typeof HoldPosition;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property HomeKitCameraActive

                                                                                                                                        static HomeKitCameraActive: typeof HomeKitCameraActive;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property Hue

                                                                                                                                        static Hue: typeof Hue;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property Identifier

                                                                                                                                        static Identifier: typeof Identifier;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property Identify

                                                                                                                                        static Identify: typeof Identify;
                                                                                                                                        • Characteristic Definitions

                                                                                                                                        property iid

                                                                                                                                        iid: number;

                                                                                                                                          property ImageMirroring

                                                                                                                                          static ImageMirroring: typeof ImageMirroring;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property ImageRotation

                                                                                                                                          static ImageRotation: typeof ImageRotation;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property InputDeviceType

                                                                                                                                          static InputDeviceType: typeof InputDeviceType;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property InputSourceType

                                                                                                                                          static InputSourceType: typeof InputSourceType;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property InUse

                                                                                                                                          static InUse: typeof InUse;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property IsConfigured

                                                                                                                                          static IsConfigured: typeof IsConfigured;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property LeakDetected

                                                                                                                                          static LeakDetected: typeof LeakDetected;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property ListPairings

                                                                                                                                          static ListPairings: typeof ListPairings;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property LockControlPoint

                                                                                                                                          static LockControlPoint: typeof LockControlPoint;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property LockCurrentState

                                                                                                                                          static LockCurrentState: typeof LockCurrentState;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property LockLastKnownAction

                                                                                                                                          static LockLastKnownAction: typeof LockLastKnownAction;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property LockManagementAutoSecurityTimeout

                                                                                                                                          static LockManagementAutoSecurityTimeout: typeof LockManagementAutoSecurityTimeout;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property LockPhysicalControls

                                                                                                                                          static LockPhysicalControls: typeof LockPhysicalControls;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property LockTargetState

                                                                                                                                          static LockTargetState: typeof LockTargetState;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property Logs

                                                                                                                                          static Logs: typeof Logs;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property MACRetransmissionMaximum

                                                                                                                                          static MACRetransmissionMaximum: typeof MACRetransmissionMaximum;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property MACTransmissionCounters

                                                                                                                                          static MACTransmissionCounters: typeof MACTransmissionCounters;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property ManagedNetworkEnable

                                                                                                                                          static ManagedNetworkEnable: typeof ManagedNetworkEnable;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property ManuallyDisabled

                                                                                                                                          static ManuallyDisabled: typeof ManuallyDisabled;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property Manufacturer

                                                                                                                                          static Manufacturer: typeof Manufacturer;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property MaximumTransmitPower

                                                                                                                                          static MaximumTransmitPower: typeof MaximumTransmitPower;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property MetricsBufferFullState

                                                                                                                                          static MetricsBufferFullState: typeof MetricsBufferFullState;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property Model

                                                                                                                                          static Model: typeof Model;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property MotionDetected

                                                                                                                                          static MotionDetected: typeof MotionDetected;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property MultifunctionButton

                                                                                                                                          static MultifunctionButton: typeof MultifunctionButton;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property Mute

                                                                                                                                          static Mute: typeof Mute;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property Name

                                                                                                                                          static Name: typeof Name;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property NetworkAccessViolationControl

                                                                                                                                          static NetworkAccessViolationControl: typeof NetworkAccessViolationControl;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property NetworkClientProfileControl

                                                                                                                                          static NetworkClientProfileControl: typeof NetworkClientProfileControl;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property NetworkClientStatusControl

                                                                                                                                          static NetworkClientStatusControl: typeof NetworkClientStatusControl;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property NFCAccessControlPoint

                                                                                                                                          static NFCAccessControlPoint: typeof NFCAccessControlPoint;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property NFCAccessSupportedConfiguration

                                                                                                                                          static NFCAccessSupportedConfiguration: typeof NFCAccessSupportedConfiguration;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property NightVision

                                                                                                                                          static NightVision: typeof NightVision;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property NitrogenDioxideDensity

                                                                                                                                          static NitrogenDioxideDensity: typeof NitrogenDioxideDensity;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property ObstructionDetected

                                                                                                                                          static ObstructionDetected: typeof ObstructionDetected;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property OccupancyDetected

                                                                                                                                          static OccupancyDetected: typeof OccupancyDetected;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property On

                                                                                                                                          static On: typeof On;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property OperatingStateResponse

                                                                                                                                          static OperatingStateResponse: typeof OperatingStateResponse;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property OpticalZoom

                                                                                                                                          static OpticalZoom: typeof OpticalZoom;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property OutletInUse

                                                                                                                                          static OutletInUse: typeof OutletInUse;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property OzoneDensity

                                                                                                                                          static OzoneDensity: typeof OzoneDensity;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property PairingFeatures

                                                                                                                                          static PairingFeatures: typeof PairingFeatures;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property PairSetup

                                                                                                                                          static PairSetup: typeof PairSetup;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property PairVerify

                                                                                                                                          static PairVerify: typeof PairVerify;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property PasswordSetting

                                                                                                                                          static PasswordSetting: typeof PasswordSetting;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property PeriodicSnapshotsActive

                                                                                                                                          static PeriodicSnapshotsActive: typeof PeriodicSnapshotsActive;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property PictureMode

                                                                                                                                          static PictureMode: typeof PictureMode;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property Ping

                                                                                                                                          static Ping: typeof Ping;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property PM10Density

                                                                                                                                          static PM10Density: typeof PM10Density;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property PM2_5Density

                                                                                                                                          static PM2_5Density: typeof PM2_5Density;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property PositionState

                                                                                                                                          static PositionState: typeof PositionState;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property PowerModeSelection

                                                                                                                                          static PowerModeSelection: typeof PowerModeSelection;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property ProductData

                                                                                                                                          static ProductData: typeof ProductData;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property ProgrammableSwitchEvent

                                                                                                                                          static ProgrammableSwitchEvent: typeof ProgrammableSwitchEvent;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property ProgrammableSwitchOutputState

                                                                                                                                          static ProgrammableSwitchOutputState: typeof ProgrammableSwitchOutputState;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property ProgramMode

                                                                                                                                          static ProgramMode: typeof ProgramMode;
                                                                                                                                          • Characteristic Definitions

                                                                                                                                          property props

                                                                                                                                          props: CharacteristicProps;

                                                                                                                                            property ReceivedSignalStrengthIndication

                                                                                                                                            static ReceivedSignalStrengthIndication: typeof ReceivedSignalStrengthIndication;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property ReceiverSensitivity

                                                                                                                                            static ReceiverSensitivity: typeof ReceiverSensitivity;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property RecordingAudioActive

                                                                                                                                            static RecordingAudioActive: typeof RecordingAudioActive;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property RelativeHumidityDehumidifierThreshold

                                                                                                                                            static RelativeHumidityDehumidifierThreshold: typeof RelativeHumidityDehumidifierThreshold;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property RelativeHumidityHumidifierThreshold

                                                                                                                                            static RelativeHumidityHumidifierThreshold: typeof RelativeHumidityHumidifierThreshold;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property RelayControlPoint

                                                                                                                                            static RelayControlPoint: typeof RelayControlPoint;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property RelayEnabled

                                                                                                                                            static RelayEnabled: typeof RelayEnabled;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property RelayState

                                                                                                                                            static RelayState: typeof RelayState;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property RemainingDuration

                                                                                                                                            static RemainingDuration: typeof RemainingDuration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property RemoteKey

                                                                                                                                            static RemoteKey: typeof RemoteKey;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property ResetFilterIndication

                                                                                                                                            static ResetFilterIndication: typeof ResetFilterIndication;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property RotationDirection

                                                                                                                                            static RotationDirection: typeof RotationDirection;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property RotationSpeed

                                                                                                                                            static RotationSpeed: typeof RotationSpeed;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property RouterStatus

                                                                                                                                            static RouterStatus: typeof RouterStatus;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property Saturation

                                                                                                                                            static Saturation: typeof Saturation;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SecuritySystemAlarmType

                                                                                                                                            static SecuritySystemAlarmType: typeof SecuritySystemAlarmType;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SecuritySystemCurrentState

                                                                                                                                            static SecuritySystemCurrentState: typeof SecuritySystemCurrentState;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SecuritySystemTargetState

                                                                                                                                            static SecuritySystemTargetState: typeof SecuritySystemTargetState;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SelectedAudioStreamConfiguration

                                                                                                                                            static SelectedAudioStreamConfiguration: typeof SelectedAudioStreamConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SelectedCameraRecordingConfiguration

                                                                                                                                            static SelectedCameraRecordingConfiguration: typeof SelectedCameraRecordingConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SelectedDiagnosticsModes

                                                                                                                                            static SelectedDiagnosticsModes: typeof SelectedDiagnosticsModes;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SelectedRTPStreamConfiguration

                                                                                                                                            static SelectedRTPStreamConfiguration: typeof SelectedRTPStreamConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SelectedSleepConfiguration

                                                                                                                                            static SelectedSleepConfiguration: typeof SelectedSleepConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SerialNumber

                                                                                                                                            static SerialNumber: typeof SerialNumber;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property ServiceLabelIndex

                                                                                                                                            static ServiceLabelIndex: typeof ServiceLabelIndex;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property ServiceLabelNamespace

                                                                                                                                            static ServiceLabelNamespace: typeof ServiceLabelNamespace;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SetDuration

                                                                                                                                            static SetDuration: typeof SetDuration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SetupDataStreamTransport

                                                                                                                                            static SetupDataStreamTransport: typeof SetupDataStreamTransport;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SetupEndpoints

                                                                                                                                            static SetupEndpoints: typeof SetupEndpoints;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SetupTransferTransport

                                                                                                                                            static SetupTransferTransport: typeof SetupTransferTransport;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SignalToNoiseRatio

                                                                                                                                            static SignalToNoiseRatio: typeof SignalToNoiseRatio;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SiriEnable

                                                                                                                                            static SiriEnable: typeof SiriEnable;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SiriEndpointSessionStatus

                                                                                                                                            static SiriEndpointSessionStatus: typeof SiriEndpointSessionStatus;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SiriEngineVersion

                                                                                                                                            static SiriEngineVersion: typeof SiriEngineVersion;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SiriInputType

                                                                                                                                            static SiriInputType: typeof SiriInputType;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SiriLightOnUse

                                                                                                                                            static SiriLightOnUse: typeof SiriLightOnUse;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SiriListening

                                                                                                                                            static SiriListening: typeof SiriListening;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SiriTouchToUse

                                                                                                                                            static SiriTouchToUse: typeof SiriTouchToUse;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SlatType

                                                                                                                                            static SlatType: typeof SlatType;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SleepDiscoveryMode

                                                                                                                                            static SleepDiscoveryMode: typeof SleepDiscoveryMode;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SleepInterval

                                                                                                                                            static SleepInterval: typeof SleepInterval;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SmokeDetected

                                                                                                                                            static SmokeDetected: typeof SmokeDetected;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SoftwareRevision

                                                                                                                                            static SoftwareRevision: typeof SoftwareRevision;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property StagedFirmwareVersion

                                                                                                                                            static StagedFirmwareVersion: typeof StagedFirmwareVersion;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property StatusActive

                                                                                                                                            static StatusActive: typeof StatusActive;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property statusCode

                                                                                                                                            statusCode: HAPStatus;

                                                                                                                                            property StatusFault

                                                                                                                                            static StatusFault: typeof StatusFault;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property StatusJammed

                                                                                                                                            static StatusJammed: typeof StatusJammed;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property StatusLowBattery

                                                                                                                                            static StatusLowBattery: typeof StatusLowBattery;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property StatusTampered

                                                                                                                                            static StatusTampered: typeof StatusTampered;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property StreamingStatus

                                                                                                                                            static StreamingStatus: typeof StreamingStatus;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SulphurDioxideDensity

                                                                                                                                            static SulphurDioxideDensity: typeof SulphurDioxideDensity;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedAssetTypes

                                                                                                                                            static SupportedAssetTypes: typeof SupportedAssetTypes;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedAudioRecordingConfiguration

                                                                                                                                            static SupportedAudioRecordingConfiguration: typeof SupportedAudioRecordingConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedAudioStreamConfiguration

                                                                                                                                            static SupportedAudioStreamConfiguration: typeof SupportedAudioStreamConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedCameraRecordingConfiguration

                                                                                                                                            static SupportedCameraRecordingConfiguration: typeof SupportedCameraRecordingConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedCharacteristicValueTransitionConfiguration

                                                                                                                                            static SupportedCharacteristicValueTransitionConfiguration: typeof SupportedCharacteristicValueTransitionConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedDataStreamTransportConfiguration

                                                                                                                                            static SupportedDataStreamTransportConfiguration: typeof SupportedDataStreamTransportConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedDiagnosticsModes

                                                                                                                                            static SupportedDiagnosticsModes: typeof SupportedDiagnosticsModes;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedDiagnosticsSnapshot

                                                                                                                                            static SupportedDiagnosticsSnapshot: typeof SupportedDiagnosticsSnapshot;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedFirmwareUpdateConfiguration

                                                                                                                                            static SupportedFirmwareUpdateConfiguration: typeof SupportedFirmwareUpdateConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedMetrics

                                                                                                                                            static SupportedMetrics: typeof SupportedMetrics;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedRouterConfiguration

                                                                                                                                            static SupportedRouterConfiguration: typeof SupportedRouterConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedRTPConfiguration

                                                                                                                                            static SupportedRTPConfiguration: typeof SupportedRTPConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedSleepConfiguration

                                                                                                                                            static SupportedSleepConfiguration: typeof SupportedSleepConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedTransferTransportConfiguration

                                                                                                                                            static SupportedTransferTransportConfiguration: typeof SupportedTransferTransportConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedVideoRecordingConfiguration

                                                                                                                                            static SupportedVideoRecordingConfiguration: typeof SupportedVideoRecordingConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SupportedVideoStreamConfiguration

                                                                                                                                            static SupportedVideoStreamConfiguration: typeof SupportedVideoStreamConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property SwingMode

                                                                                                                                            static SwingMode: typeof SwingMode;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TapType

                                                                                                                                            static TapType: typeof TapType;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetAirPurifierState

                                                                                                                                            static TargetAirPurifierState: typeof TargetAirPurifierState;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetControlList

                                                                                                                                            static TargetControlList: typeof TargetControlList;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetControlSupportedConfiguration

                                                                                                                                            static TargetControlSupportedConfiguration: typeof TargetControlSupportedConfiguration;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetDoorState

                                                                                                                                            static TargetDoorState: typeof TargetDoorState;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetFanState

                                                                                                                                            static TargetFanState: typeof TargetFanState;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetHeaterCoolerState

                                                                                                                                            static TargetHeaterCoolerState: typeof TargetHeaterCoolerState;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetHeatingCoolingState

                                                                                                                                            static TargetHeatingCoolingState: typeof TargetHeatingCoolingState;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetHorizontalTiltAngle

                                                                                                                                            static TargetHorizontalTiltAngle: typeof TargetHorizontalTiltAngle;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetHumidifierDehumidifierState

                                                                                                                                            static TargetHumidifierDehumidifierState: typeof TargetHumidifierDehumidifierState;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetMediaState

                                                                                                                                            static TargetMediaState: typeof TargetMediaState;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetPosition

                                                                                                                                            static TargetPosition: typeof TargetPosition;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetRelativeHumidity

                                                                                                                                            static TargetRelativeHumidity: typeof TargetRelativeHumidity;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetTemperature

                                                                                                                                            static TargetTemperature: typeof TargetTemperature;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetTiltAngle

                                                                                                                                            static TargetTiltAngle: typeof TargetTiltAngle;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetVerticalTiltAngle

                                                                                                                                            static TargetVerticalTiltAngle: typeof TargetVerticalTiltAngle;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TargetVisibilityState

                                                                                                                                            static TargetVisibilityState: typeof TargetVisibilityState;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TemperatureDisplayUnits

                                                                                                                                            static TemperatureDisplayUnits: typeof TemperatureDisplayUnits;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property ThirdPartyCameraActive

                                                                                                                                            static ThirdPartyCameraActive: typeof ThirdPartyCameraActive;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property ThreadControlPoint

                                                                                                                                            static ThreadControlPoint: typeof ThreadControlPoint;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property ThreadNodeCapabilities

                                                                                                                                            static ThreadNodeCapabilities: typeof ThreadNodeCapabilities;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property ThreadOpenThreadVersion

                                                                                                                                            static ThreadOpenThreadVersion: typeof ThreadOpenThreadVersion;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property ThreadStatus

                                                                                                                                            static ThreadStatus: typeof ThreadStatus;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property Token

                                                                                                                                            static Token: typeof Token;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TransmitPower

                                                                                                                                            static TransmitPower: typeof TransmitPower;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TunnelConnectionTimeout

                                                                                                                                            static TunnelConnectionTimeout: typeof TunnelConnectionTimeout;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TunneledAccessoryAdvertising

                                                                                                                                            static TunneledAccessoryAdvertising: typeof TunneledAccessoryAdvertising;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TunneledAccessoryConnected

                                                                                                                                            static TunneledAccessoryConnected: typeof TunneledAccessoryConnected;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property TunneledAccessoryStateNumber

                                                                                                                                            static TunneledAccessoryStateNumber: typeof TunneledAccessoryStateNumber;
                                                                                                                                            • Characteristic Definitions

                                                                                                                                            property UUID

                                                                                                                                            UUID: string;

                                                                                                                                              property value

                                                                                                                                              value: CharacteristicValue;

                                                                                                                                                property ValveType

                                                                                                                                                static ValveType: typeof ValveType;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property Version

                                                                                                                                                static Version: typeof Version;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property VideoAnalysisActive

                                                                                                                                                static VideoAnalysisActive: typeof VideoAnalysisActive;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property VOCDensity

                                                                                                                                                static VOCDensity: typeof VOCDensity;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property Volume

                                                                                                                                                static Volume: typeof Volume;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property VolumeControlType

                                                                                                                                                static VolumeControlType: typeof VolumeControlType;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property VolumeSelector

                                                                                                                                                static VolumeSelector: typeof VolumeSelector;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property WakeConfiguration

                                                                                                                                                static WakeConfiguration: typeof WakeConfiguration;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property WANConfigurationList

                                                                                                                                                static WANConfigurationList: typeof WANConfigurationList;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property WANStatusList

                                                                                                                                                static WANStatusList: typeof WANStatusList;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property WaterLevel

                                                                                                                                                static WaterLevel: typeof WaterLevel;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property WiFiCapabilities

                                                                                                                                                static WiFiCapabilities: typeof WiFiCapabilities;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property WiFiConfigurationControl

                                                                                                                                                static WiFiConfigurationControl: typeof WiFiConfigurationControl;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                property WiFiSatelliteStatus

                                                                                                                                                static WiFiSatelliteStatus: typeof WiFiSatelliteStatus;
                                                                                                                                                • Characteristic Definitions

                                                                                                                                                method deserialize

                                                                                                                                                static deserialize: (json: SerializedCharacteristic) => Characteristic;
                                                                                                                                                • Deserialize characteristic from json string.

                                                                                                                                                  Parameter json

                                                                                                                                                  Json string representing a characteristic. used to recreate characteristic from disk

                                                                                                                                                method getDefaultValue

                                                                                                                                                protected getDefaultValue: () => Nullable<CharacteristicValue>;

                                                                                                                                                  method handleGetRequest

                                                                                                                                                  handleGetRequest: (
                                                                                                                                                  connection?: HAPConnection,
                                                                                                                                                  context?: CharacteristicContext
                                                                                                                                                  ) => Promise<Nullable<CharacteristicValue>>;
                                                                                                                                                  • Called when a HAP requests wants to know the current value of the characteristic.

                                                                                                                                                    Parameter connection

                                                                                                                                                    The HAP connection from which the request originated from.

                                                                                                                                                    Parameter context

                                                                                                                                                    Deprecated parameter. There for backwards compatibility. Used by the Accessory to load the characteristic value

                                                                                                                                                  method handleSetRequest

                                                                                                                                                  handleSetRequest: (
                                                                                                                                                  value: CharacteristicValue,
                                                                                                                                                  connection?: HAPConnection,
                                                                                                                                                  context?: CharacteristicContext
                                                                                                                                                  ) => Promise<CharacteristicValue | void>;
                                                                                                                                                  • Called when a HAP requests update the current value of the characteristic.

                                                                                                                                                    Parameter value

                                                                                                                                                    The updated value

                                                                                                                                                    Parameter connection

                                                                                                                                                    The connection from which the request originated from

                                                                                                                                                    Parameter context

                                                                                                                                                    Deprecated parameter. There for backwards compatibility.

                                                                                                                                                    Returns

                                                                                                                                                    Promise resolve to void in normal operation. When characteristic supports write-response, HAP requests a write-response and the set handler returns a write-response value, the respective write response value is resolved.

                                                                                                                                                  method internalHAPRepresentation

                                                                                                                                                  internalHAPRepresentation: () => CharacteristicJsonObject;
                                                                                                                                                  • Returns a JSON representation of this characteristic without the value. used to generate the config hash

                                                                                                                                                  method onGet

                                                                                                                                                  onGet: (handler: CharacteristicGetHandler) => Characteristic;
                                                                                                                                                  • Accepts a function that will be called to retrieve the current value of a Characteristic. The function must return a valid Characteristic value for the Characteristic type. May optionally return a promise.

                                                                                                                                                    Parameter handler

                                                                                                                                                    Example 1

                                                                                                                                                    Characteristic.onGet(async () => {
                                                                                                                                                    return true;
                                                                                                                                                    });

                                                                                                                                                  method onSet

                                                                                                                                                  onSet: (handler: CharacteristicSetHandler) => Characteristic;
                                                                                                                                                  • Accepts a function that will be called when setting the value of a Characteristic. If the characteristic supports Perms.WRITE_RESPONSE and the request requests a write-response value, the returned value will be used. May optionally return a promise.

                                                                                                                                                    Parameter handler

                                                                                                                                                    Example 1

                                                                                                                                                    Characteristic.onSet(async (value: CharacteristicValue) => {
                                                                                                                                                    console.log(value);
                                                                                                                                                    });

                                                                                                                                                  method removeAllListeners

                                                                                                                                                  removeAllListeners: (event?: string | symbol) => this;
                                                                                                                                                  • Parameter event

                                                                                                                                                  method removeOnGet

                                                                                                                                                  removeOnGet: () => Characteristic;

                                                                                                                                                  method removeOnSet

                                                                                                                                                  removeOnSet: () => Characteristic;

                                                                                                                                                  method replaceBy

                                                                                                                                                  replaceBy: (characteristic: Characteristic) => void;
                                                                                                                                                  • Parameter characteristic

                                                                                                                                                  method sendEventNotification

                                                                                                                                                  sendEventNotification: (
                                                                                                                                                  value: CharacteristicValue,
                                                                                                                                                  context?: CharacteristicContext
                                                                                                                                                  ) => Characteristic;

                                                                                                                                                  method serialize

                                                                                                                                                  static serialize: (characteristic: Characteristic) => SerializedCharacteristic;
                                                                                                                                                  • Serialize characteristic into json string.

                                                                                                                                                    Parameter characteristic

                                                                                                                                                    Characteristic object. used to store characteristic on disk

                                                                                                                                                  method setProps

                                                                                                                                                  setProps: (props: PartialAllowingNull<CharacteristicProps>) => Characteristic;
                                                                                                                                                  • Updates the properties of this characteristic. Properties passed via the parameter will be set. Any parameter set to null will be deleted. See CharacteristicProps.

                                                                                                                                                    Parameter props

                                                                                                                                                    Partial properties object with the desired updates.

                                                                                                                                                  method setupAdditionalAuthorization

                                                                                                                                                  setupAdditionalAuthorization: (handler: AdditionalAuthorizationHandler) => void;
                                                                                                                                                  • This method can be used to set up additional authorization for a characteristic. For one, it adds the Perms.ADDITIONAL_AUTHORIZATION permission to the characteristic (if it wasn't already) to signal support for additional authorization to HomeKit. Additionally, an AdditionalAuthorizationHandler is set up which is called before a write request is performed.

                                                                                                                                                    Additional Authorization Data can be added to SET request via a custom iOS App. Before hap-nodejs executes a write request it will call the AdditionalAuthorizationHandler with 'authData' supplied in the write request. The 'authData' is a base64 encoded string (or undefined if no authData was supplied). The AdditionalAuthorizationHandler must then return true or false to indicate if the write request is authorized and should be accepted.

                                                                                                                                                    Parameter handler

                                                                                                                                                    Handler called to check additional authorization data.

                                                                                                                                                  method setValue

                                                                                                                                                  setValue: {
                                                                                                                                                  (value: CharacteristicValue): Characteristic;
                                                                                                                                                  (error: HapStatusError | Error): Characteristic;
                                                                                                                                                  (value: CharacteristicValue, context?: any): Characteristic;
                                                                                                                                                  };
                                                                                                                                                  • This updates the value by calling the CharacteristicEventTypes.SET event handler associated with the characteristic. This acts the same way as when a HomeKit controller sends a /characteristics request to update the characteristic. An event notification will be sent to all connected HomeKit controllers which are registered to receive event notifications for this characteristic.

                                                                                                                                                    This method behaves like a updateValue call with the addition that the own CharacteristicEventTypes.SET event handler is called.

                                                                                                                                                    Parameter value

                                                                                                                                                    The new value.

                                                                                                                                                    Note: If you don't want the CharacteristicEventTypes.SET to be called, refer to updateValue.

                                                                                                                                                  • Sets the state of the characteristic to an errored state.

                                                                                                                                                    If a onGet or CharacteristicEventTypes.GET handler is set up, the errored state will be ignored and the characteristic will always query the latest state by calling the provided handler.

                                                                                                                                                    If a generic error object is supplied, the characteristic tries to extract a HAPStatus code from the error message string. If not possible a generic HAPStatus.SERVICE_COMMUNICATION_FAILURE will be used. If the supplied error object is an instance of HapStatusError the corresponding status will be used.

                                                                                                                                                    This doesn't call any registered onSet or CharacteristicEventTypes.SET handlers.

                                                                                                                                                    Have a look at the guide for more information on how to present erroneous state to the user.

                                                                                                                                                    Parameter error

                                                                                                                                                    The error object

                                                                                                                                                    Note: Erroneous state is never **pushed** to the client side. Only, if the HomeKit client requests the current state of the Characteristic, the corresponding HapStatusError is returned. As described above, any onGet or CharacteristicEventTypes.GET handlers have precedence.

                                                                                                                                                  • This updates the value by calling the CharacteristicEventTypes.SET event handler associated with the characteristic. This acts the same way as when a HomeKit controller sends a /characteristics request to update the characteristic. An event notification will be sent to all connected HomeKit controllers which are registered to receive event notifications for this characteristic.

                                                                                                                                                    This method behaves like a updateValue call with the addition that the own CharacteristicEventTypes.SET event handler is called.

                                                                                                                                                    Parameter value

                                                                                                                                                    The new value.

                                                                                                                                                    Parameter context

                                                                                                                                                    Passed to the CharacteristicEventTypes.SET and CharacteristicEventTypes.CHANGE event handler.

                                                                                                                                                    Note: If you don't want the CharacteristicEventTypes.SET to be called, refer to updateValue.

                                                                                                                                                  method subscribe

                                                                                                                                                  subscribe: () => void;
                                                                                                                                                  • Called once a HomeKit controller subscribes to events of this characteristic.

                                                                                                                                                  method toHAP

                                                                                                                                                  toHAP: (
                                                                                                                                                  connection: HAPConnection,
                                                                                                                                                  contactGetHandlers?: boolean
                                                                                                                                                  ) => Promise<CharacteristicJsonObject>;
                                                                                                                                                  • Returns a JSON representation of this characteristic suitable for delivering to HAP clients. used to generate response to /accessories query

                                                                                                                                                  method unsubscribe

                                                                                                                                                  unsubscribe: () => void;
                                                                                                                                                  • Called once a HomeKit controller unsubscribe to events of this characteristic or a HomeKit controller which was subscribed to this characteristic disconnects.

                                                                                                                                                  method updateValue

                                                                                                                                                  updateValue: {
                                                                                                                                                  (
                                                                                                                                                  value: Nullable<CharacteristicValue> | Error | HapStatusError
                                                                                                                                                  ): Characteristic;
                                                                                                                                                  (value: CharacteristicValue): Characteristic;
                                                                                                                                                  (error: HapStatusError | Error): Characteristic;
                                                                                                                                                  (value: CharacteristicValue, context?: any): Characteristic;
                                                                                                                                                  };
                                                                                                                                                  • This updates the value of the characteristic. If the value changed, an event notification will be sent to all connected HomeKit controllers which are registered to receive event notifications for this characteristic.

                                                                                                                                                    Parameter value

                                                                                                                                                    The new value or a Error or HapStatusError.

                                                                                                                                                    Note: Refer to the respective overloads for CharacteristicValue or HapStatusError for respective documentation.

                                                                                                                                                  • This updates the value of the characteristic. If the value changed, an event notification will be sent to all connected HomeKit controllers which are registered to receive event notifications for this characteristic.

                                                                                                                                                    Parameter value

                                                                                                                                                    The new value.

                                                                                                                                                  • Sets the state of the characteristic to an errored state. If a onGet or CharacteristicEventTypes.GET handler is set up, the errored state will be ignored and the characteristic will always query the latest state by calling the provided handler.

                                                                                                                                                    If a generic error object is supplied, the characteristic tries to extract a HAPStatus code from the error message string. If not possible a generic HAPStatus.SERVICE_COMMUNICATION_FAILURE will be used. If the supplied error object is an instance of HapStatusError the corresponding status will be used.

                                                                                                                                                    Have a look at the guide for more information on how to present erroneous state to the user.

                                                                                                                                                    Parameter error

                                                                                                                                                    The error object

                                                                                                                                                    Note: Erroneous state is never **pushed** to the client side. Only, if the HomeKit client requests the current state of the Characteristic, the corresponding HapStatusError is returned. As described above, any onGet or CharacteristicEventTypes.GET handlers have precedence.

                                                                                                                                                  • This updates the value of the characteristic. If the value changed, an event notification will be sent to all connected HomeKit controllers which are registered to receive event notifications for this characteristic.

                                                                                                                                                    Parameter value

                                                                                                                                                    The new value.

                                                                                                                                                    Parameter context

                                                                                                                                                    Passed to the CharacteristicEventTypes.CHANGE event handler.

                                                                                                                                                  method validValuesIterator

                                                                                                                                                  validValuesIterator: () => Iterable<number>;
                                                                                                                                                  • This method can be used to gain an Iterator to loop over all valid values defined for this characteristic.

                                                                                                                                                    The range of valid values can be defined using three different ways via the CharacteristicProps object (set via the setProps method): * First method is to specifically list every valid value inside CharacteristicProps.validValues * Second you can specify a range via CharacteristicProps.minValue and CharacteristicProps.maxValue (with optionally defining CharacteristicProps.minStep) * And lastly you can specify a range via CharacteristicProps.validValueRanges * Implicitly a valid value range is predefined for characteristics with Format Formats.UINT8, Formats.UINT16, Formats.UINT32 and Formats.UINT64: starting by zero to their respective maximum number

                                                                                                                                                    The method will automatically detect which type of valid values definition is used and provide the correct Iterator for that case.

                                                                                                                                                    Note: This method is (obviously) only valid for numeric characteristics.

                                                                                                                                                    Example 1

                                                                                                                                                    // use the iterator to loop over every valid value...
                                                                                                                                                    for (const value of characteristic.validValuesIterator()) {
                                                                                                                                                    // Insert logic to run for every
                                                                                                                                                    }
                                                                                                                                                    // ... or collect them in an array for storage or manipulation
                                                                                                                                                    const validValues = Array.from(characteristic.validValuesIterator());

                                                                                                                                                  class ColorUtils

                                                                                                                                                  class ColorUtils {}
                                                                                                                                                  • Utils

                                                                                                                                                  method colorTemperatureToHueAndSaturation

                                                                                                                                                  static colorTemperatureToHueAndSaturation: (
                                                                                                                                                  colorTemperature: number,
                                                                                                                                                  roundResults?: boolean
                                                                                                                                                  ) => { saturation: number; hue: number };
                                                                                                                                                  • Returns the Hue and Saturation representation of the given color temperature in mired.

                                                                                                                                                    Parameter colorTemperature

                                                                                                                                                    The color temperature in mired.

                                                                                                                                                    Parameter roundResults

                                                                                                                                                    The lookup table has a precision of .1 decimal places. The given characteristics only have a step value of 1. Thus, the method will round the results by default to an integer value. This can be turned off using this option.

                                                                                                                                                    Returns

                                                                                                                                                    An number array of length 2 with the first element being the saturation and the second argument being the hue.

                                                                                                                                                  class DataStreamConnection

                                                                                                                                                  class DataStreamConnection extends EventEmitter {}
                                                                                                                                                  • DataStream connection which holds any necessary state information, encryption and decryption keys, manages protocol handlers and also handles sending and receiving of data stream frames.

                                                                                                                                                    HomeKit Data Streams (HDS)

                                                                                                                                                  constructor

                                                                                                                                                  constructor(socket: Socket);

                                                                                                                                                    property remoteAddress

                                                                                                                                                    readonly remoteAddress: string;

                                                                                                                                                      method addProtocolHandler

                                                                                                                                                      addProtocolHandler: (
                                                                                                                                                      protocol: string | Protocols,
                                                                                                                                                      protocolHandler: DataStreamProtocolHandler
                                                                                                                                                      ) => boolean;
                                                                                                                                                      • Registers a new protocol handler to handle incoming messages. The same protocol cannot be registered multiple times.

                                                                                                                                                        Parameter protocol

                                                                                                                                                        name of the protocol to register the handler for

                                                                                                                                                        Parameter protocolHandler

                                                                                                                                                        object to be registered as protocol handler

                                                                                                                                                      method close

                                                                                                                                                      close: () => void;

                                                                                                                                                        method decryptHDSFrame

                                                                                                                                                        decryptHDSFrame: (frame: HDSFrame, keyOverwrite?: Buffer) => boolean;
                                                                                                                                                        • file-private API

                                                                                                                                                        method isConsideredClosed

                                                                                                                                                        isConsideredClosed: () => boolean;

                                                                                                                                                          method removeProtocolHandler

                                                                                                                                                          removeProtocolHandler: (
                                                                                                                                                          protocol: string | Protocols,
                                                                                                                                                          protocolHandler: DataStreamProtocolHandler
                                                                                                                                                          ) => void;
                                                                                                                                                          • Removes a protocol handler if it is registered.

                                                                                                                                                            Parameter protocol

                                                                                                                                                            name of the protocol to unregister the handler for

                                                                                                                                                            Parameter protocolHandler

                                                                                                                                                            object which will be unregistered

                                                                                                                                                          method sendEvent

                                                                                                                                                          sendEvent: (
                                                                                                                                                          protocol: string | Protocols,
                                                                                                                                                          event: string | Topics,
                                                                                                                                                          message?: Record<any, any>
                                                                                                                                                          ) => void;
                                                                                                                                                          • Sends a new event message to the connected client.

                                                                                                                                                            Parameter protocol

                                                                                                                                                            name of the protocol

                                                                                                                                                            Parameter event

                                                                                                                                                            name of the event (also referred to as topic. See Topics for some known ones)

                                                                                                                                                            Parameter message

                                                                                                                                                            message dictionary which gets sent along the event

                                                                                                                                                          method sendRequest

                                                                                                                                                          sendRequest: (
                                                                                                                                                          protocol: string | Protocols,
                                                                                                                                                          request: string | Topics,
                                                                                                                                                          message: Record<any, any> | undefined,
                                                                                                                                                          callback: ResponseHandler
                                                                                                                                                          ) => void;
                                                                                                                                                          • Sends a new request message to the connected client.

                                                                                                                                                            Parameter protocol

                                                                                                                                                            name of the protocol

                                                                                                                                                            Parameter request

                                                                                                                                                            name of the request (also referred to as topic. See Topics for some known ones)

                                                                                                                                                            Parameter message

                                                                                                                                                            message dictionary which gets sent along the request

                                                                                                                                                            Parameter callback

                                                                                                                                                            handler which gets supplied with an error object if the response didn't arrive in time or the status and the message dictionary from the response

                                                                                                                                                          method sendResponse

                                                                                                                                                          sendResponse: (
                                                                                                                                                          protocol: string | Protocols,
                                                                                                                                                          response: string | Topics,
                                                                                                                                                          id: number,
                                                                                                                                                          status?: HDSStatus,
                                                                                                                                                          message?: Record<any, any>
                                                                                                                                                          ) => void;
                                                                                                                                                          • Send a new response message to a received request message to the client.

                                                                                                                                                            Parameter protocol

                                                                                                                                                            name of the protocol

                                                                                                                                                            Parameter response

                                                                                                                                                            name of the response (also referred to as topic. See Topics for some known ones)

                                                                                                                                                            Parameter id

                                                                                                                                                            id from the request, to associate the response to the request

                                                                                                                                                            Parameter status

                                                                                                                                                            status indication if the request was successful. A status of zero indicates success.

                                                                                                                                                            Parameter message

                                                                                                                                                            message dictionary which gets sent along the response

                                                                                                                                                          class DataStreamManagement

                                                                                                                                                          class DataStreamManagement {}
                                                                                                                                                          • HomeKit Data Streams (HDS)

                                                                                                                                                          constructor

                                                                                                                                                          constructor(service?: DataStreamTransportManagement);

                                                                                                                                                            method destroy

                                                                                                                                                            destroy: () => void;

                                                                                                                                                              method getService

                                                                                                                                                              getService: () => DataStreamTransportManagement;
                                                                                                                                                              • Returns

                                                                                                                                                                the DataStreamTransportManagement service

                                                                                                                                                              method onEventMessage

                                                                                                                                                              onEventMessage: (
                                                                                                                                                              protocol: string | Protocols,
                                                                                                                                                              event: string | Topics,
                                                                                                                                                              handler: GlobalEventHandler
                                                                                                                                                              ) => this;
                                                                                                                                                              • Registers a new event handler to handle incoming event messages. The handler is only called for a connection if for the give protocol no ProtocolHandler was registered on the connection level.

                                                                                                                                                                Parameter protocol

                                                                                                                                                                name of the protocol to register the handler for

                                                                                                                                                                Parameter event

                                                                                                                                                                name of the event (also referred to as topic. See Topics for some known ones)

                                                                                                                                                                Parameter handler

                                                                                                                                                                function to be called for every occurring event

                                                                                                                                                              method onRequestMessage

                                                                                                                                                              onRequestMessage: (
                                                                                                                                                              protocol: string | Protocols,
                                                                                                                                                              request: string | Topics,
                                                                                                                                                              handler: GlobalRequestHandler
                                                                                                                                                              ) => this;
                                                                                                                                                              • Registers a new request handler to handle incoming request messages. The handler is only called for a connection if for the give protocol no ProtocolHandler was registered on the connection level.

                                                                                                                                                                Parameter protocol

                                                                                                                                                                name of the protocol to register the handler for

                                                                                                                                                                Parameter request

                                                                                                                                                                name of the request (also referred to as topic. See Topics for some known ones)

                                                                                                                                                                Parameter handler

                                                                                                                                                                function to be called for every occurring request

                                                                                                                                                              method onServerEvent

                                                                                                                                                              onServerEvent: (
                                                                                                                                                              event: DataStreamServerEvent,
                                                                                                                                                              listener: (connection: DataStreamConnection) => void
                                                                                                                                                              ) => this;
                                                                                                                                                              • Forwards any event listener for an DataStreamServer event to the DataStreamServer instance

                                                                                                                                                                Parameter event

                                                                                                                                                                the event to register for

                                                                                                                                                                Parameter listener

                                                                                                                                                                the event handler

                                                                                                                                                              method removeEventHandler

                                                                                                                                                              removeEventHandler: (
                                                                                                                                                              protocol: string | Protocols,
                                                                                                                                                              event: string | Topics,
                                                                                                                                                              handler: GlobalEventHandler
                                                                                                                                                              ) => this;
                                                                                                                                                              • Removes a registered event handler.

                                                                                                                                                                Parameter protocol

                                                                                                                                                                name of the protocol to unregister the handler for

                                                                                                                                                                Parameter event

                                                                                                                                                                name of the event (also referred to as topic. See Topics for some known ones)

                                                                                                                                                                Parameter handler

                                                                                                                                                                registered event handler

                                                                                                                                                              method removeRequestHandler