interface SmokeCoAlarmBehavior {
    [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> & {
        batteryAlert$Changing: ClusterEvents.AttributeObservable<Attribute<SmokeCoAlarm.AlarmState, any>>;
        endOfServiceAlert$Changing: ClusterEvents.AttributeObservable<Attribute<SmokeCoAlarm.EndOfService, any>>;
        expressedState$Changing: ClusterEvents.AttributeObservable<Attribute<SmokeCoAlarm.ExpressedState, any>>;
        hardwareFaultAlert$Changing: ClusterEvents.AttributeObservable<Attribute<boolean, any>>;
        testInProgress$Changing: ClusterEvents.AttributeObservable<Attribute<boolean, any>>;
    } & {
        deviceMuted$Changing: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<SmokeCoAlarm.MuteState, any>>;
        expiryDate$Changing: undefined | ClusterEvents.AttributeObservable<OptionalFixedAttribute<number, any>>;
        interconnectCoAlarm$Changing: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<SmokeCoAlarm.AlarmState, any>>;
        interconnectSmokeAlarm$Changing: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<SmokeCoAlarm.AlarmState, any>>;
    } & {
        batteryAlert$Changed: ClusterEvents.AttributeObservable<Attribute<SmokeCoAlarm.AlarmState, any>>;
        endOfServiceAlert$Changed: ClusterEvents.AttributeObservable<Attribute<SmokeCoAlarm.EndOfService, any>>;
        expressedState$Changed: ClusterEvents.AttributeObservable<Attribute<SmokeCoAlarm.ExpressedState, any>>;
        hardwareFaultAlert$Changed: ClusterEvents.AttributeObservable<Attribute<boolean, any>>;
        testInProgress$Changed: ClusterEvents.AttributeObservable<Attribute<boolean, any>>;
    } & {
        deviceMuted$Changed: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<SmokeCoAlarm.MuteState, any>>;
        expiryDate$Changed: undefined | ClusterEvents.AttributeObservable<OptionalFixedAttribute<number, any>>;
        interconnectCoAlarm$Changed: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<SmokeCoAlarm.AlarmState, any>>;
        interconnectSmokeAlarm$Changed: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<SmokeCoAlarm.AlarmState, any>>;
    } & {
        allClear: ClusterEvents.EventObservable<Event<void, any>>;
        endOfService: ClusterEvents.EventObservable<Event<void, any>>;
        hardwareFault: ClusterEvents.EventObservable<Event<void, any>>;
        lowBattery: ClusterEvents.EventObservable<Event<TypeFromFields<{
            alarmSeverityLevel: FieldType<SmokeCoAlarm.AlarmState>;
        }>, any>>;
        selfTestComplete: ClusterEvents.EventObservable<Event<void, any>>;
    } & {
        alarmMuted?: ClusterEvents.EventObservable<OptionalEvent<void, any>>;
        muteEnded?: ClusterEvents.EventObservable<OptionalEvent<void, any>>;
    };
    features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
        coAlarm: BitFlag;
        smokeAlarm: BitFlag;
    }>;
    session: SecureSession;
    state: Omit<ClusterState.Type<Of<{
        attributes: {};
        commands: {};
        events: {};
        id: 0;
        name: "Unknown";
        revision: 0;
    }>, typeof ClusterBehavior>, never> & {
        batteryAlert: SmokeCoAlarm.AlarmState;
        endOfServiceAlert: SmokeCoAlarm.EndOfService;
        expressedState: SmokeCoAlarm.ExpressedState;
        hardwareFaultAlert: boolean;
        testInProgress: boolean;
    } & {
        deviceMuted?: SmokeCoAlarm.MuteState;
        interconnectCoAlarm?: SmokeCoAlarm.AlarmState;
        interconnectSmokeAlarm?: SmokeCoAlarm.AlarmState;
    } & {} & {
        expiryDate?: number;
    };
    [asyncDispose](): MaybePromise;
    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);
    initialize(_options?: {}): MaybePromise;
    reactTo<O>(observable: O, reactor: Reactor<Parameters<O["emit"]>, ReturnType<O["emit"]>>, options?: Reactor.Options): void;
    requireAttributeEnabled<This, K>(this: This, attributeName: K): Exclude<This["state"][K], undefined>;
    selfTestRequest(): MaybePromise;
    toString(): string;
    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> & {
    batteryAlert$Changing: ClusterEvents.AttributeObservable<Attribute<SmokeCoAlarm.AlarmState, any>>;
    endOfServiceAlert$Changing: ClusterEvents.AttributeObservable<Attribute<SmokeCoAlarm.EndOfService, any>>;
    expressedState$Changing: ClusterEvents.AttributeObservable<Attribute<SmokeCoAlarm.ExpressedState, any>>;
    hardwareFaultAlert$Changing: ClusterEvents.AttributeObservable<Attribute<boolean, any>>;
    testInProgress$Changing: ClusterEvents.AttributeObservable<Attribute<boolean, any>>;
} & {
    deviceMuted$Changing: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<SmokeCoAlarm.MuteState, any>>;
    expiryDate$Changing: undefined | ClusterEvents.AttributeObservable<OptionalFixedAttribute<number, any>>;
    interconnectCoAlarm$Changing: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<SmokeCoAlarm.AlarmState, any>>;
    interconnectSmokeAlarm$Changing: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<SmokeCoAlarm.AlarmState, any>>;
} & {
    batteryAlert$Changed: ClusterEvents.AttributeObservable<Attribute<SmokeCoAlarm.AlarmState, any>>;
    endOfServiceAlert$Changed: ClusterEvents.AttributeObservable<Attribute<SmokeCoAlarm.EndOfService, any>>;
    expressedState$Changed: ClusterEvents.AttributeObservable<Attribute<SmokeCoAlarm.ExpressedState, any>>;
    hardwareFaultAlert$Changed: ClusterEvents.AttributeObservable<Attribute<boolean, any>>;
    testInProgress$Changed: ClusterEvents.AttributeObservable<Attribute<boolean, any>>;
} & {
    deviceMuted$Changed: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<SmokeCoAlarm.MuteState, any>>;
    expiryDate$Changed: undefined | ClusterEvents.AttributeObservable<OptionalFixedAttribute<number, any>>;
    interconnectCoAlarm$Changed: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<SmokeCoAlarm.AlarmState, any>>;
    interconnectSmokeAlarm$Changed: undefined | ClusterEvents.AttributeObservable<OptionalAttribute<SmokeCoAlarm.AlarmState, any>>;
} & {
    allClear: ClusterEvents.EventObservable<Event<void, any>>;
    endOfService: ClusterEvents.EventObservable<Event<void, any>>;
    hardwareFault: ClusterEvents.EventObservable<Event<void, any>>;
    lowBattery: ClusterEvents.EventObservable<Event<TypeFromFields<{
        alarmSeverityLevel: FieldType<SmokeCoAlarm.AlarmState>;
    }>, any>>;
    selfTestComplete: ClusterEvents.EventObservable<Event<void, any>>;
} & {
    alarmMuted?: ClusterEvents.EventObservable<OptionalEvent<void, any>>;
    muteEnded?: ClusterEvents.EventObservable<OptionalEvent<void, any>>;
}

