Back to Homebridge

Interface DynamicPlatformPlugin

docs/interfaces/DynamicPlatformPlugin.html

2.0.22.3 KB
Original Source
  • DynamicPlatformPlugin

Interface DynamicPlatformPlugin

Platform that is able to dynamically add or remove accessories. All configured accessories are stored to disk and recreated on startup. Accessories can be added or removed by using API.registerPlatformAccessories or API.unregisterPlatformAccessories.

interface DynamicPlatformPlugin {
configureAccessory: (accessory: PlatformAccessory) => void;
configureMatterAccessory?: (accessory: MatterAccessory) => void;
}

Hierarchy

  • PlatformPlugin
    • DynamicPlatformPlugin

Index

Properties

configureAccessoryconfigureMatterAccessory?

Properties

configureAccessory

configureAccessory: (accessory: PlatformAccessory) => void

This method is called for every PlatformAccessory, which is recreated from disk on startup. It should be used to properly initialize the Accessory and setup all event handlers for all services and their characteristics.

Type Declaration

Parameters

- accessory: [PlatformAccessory](PlatformAccessory.html)

which needs to be configured

Returns void

OptionalconfigureMatterAccessory

configureMatterAccessory?: (accessory: MatterAccessory) => void

This method is called for every Matter accessory, which is recreated from cache on startup. It should be used to track cached accessories so the plugin can determine which accessories to re-register and which to remove (if they no longer exist in the external system).

This is the Matter equivalent of configureAccessory for HAP accessories.

Type Declaration

Parameters

- accessory: [MatterAccessory](MatterAccessory.html)

cached Matter accessory

Returns void

Settings

Member Visibility

  • Inherited

ThemeOSLightDark

On This Page

Properties configureAccessoryconfigureMatterAccessory