interface ScenesManagementBehavior {
    [reference]: Datasource<StateType>;
    agent: Agent;
    cluster: never;
    context: ActionContext;
    endpoint: Endpoint<Empty>;
    env: Environment;
    events: EventEmitter & Omit<ClusterEvents<Of<{
        attributes: {};
        commands: {};
        events: {};
        id: 0;
        name: "Unknown";
        revision: 0;
    }>, typeof ClusterBehavior>, never> & {
        fabricSceneInfo$Changing: ClusterEvents.AttributeObservable<FabricScopedAttribute<TypeFromFields<{
            currentGroup: FieldType<GroupId>;
            currentScene: FieldType<number>;
            fabricIndex: FieldType<FabricIndex>;
            remainingCapacity: FieldType<number>;
            sceneCount: FieldType<number>;
            sceneValid: FieldType<boolean>;
        }>[], any>>;
        sceneTableSize$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    } & {
        lastConfiguredBy$Changing: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<null | NodeId, any>>;
    } & {
        fabricSceneInfo$Changed: ClusterEvents.AttributeObservable<FabricScopedAttribute<TypeFromFields<{
            currentGroup: FieldType<GroupId>;
            currentScene: FieldType<number>;
            fabricIndex: FieldType<FabricIndex>;
            remainingCapacity: FieldType<number>;
            sceneCount: FieldType<number>;
            sceneValid: FieldType<boolean>;
        }>[], any>>;
        sceneTableSize$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    } & {
        lastConfiguredBy$Changed: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<null | NodeId, any>>;
    } & {} & {};
    features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
        sceneNames: BitFlag;
    }>;
    session: SecureSession;
    state: Omit<ClusterState.Type<Of<{
        attributes: {};
        commands: {};
        events: {};
        id: 0;
        name: "Unknown";
        revision: 0;
    }>, typeof ClusterBehavior>, never> & {
        fabricSceneInfo: TypeFromFields<{
            currentGroup: FieldType<GroupId>;
            currentScene: FieldType<number>;
            fabricIndex: FieldType<FabricIndex>;
            remainingCapacity: FieldType<number>;
            sceneCount: FieldType<number>;
            sceneValid: FieldType<boolean>;
        }>[];
    } & {
        lastConfiguredBy?: null | NodeId;
    } & {
        sceneTableSize: number;
    } & {};
    [asyncDispose](): MaybePromise;
    addScene(request: ScenesManagement.AddSceneRequest): MaybePromise<ScenesManagement.AddSceneResponse>;
    asAdmin(fn: (() => void)): void;
    assertAttributeEnabled<This, K>(this: This, attributeName: K): void;
    callback<A, R>(reactor: Reactor<A, R>, options?: Reactor.Options): ((...args: A) => undefined | R);
    copyScene(request: ScenesManagement.CopySceneRequest): MaybePromise<ScenesManagement.CopySceneResponse>;
    getSceneMembership(request: ScenesManagement.GetSceneMembershipRequest): MaybePromise<ScenesManagement.GetSceneMembershipResponse>;
    initialize(_options?: {}): MaybePromise;
    reactTo<O>(observable: O, reactor: Reactor<Parameters<O["emit"]>, ReturnType<O["emit"]>>, options?: Reactor.Options): void;
    recallScene(request: ScenesManagement.RecallSceneRequest): MaybePromise;
    removeAllScenes(request: ScenesManagement.RemoveAllScenesRequest): MaybePromise<ScenesManagement.RemoveAllScenesResponse>;
    removeScene(request: ScenesManagement.RemoveSceneRequest): MaybePromise<ScenesManagement.RemoveSceneResponse>;
    requireAttributeEnabled<This, K>(this: This, attributeName: K): Exclude<This["state"][K], undefined>;
    storeScene(request: ScenesManagement.StoreSceneRequest): MaybePromise<ScenesManagement.StoreSceneResponse>;
    toString(): string;
    viewScene(request: ScenesManagement.ViewSceneRequest): MaybePromise<ScenesManagement.ViewSceneResponse>;
    State: any;
}