Access the behavior's events.

Type declaration

  • ReadonlyallClear: ClusterEvents.EventObservable<Event<void, any>>

    This event shall be generated when ExpressedState attribute returns to Normal state.

    MatterSpecification.v13.Cluster § 2.11.8.11

  • ReadonlyendOfService: ClusterEvents.EventObservable<Event<void, any>>

    This event shall be generated when the EndOfServiceAlert is set to Expired.

    MatterSpecification.v13.Cluster § 2.11.8.5

  • ReadonlyhardwareFault: ClusterEvents.EventObservable<Event<void, any>>

    This event shall be generated when the device detects a hardware fault that leads to setting HardwareFaultAlert to True.

    MatterSpecification.v13.Cluster § 2.11.8.4

  • ReadonlylowBattery: ClusterEvents.EventObservable<Event<TypeFromFields<{
        alarmSeverityLevel: FieldType<SmokeCoAlarm.AlarmState>;
    }>, any>>

    This event shall be generated when BatteryAlert attribute changes to either Warning or Critical state.

    MatterSpecification.v13.Cluster § 2.11.8.3

  • ReadonlyselfTestComplete: ClusterEvents.EventObservable<Event<void, any>>

    This event shall be generated when the SelfTest completes, and the attribute TestInProgress changes to False.

    MatterSpecification.v13.Cluster § 2.11.8.6

Type declaration

  • Optional ReadonlyalarmMuted?: ClusterEvents.EventObservable<OptionalEvent<void, any>>

    This event shall be generated when the DeviceMuted attribute changes to Muted.

    MatterSpecification.v13.Cluster § 2.11.8.7

  • Optional ReadonlymuteEnded?: ClusterEvents.EventObservable<OptionalEvent<void, any>>

    This event shall be generated when DeviceMuted attribute changes to NotMuted.

    MatterSpecification.v13.Cluster § 2.11.8.8

features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
    coAlarm: BitFlag;
    smokeAlarm: 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> & {
    batteryAlert: SmokeCoAlarm.AlarmState;
    endOfServiceAlert: SmokeCoAlarm.EndOfService;
    expressedState: SmokeCoAlarm.ExpressedState;
    hardwareFaultAlert: boolean;
    testInProgress: boolean;
} & {
    deviceMuted?: SmokeCoAlarm.MuteState;
    interconnectCoAlarm?: SmokeCoAlarm.AlarmState;
    interconnectSmokeAlarm?: SmokeCoAlarm.AlarmState;
} & {} & {
    expiryDate?: number;
}

