This is the default server implementation of OccupancySensingBehavior.

Hierarchy (view full)

Constructors

Properties

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

The implemented cluster.

context: ActionContext
endpoint: Endpoint<Empty>
events: EventEmitter & Omit<Events, never> & {
    occupancy$Changing: ClusterEvents.AttributeObservable<Attribute<TypeFromPartialBitSchema<{
        occupied: BitFlag;
    }>, any>>;
    occupancySensorType$Changing: ClusterEvents.AttributeObservable<Attribute<OccupancySensing.OccupancySensorType, any>>;
    occupancySensorTypeBitmap$Changing: ClusterEvents.AttributeObservable<Attribute<TypeFromPartialBitSchema<{
        physicalContact: BitFlag;
        pir: BitFlag;
        ultrasonic: BitFlag;
    }>, any>>;
} & {
    physicalContactOccupiedToUnoccupiedDelay$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    physicalContactUnoccupiedToOccupiedDelay$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    physicalContactUnoccupiedToOccupiedThreshold$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    pirOccupiedToUnoccupiedDelay$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    pirUnoccupiedToOccupiedDelay$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    pirUnoccupiedToOccupiedThreshold$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    ultrasonicOccupiedToUnoccupiedDelay$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    ultrasonicUnoccupiedToOccupiedDelay$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    ultrasonicUnoccupiedToOccupiedThreshold$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
} & {
    occupancy$Changed: ClusterEvents.AttributeObservable<Attribute<TypeFromPartialBitSchema<{
        occupied: BitFlag;
    }>, any>>;
    occupancySensorType$Changed: ClusterEvents.AttributeObservable<Attribute<OccupancySensing.OccupancySensorType, any>>;
    occupancySensorTypeBitmap$Changed: ClusterEvents.AttributeObservable<Attribute<TypeFromPartialBitSchema<{
        physicalContact: BitFlag;
        pir: BitFlag;
        ultrasonic: BitFlag;
    }>, any>>;
} & {
    physicalContactOccupiedToUnoccupiedDelay$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    physicalContactUnoccupiedToOccupiedDelay$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    physicalContactUnoccupiedToOccupiedThreshold$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    pirOccupiedToUnoccupiedDelay$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    pirUnoccupiedToOccupiedDelay$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    pirUnoccupiedToOccupiedThreshold$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    ultrasonicOccupiedToUnoccupiedDelay$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    ultrasonicUnoccupiedToOccupiedDelay$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    ultrasonicUnoccupiedToOccupiedThreshold$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
} & {} & {}

Access the behavior's events.

features: TypeFromBitSchema<{}>

Supported features as a flag object.

session: SecureSession
state: Omit<{}, never> & {
    occupancy: TypeFromPartialBitSchema<{
        occupied: BitFlag;
    }>;
    occupancySensorType: OccupancySensing.OccupancySensorType;
    occupancySensorTypeBitmap: TypeFromPartialBitSchema<{
        physicalContact: BitFlag;
        pir: BitFlag;
        ultrasonic: BitFlag;
    }>;
} & {
    physicalContactOccupiedToUnoccupiedDelay?: number;
    physicalContactUnoccupiedToOccupiedDelay?: number;
    physicalContactUnoccupiedToOccupiedThreshold?: number;
    pirOccupiedToUnoccupiedDelay?: number;
    pirUnoccupiedToOccupiedDelay?: number;
    pirUnoccupiedToOccupiedThreshold?: number;
    ultrasonicOccupiedToUnoccupiedDelay?: number;
    ultrasonicUnoccupiedToOccupiedDelay?: number;
    ultrasonicUnoccupiedToOccupiedThreshold?: number;
} & {} & {}

Access the behavior's state.