Hierarchy (view full)

Properties

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

The implemented cluster.

context: ActionContext
endpoint: Endpoint<Empty>
events: EventEmitter & Omit<ClusterEvents<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior>, never> & {
    fabricSceneInfo$Changing: ClusterEvents.AttributeObservable<FabricScopedAttribute<TypeFromFields<{
        currentGroup: FieldType<GroupId>;
        currentScene: FieldType<number>;
        fabricIndex: FieldType<FabricIndex>;
        remainingCapacity: FieldType<number>;
        sceneCount: FieldType<number>;
        sceneValid: FieldType<boolean>;
    }>[], any>>;
    sceneTableSize$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
} & {
    lastConfiguredBy$Changing: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<null | NodeId, any>>;
} & {
    fabricSceneInfo$Changed: ClusterEvents.AttributeObservable<FabricScopedAttribute<TypeFromFields<{
        currentGroup: FieldType<GroupId>;
        currentScene: FieldType<number>;
        fabricIndex: FieldType<FabricIndex>;
        remainingCapacity: FieldType<number>;
        sceneCount: FieldType<number>;
        sceneValid: FieldType<boolean>;
    }>[], any>>;
    sceneTableSize$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
} & {
    lastConfiguredBy$Changed: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<null | NodeId, any>>;
} & {} & {}

Access the behavior's events.

features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
    sceneNames: BitFlag;
}>

Supported features as a flag object.

session: SecureSession
state: Omit<ClusterState.Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior>, never> & {
    fabricSceneInfo: TypeFromFields<{
        currentGroup: FieldType<GroupId>;
        currentScene: FieldType<number>;
        fabricIndex: FieldType<FabricIndex>;
        remainingCapacity: FieldType<number>;
        sceneCount: FieldType<number>;
        sceneValid: FieldType<boolean>;
    }>[];
} & {
    lastConfiguredBy?: null | NodeId;
} & {
    sceneTableSize: number;
} & {}

Access the behavior's state.

Type declaration

  • ReadonlyfabricSceneInfo: TypeFromFields<{
        currentGroup: FieldType<GroupId>;
        currentScene: FieldType<number>;
        fabricIndex: FieldType<FabricIndex>;
        remainingCapacity: FieldType<number>;
        sceneCount: FieldType<number>;
        sceneValid: FieldType<boolean>;
    }>[]

    Indicates a list of fabric scoped information about scenes on this endpoint.

    The number of list entries for this attribute shall NOT exceed the number of supported fabrics by the device.

    MatterSpecification.v13.Cluster § 1.4.8.3

Type declaration

  • Optional ReadonlylastConfiguredBy?: null | NodeId

    Indicates the Node ID of the node that last configured the Scene Table.

    The null value indicates that the server has not been configured, or that the identifier of the node that last configured the Scenes Management cluster is not known.

    The Node ID is scoped to the accessing fabric.

    MatterSpecification.v13.Cluster § 1.4.8.1

Type declaration

  • ReadonlysceneTableSize: number

    Indicates the number of entries in the Scene Table on this endpoint. This is the total across all fabrics; note that a single fabric cannot use all those entries (see Handling of fabric- scoping). The minimum size of this table, (i.e., the minimum number of scenes to support across all fabrics per endpoint) shall be 16, unless a device type in which this cluster is used, defines a larger value in the device type definition.

    MatterSpecification.v13.Cluster § 1.4.8.2

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

  • Behaviors are ephemeral and should not perform initialization in their constructor. They can override this method instead.

    This method may be synchronous or asyncronous. If asynchronous, the behavior will not be available for external use until initialization completes.

    Parameters

    • Optional_options: {}

      Returns MaybePromise

    • Install a Reactor.

      Important: The reactor MUST be a real JS function - arrow functions will not work!

      Type Parameters

      Parameters

      Returns void