Access the behavior's state.

Type declaration

  • ReadonlybatteryAlert: SmokeCoAlarm.AlarmState

    Indicates whether the power resource fault detection mechanism is currently triggered at the device. If the detection mechanism is triggered, this attribute shall be set to Warning or Critical, otherwise it shall be set to Normal. The battery state shall also be reflected in the Power Source cluster representing the device’s battery using the appropriate supported attributes and events.

    MatterSpecification.v13.Cluster § 2.11.6.4

  • ReadonlyendOfServiceAlert: SmokeCoAlarm.EndOfService

    Indicates whether the end-of-service has been triggered at the device. This attribute shall be set to Expired when the device reaches the end-of-service.

    MatterSpecification.v13.Cluster § 2.11.6.8

  • ReadonlyexpressedState: SmokeCoAlarm.ExpressedState

    Indicates the visibly- and audibly-expressed state of the alarm. When multiple alarm conditions are being reflected in the server, this attribute shall indicate the condition with the highest priority. Priority order of conditions is determined by the manufacturer and shall be supplied as a part of certification procedure. If the value of ExpressedState is not Normal, the attribute corresponding to the value shall NOT be Normal. For example, if the ExpressedState is set to SmokeAlarm, the value of the SmokeState will indicate the severity of the alarm (Warning or Critical). Clients SHOULD also read the other attributes to be aware of further alarm conditions beyond the one indicated in ExpressedState.

    Visible expression is typically a LED light pattern. Audible expression is a horn or speaker pattern. Audible expression shall BE suppressed if the DeviceMuted attribute is supported and set to Muted.

    MatterSpecification.v13.Cluster § 2.11.6.1

  • ReadonlyhardwareFaultAlert: boolean

    Indicates whether the hardware fault detection mechanism is currently triggered. If the detection mechanism is triggered, this attribute shall be set to True, otherwise it shall be set to False.

    MatterSpecification.v13.Cluster § 2.11.6.7

  • ReadonlytestInProgress: boolean

    Indicates whether the device self-test is currently activated. If the device self- test is activated, this attribute shall be set to True, otherwise it shall be set to False.

    MatterSpecification.v13.Cluster § 2.11.6.6

Type declaration

  • Optional ReadonlydeviceMuted?: SmokeCoAlarm.MuteState

    Indicates the whether the audible expression of the device is currently muted. Audible expression is typically a horn or speaker pattern.

    MatterSpecification.v13.Cluster § 2.11.6.5

  • Optional ReadonlyinterconnectCoAlarm?: SmokeCoAlarm.AlarmState

    Indicates whether the interconnected CO alarm is currently triggering by branching devices. When the interconnected CO alarm is being triggered, this attribute shall be set to Warning or Critical, otherwise it shall be set to Normal.

    MatterSpecification.v13.Cluster § 2.11.6.10

  • Optional ReadonlyinterconnectSmokeAlarm?: SmokeCoAlarm.AlarmState

    Indicates whether the interconnected smoke alarm is currently triggering by branching devices. When the interconnected smoke alarm is being triggered, this attribute shall be set to Warning or Critical, otherwise it shall be set to Normal.

    MatterSpecification.v13.Cluster § 2.11.6.9

Type declaration

  • Optional ReadonlyexpiryDate?: number

    Indicates the date when the device reaches its stated expiry date. After the ExpiryDate has been reached, the EndOfServiceAlert shall start to be triggered. To account for better customer experience across time zones, the EndOfServiceAlert may be delayed by up to 24 hours after the ExpiryDate. Similarly, clients may delay any actions based on the ExpiryDate by up to 24 hours to best align with the local time zone.

    MatterSpecification.v13.Cluster § 2.11.6.13

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

    • This command shall initiate a device self-test. The return status shall indicate whether the test was successfully initiated. Only one SelfTestRequest may be processed at a time. When the value of the ExpressedState attribute is any of SmokeAlarm, COAlarm, Testing, InterconnectSmoke, Inter

      connectCO, the device shall NOT execute the self-test, and shall return status code BUSY.

      Upon successful acceptance of SelfTestRequest, the TestInProgress attribute shall be set to True and ExpressedState attribute shall be set to Testing. Any faults identified during the test shall be reflected in the appropriate attributes and events. Upon completion of the self test procedure, the SelfTestComplete event shall be generated, the TestInProgress attribute shall be set to False and ExpressedState attribute shall be updated to reflect the current state of the server.

      Returns MaybePromise

      MatterSpecification.v13.Cluster § 2.11.7.1