This is the default server implementation of IdentifyBehavior.

This implementation includes all features of Identify.Cluster and implements all mandatory commands. You should use IdentifyServer.with to specialize the class for the features your implementation supports. Alternatively you can extend this class and override the methods you need to change or add mandatory commands.

Beside the standard state values the following additional state values are available:

  • isIdentifying - Indicates if the device is currently identifying.

Beside the standard events the following additional events are available:

  • startIdentifying - Emitted when the device starts identifying. Use it e.g to start your own identifying logic.
  • stopIdentifying - Emitted when the device stops identifying.

Hierarchy (view full)

Constructors

Properties

[reference]: Datasource<StateType>
agent: Agent
cluster: never

The implemented cluster.

context: ActionContext
endpoint: Endpoint<Empty>
events: Events

Access the behavior's events.

features: TypeFromBitSchema<{}>

Supported features as a flag object.

internal: Internal
session: SecureSession
state: State

Access the behavior's state.

cluster: Identify.Cluster

Base cluster state include all attribute values but may be extended by subclasses.

defaults: ClusterState.Type<Identify.Cluster, Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior, IdentifyInterface>>
dependencies?: Iterable<Type, any, any>
early: boolean
ExtensionInterface: {}
id

The behavior ID for ClusterBehaviors is the name of the cluster.

name: string
schema?: Schema
supervisor: RootSupervisor
supports: ((other: Type) => boolean)

Type declaration

    • (other): boolean
    • Does this behavior support functionality of a specific implementation?

      Parameters

      Returns boolean

Methods

  • Create a generic callback function that has the same properties as a Reactor.

    Like a reactor, the callback's "this" will be bound to an active Behavior instance. Because of this: The reactor MUST be a real JS function - arrow functions will not work!

    Type Parameters

    • A extends any[]
    • R

    Parameters

    Returns ((...args: A) => undefined | R)

      • (...args): undefined | R
      • Parameters

        • Rest...args: A

        Returns undefined | R

  • This command allows the support of feedback to the user, such as a certain light effect. It is used to allow an implementation to provide visual feedback to the user under certain circumstances such as a color light turning green when it has successfully connected to a network. The use of this command and the effects themselves are entirely up to the implementer to use whenever a visual feedback is useful but it is not the same as and does not replace the identify mechanism used during commissioning.

    Parameters

    Returns MaybePromise

    MatterSpecification.v13.Cluster § 1.2.6.2