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.

Properties

category: Categories
displayName: string
model: string
pairedAdminClients: number
pairedClients: Record<string, PairingInformation>
pincode: string
setupID: string
signPk: Buffer
signSk: Buffer
username: string
deviceIdPattern: RegExp = ...

Methods

  • 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.

    Parameters

    • configuration: AccessoryJsonObject[]

      The current accessory configuration.

    • OptionalcheckFirmwareIncrement: boolean

    Returns boolean

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

  • Remove a paired client from memory.

    Parameters

    • connection: HAPConnection

      the session of the connection initiated the removal of the pairing

    • username: string

    Returns void