Class Bridge

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.

Hierarchy

Constructors

Properties

UUID: string
_isBridge: boolean = false
aid: Nullable<number> = null
bridge?: Accessory
bridged: boolean = false
bridgedAccessories: Accessory[] = []
category: Categories = Categories.OTHER
displayName: string
lastKnownUsername?: string
reachable: boolean = true
services: Service[] = []
shouldPurgeUnusedIDs: boolean = true
Categories: typeof Categories = Categories

Deprecated

Please use the Categories const enum above.

Methods

  • Method is used to configure an old style CameraSource. The CameraSource API was fully replaced by the new Controller API used by CameraController. The CameraStreamingDelegate used by the CameraController is the equivalent to the old CameraSource.

    The new Controller API is much more refined and robust way of "grouping" services together. It especially is intended to fully support serialization/deserialization to/from persistent storage. This feature is also gained when using the old style CameraSource API. The CameraStreamingDelegate improves on the overall camera API though and provides some reworked type definitions and a refined callback interface to better signal errors to the requesting HomeKit device. It is advised to update to it.

    Full backwards compatibility is currently maintained. A legacy CameraSource will be wrapped into an Adapter. All legacy StreamControllers in the "streamControllers" property will be replaced by CameraRTPManagement instances. Any services in the "services" property which are one of the following are ignored: - CameraRTPStreamManagement - CameraOperatingMode - CameraEventRecordingManagement

    Deprecated

    please refer to the new CameraController API and configureController

    Parameters

    Returns CameraController

  • 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

    Returns Promise<void>

  • Publishes this Accessory on the local network for iOS clients to communicate with.

    Parameters

    • info: PublishInfo

      Required info for publishing.

    • Optional allowInsecureRequest: boolean

      Will allow unencrypted and unauthenticated access to the http server

    Returns Promise<void>

  • Manually purge the unused ids if you like, comes handy when you have disabled auto purge, so you can do it manually

    Returns void