Type declaration

  • Readonlyoccupancy: TypeFromPartialBitSchema<{
        occupied: BitFlag;
    }>

    This attribute indicates the sensed (processed) status of occupancy.

    MatterSpecification.v13.Cluster § 2.7.5.1

  • ReadonlyoccupancySensorType: OccupancySensing.OccupancySensorType

    This attribute specifies the type of the occupancy sensor.

    MatterSpecification.v13.Cluster § 2.7.5.2

  • ReadonlyoccupancySensorTypeBitmap: TypeFromPartialBitSchema<{
        physicalContact: BitFlag;
        pir: BitFlag;
        ultrasonic: BitFlag;
    }>

    This attribute specifies the types of the occupancy sensor. Each bit position, if set, indicates the corresponding sensing capability is implemented.

    The value of the OccupancySensorType shall be aligned to the value of the OccupancySensorTypeBitmap attribute as defined below.

    MatterSpecification.v13.Cluster § 2.7.5.3

Type declaration

  • Optional ReadonlyphysicalContactOccupiedToUnoccupiedDelay?: number

    This attribute specifies the time delay, in seconds, before the physical contact occupancy sensor changes to its unoccupied state after detecting the unoccupied event.

    MatterSpecification.v13.Cluster § 2.7.5.10

  • Optional ReadonlyphysicalContactUnoccupiedToOccupiedDelay?: number

    This attribute specifies the time delay, in seconds, before the physical contact sensor changes to its occupied state after the detection of the occupied event.

    MatterSpecification.v13.Cluster § 2.7.5.11

  • Optional ReadonlyphysicalContactUnoccupiedToOccupiedThreshold?: number

    This attribute specifies the number of movement detection events that must occur in the period PhysicalContactUnoccupiedToOccupiedDelay, before the PhysicalContact sensor changes to its occupied state.

    MatterSpecification.v13.Cluster § 2.7.5.12

  • Optional ReadonlypirOccupiedToUnoccupiedDelay?: number

    This attribute specifies the time delay, in seconds, before the PIR sensor changes to its unoccupied state after the last detection of movement in the sensed area.

    MatterSpecification.v13.Cluster § 2.7.5.4

  • Optional ReadonlypirUnoccupiedToOccupiedDelay?: number

    This attribute specifies the time delay, in seconds, before the PIR sensor changes to its occupied state after the detection of movement in the sensed area.

    MatterSpecification.v13.Cluster § 2.7.5.5

  • Optional ReadonlypirUnoccupiedToOccupiedThreshold?: number

    This attribute specifies the number of movement detection events that must occur in the period PIRUnoccupiedToOccupiedDelay, before the PIR sensor changes to its occupied state.

    MatterSpecification.v13.Cluster § 2.7.5.6

  • Optional ReadonlyultrasonicOccupiedToUnoccupiedDelay?: number

    This attribute specifies the time delay, in seconds, before the Ultrasonic sensor changes to its unoccupied state after the last detection of movement in the sensed area.

    MatterSpecification.v13.Cluster § 2.7.5.7

  • Optional ReadonlyultrasonicUnoccupiedToOccupiedDelay?: number

    This attribute specifies the time delay, in seconds, before the Ultrasonic sensor changes to its occupied state after the detection of movement in the sensed area.

    MatterSpecification.v13.Cluster § 2.7.5.8

  • Optional ReadonlyultrasonicUnoccupiedToOccupiedThreshold?: number

    This attribute specifies the number of movement detection events that must occur in the period UltrasonicUnoccupiedToOccupiedDelay, before the Ultrasonic sensor changes to its occupied state.

    MatterSpecification.v13.Cluster § 2.7.5.9

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

defaults: ClusterState.Type<OccupancySensing.Cluster, typeof ClusterBehavior>
dependencies?: Iterable<Type, any, any>
early: boolean
Events: ClusterEvents.Type<OccupancySensing.Cluster, typeof ClusterBehavior>
ExtensionInterface: {}
id

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

Interface: {
    components: never[];
}
Internal: (new () => {})
name: string
schema?: Schema
State: (new () => ClusterState.Type<OccupancySensing.Cluster, typeof ClusterBehavior>)
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