interface EnergyEvseBehavior {
    [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> & {
        chargingEnabledUntil$Changing: ClusterEvents.AttributeObservable<Attribute<null | number, any>>;
        circuitCapacity$Changing: ClusterEvents.AttributeObservable<Attribute<number | bigint, any>>;
        faultState$Changing: ClusterEvents.AttributeObservable<Attribute<EnergyEvse.FaultState, any>>;
        maximumChargeCurrent$Changing: ClusterEvents.AttributeObservable<Attribute<number | bigint, any>>;
        minimumChargeCurrent$Changing: ClusterEvents.AttributeObservable<Attribute<number | bigint, any>>;
        sessionDuration$Changing: ClusterEvents.AttributeObservable<Attribute<null | number, any>>;
        sessionEnergyCharged$Changing: ClusterEvents.AttributeObservable<Attribute<null | number | bigint, any>>;
        sessionId$Changing: ClusterEvents.AttributeObservable<Attribute<null | number, any>>;
        state$Changing: ClusterEvents.AttributeObservable<Attribute<null | EnergyEvse.State, any>>;
        supplyState$Changing: ClusterEvents.AttributeObservable<Attribute<EnergyEvse.SupplyState, any>>;
    } & {
        randomizationDelayWindow$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
        userMaximumChargeCurrent$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number | bigint, any>>;
    } & {
        chargingEnabledUntil$Changed: ClusterEvents.AttributeObservable<Attribute<null | number, any>>;
        circuitCapacity$Changed: ClusterEvents.AttributeObservable<Attribute<number | bigint, any>>;
        faultState$Changed: ClusterEvents.AttributeObservable<Attribute<EnergyEvse.FaultState, any>>;
        maximumChargeCurrent$Changed: ClusterEvents.AttributeObservable<Attribute<number | bigint, any>>;
        minimumChargeCurrent$Changed: ClusterEvents.AttributeObservable<Attribute<number | bigint, any>>;
        sessionDuration$Changed: ClusterEvents.AttributeObservable<Attribute<null | number, any>>;
        sessionEnergyCharged$Changed: ClusterEvents.AttributeObservable<Attribute<null | number | bigint, any>>;
        sessionId$Changed: ClusterEvents.AttributeObservable<Attribute<null | number, any>>;
        state$Changed: ClusterEvents.AttributeObservable<Attribute<null | EnergyEvse.State, any>>;
        supplyState$Changed: ClusterEvents.AttributeObservable<Attribute<EnergyEvse.SupplyState, any>>;
    } & {
        randomizationDelayWindow$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
        userMaximumChargeCurrent$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number | bigint, any>>;
    } & {
        energyTransferStarted: ClusterEvents.EventObservable<Event<TypeFromFields<{
            maximumCurrent: FieldType<number | bigint>;
            sessionId: FieldType<number>;
            state: FieldType<EnergyEvse.State>;
        }>, any>>;
        energyTransferStopped: ClusterEvents.EventObservable<Event<TypeFromFields<{
            energyTransferred: FieldType<number | bigint>;
            reason: FieldType<EnergyEvse.EnergyTransferStoppedReason>;
            sessionId: FieldType<number>;
            state: FieldType<EnergyEvse.State>;
        }>, any>>;
        evConnected: ClusterEvents.EventObservable<Event<TypeFromFields<{
            sessionId: FieldType<number>;
        }>, any>>;
        evNotDetected: ClusterEvents.EventObservable<Event<TypeFromFields<{
            sessionDuration: FieldType<number>;
            sessionEnergyCharged: FieldType<number | bigint>;
            sessionEnergyDischarged: OptionalFieldType<number | bigint>;
            sessionId: FieldType<number>;
            state: FieldType<EnergyEvse.State>;
        }>, any>>;
        fault: ClusterEvents.EventObservable<Event<TypeFromFields<{
            faultStateCurrentState: FieldType<EnergyEvse.FaultState>;
            faultStatePreviousState: FieldType<EnergyEvse.FaultState>;
            sessionId: FieldType<null | number>;
            state: FieldType<EnergyEvse.State>;
        }>, any>>;
    } & {};
    features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
        chargingPreferences: BitFlag;
        plugAndCharge: BitFlag;
        rfid: BitFlag;
        soCReporting: BitFlag;
        v2X: BitFlag;
    }>;
    session: SecureSession;
    state: Omit<ClusterState.Type<Of<{
        attributes: {};
        commands: {};
        events: {};
        id: 0;
        name: "Unknown";
        revision: 0;
    }>, typeof ClusterBehavior>, never> & {
        chargingEnabledUntil: null | number;
        circuitCapacity: number | bigint;
        faultState: EnergyEvse.FaultState;
        maximumChargeCurrent: number | bigint;
        minimumChargeCurrent: number | bigint;
        sessionDuration: null | number;
        sessionEnergyCharged: null | number | bigint;
        sessionId: null | number;
        state: null | EnergyEvse.State;
        supplyState: EnergyEvse.SupplyState;
    } & {
        randomizationDelayWindow?: number;
        userMaximumChargeCurrent?: number | bigint;
    } & {} & {};
    [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);
    disable(): MaybePromise;
    enableCharging(request: EnergyEvse.EnableChargingRequest): MaybePromise;
    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>;
    startDiagnostics(): 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> & {
    chargingEnabledUntil$Changing: ClusterEvents.AttributeObservable<Attribute<null | number, any>>;
    circuitCapacity$Changing: ClusterEvents.AttributeObservable<Attribute<number | bigint, any>>;
    faultState$Changing: ClusterEvents.AttributeObservable<Attribute<EnergyEvse.FaultState, any>>;
    maximumChargeCurrent$Changing: ClusterEvents.AttributeObservable<Attribute<number | bigint, any>>;
    minimumChargeCurrent$Changing: ClusterEvents.AttributeObservable<Attribute<number | bigint, any>>;
    sessionDuration$Changing: ClusterEvents.AttributeObservable<Attribute<null | number, any>>;
    sessionEnergyCharged$Changing: ClusterEvents.AttributeObservable<Attribute<null | number | bigint, any>>;
    sessionId$Changing: ClusterEvents.AttributeObservable<Attribute<null | number, any>>;
    state$Changing: ClusterEvents.AttributeObservable<Attribute<null | EnergyEvse.State, any>>;
    supplyState$Changing: ClusterEvents.AttributeObservable<Attribute<EnergyEvse.SupplyState, any>>;
} & {
    randomizationDelayWindow$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    userMaximumChargeCurrent$Changing: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number | bigint, any>>;
} & {
    chargingEnabledUntil$Changed: ClusterEvents.AttributeObservable<Attribute<null | number, any>>;
    circuitCapacity$Changed: ClusterEvents.AttributeObservable<Attribute<number | bigint, any>>;
    faultState$Changed: ClusterEvents.AttributeObservable<Attribute<EnergyEvse.FaultState, any>>;
    maximumChargeCurrent$Changed: ClusterEvents.AttributeObservable<Attribute<number | bigint, any>>;
    minimumChargeCurrent$Changed: ClusterEvents.AttributeObservable<Attribute<number | bigint, any>>;
    sessionDuration$Changed: ClusterEvents.AttributeObservable<Attribute<null | number, any>>;
    sessionEnergyCharged$Changed: ClusterEvents.AttributeObservable<Attribute<null | number | bigint, any>>;
    sessionId$Changed: ClusterEvents.AttributeObservable<Attribute<null | number, any>>;
    state$Changed: ClusterEvents.AttributeObservable<Attribute<null | EnergyEvse.State, any>>;
    supplyState$Changed: ClusterEvents.AttributeObservable<Attribute<EnergyEvse.SupplyState, any>>;
} & {
    randomizationDelayWindow$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number, any>>;
    userMaximumChargeCurrent$Changed: undefined | ClusterEvents.AttributeObservable<OptionalWritableAttribute<number | bigint, any>>;
} & {
    energyTransferStarted: ClusterEvents.EventObservable<Event<TypeFromFields<{
        maximumCurrent: FieldType<number | bigint>;
        sessionId: FieldType<number>;
        state: FieldType<EnergyEvse.State>;
    }>, any>>;
    energyTransferStopped: ClusterEvents.EventObservable<Event<TypeFromFields<{
        energyTransferred: FieldType<number | bigint>;
        reason: FieldType<EnergyEvse.EnergyTransferStoppedReason>;
        sessionId: FieldType<number>;
        state: FieldType<EnergyEvse.State>;
    }>, any>>;
    evConnected: ClusterEvents.EventObservable<Event<TypeFromFields<{
        sessionId: FieldType<number>;
    }>, any>>;
    evNotDetected: ClusterEvents.EventObservable<Event<TypeFromFields<{
        sessionDuration: FieldType<number>;
        sessionEnergyCharged: FieldType<number | bigint>;
        sessionEnergyDischarged: OptionalFieldType<number | bigint>;
        sessionId: FieldType<number>;
        state: FieldType<EnergyEvse.State>;
    }>, any>>;
    fault: ClusterEvents.EventObservable<Event<TypeFromFields<{
        faultStateCurrentState: FieldType<EnergyEvse.FaultState>;
        faultStatePreviousState: FieldType<EnergyEvse.FaultState>;
        sessionId: FieldType<null | number>;
        state: FieldType<EnergyEvse.State>;
    }>, any>>;
} & {}

Access the behavior's events.

Type declaration

features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
    chargingPreferences: BitFlag;
    plugAndCharge: BitFlag;
    rfid: BitFlag;
    soCReporting: BitFlag;
    v2X: 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> & {
    chargingEnabledUntil: null | number;
    circuitCapacity: number | bigint;
    faultState: EnergyEvse.FaultState;
    maximumChargeCurrent: number | bigint;
    minimumChargeCurrent: number | bigint;
    sessionDuration: null | number;
    sessionEnergyCharged: null | number | bigint;
    sessionId: null | number;
    state: null | EnergyEvse.State;
    supplyState: EnergyEvse.SupplyState;
} & {
    randomizationDelayWindow?: number;
    userMaximumChargeCurrent?: number | bigint;
} & {} & {}

Access the behavior's state.

Type declaration

  • ReadonlychargingEnabledUntil: null | number

    Indicates the time, in UTC, that the EVSE will automatically stop current flow to the EV.

    A null value indicates the EVSE is always enabled for charging.

    A value in the past or 0x0 indicates that EVSE charging shall be disabled. The attribute is only set via the payload of the EnableCharging command.

    This attribute shall be persisted, for example a temporary power failure should not stop the vehicle from being charged.

    MatterSpecification.v13.Cluster § 9.3.8.4

  • ReadonlycircuitCapacity: number | bigint

    Indicates the capacity that the circuit that the EVSE is connected to can provide. It is intended to allow implementation of a self-managed network of EVSEs. It is assumed that the device will allow the setting of such values by an installer.

    MatterSpecification.v13.Cluster § 9.3.8.6

  • ReadonlyfaultState: EnergyEvse.FaultState

    Indicates the type of fault detected by the EVSE (internally or as detected in the pilot signal).

    When the SupplyState attribute is DisabledError, the FaultState attribute will be one of the values listed in FaultStateEnum, except NoError. For all values of SupplyState other than DisabledError, the FaultState attribute shall be NoError.

    MatterSpecification.v13.Cluster § 9.3.8.3

  • ReadonlymaximumChargeCurrent: number | bigint

    Indicates the maximum current that can be delivered by the EVSE to the EV.

    This shall represent the actual maximum current offered to the EV at any time. Note that the EV can draw less current than this value. For example, the EV may be limiting its power draw based on the operating conditions of the battery, such as temperature and state of charge.

    The attribute can be initially set using the EnableCharging command or by adjusting the UserMaximumChargeCurrent attribute.

    This attribute value shall be the minimum of:

    • CircuitCapacity - Electrician’s installation setting

    • CableAssemblyCurrentLimit (detected by the EVSE when the cable is plugged in)

    • MaximumChargeCurrent field in the EnableCharging command

    • UserMaximumChargeCurrent attribute

    MatterSpecification.v13.Cluster § 9.3.8.8

  • ReadonlyminimumChargeCurrent: number | bigint

    Indicates the minimum current that can be delivered by the EVSE to the EV. The attribute can be set using the EnableCharging command.

    MatterSpecification.v13.Cluster § 9.3.8.7

  • ReadonlysessionDuration: null | number

    MatterSpecification.v13.Cluster § 9.3.8

  • ReadonlysessionEnergyCharged: null | number | bigint

    MatterSpecification.v13.Cluster § 9.3.8

  • ReadonlysessionId: null | number

    MatterSpecification.v13.Cluster § 9.3.8

  • Readonlystate: null | EnergyEvse.State

    Indicates the current status of the EVSE. This higher-level status is partly derived from the signaling protocol as communicated between the EVSE and the vehicle through the pilot signal.

    The State attribute shall change when the EVSE detects change of condition of the EV (plugged in or unplugged, whether the vehicle is asking for demand or not, and if it is charging or discharging).

    NOTE

    SessionEnding is not really a state but a transition. However, the transition period

    may take a few seconds and is useful for some clean up purposes. The Fault state is used to indicate that the FaultState attribute is not NoError.

    MatterSpecification.v13.Cluster § 9.3.8.1

  • ReadonlysupplyState: EnergyEvse.SupplyState

    Indicates whether the EV is currently allowed to charge from or discharge to the EVSE.

    MatterSpecification.v13.Cluster § 9.3.8.2

Type declaration

  • Optional ReadonlyrandomizationDelayWindow?: number

    Indicates the size of a random window over which the EVSE will randomize the start of a charging session. This value is in seconds.

    This is a feature that is mandated in some markets (such as UK) where the EVSE should by default randomize its start time within the randomization window. By default in the UK this should be 600s.

    For example, if the RandomizationDelayWindow is 600s (i.e. 10 minutes) and if there was a cheap rate energy starting at 00:30, then the EVSE must compute a random delay between 0-599s and add this to its initial planned start time.

    MatterSpecification.v13.Cluster § 9.3.8.11

  • Optional ReadonlyuserMaximumChargeCurrent?: number | bigint

    Indicates a maximum current that can set by the consumer (e.g. via an app) as a preference to further reduce the charging rate. This may be desirable if the home owner has a solar PV or battery storage system which may only be able to deliver a limited amount of power. The consumer can manually control how much they allow the EV to take.

    This attribute value shall be limited by the EVSE to be in the range of:

    MinimumChargeCurrent <= UserMaximumChargeCurrent <= MaximumChargeCurrent

    where MinimumChargeCurrent and MaximumChargeCurrent are the values received in the EnableCharging command.

    Its default value SHOULD be initialized to the same as the CircuitCapacity attribute. This value shall be persisted across reboots to ensure it does not cause charging issues during temporary power failures.

    MatterSpecification.v13.Cluster § 9.3.8.10

Methods

  • Release resources. This is the public API for releasing application resources held by behaviors in internal state.

    Returns MaybePromise

  • Execute logic with elevated privileges.

    The provided function executes with privileges escalated to offline mode. This is not commonly necessary.

    Elevated logic effectively ignores ACLs so should be used with care.

    Note that interactions with the behavior will remain elevated until the synchronous completion of this call. You should only elevate privileges for synchronous logic.

    Parameters

    • fn: (() => void)

      the elevated logic

        • (): void
        • Returns void

    Returns void

  • Type Parameters

    • This extends Behavior
    • K extends string | number | symbol

    Parameters

    • this: This
    • attributeName: K

    Returns void

  • 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

  • Allows a client to disable the EVSE from charging and discharging.

    Returns MaybePromise

    MatterSpecification.v13.Cluster § 9.3.9.1

  • Allows a client to enable the EVSE to charge an EV.

    Returns MaybePromise

    MatterSpecification.v13.Cluster § 9.3.9.2

  • 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

    • Type Parameters

      • This extends Behavior
      • K extends string | number | symbol

      Parameters

      • this: This
      • attributeName: K

      Returns Exclude<This["state"][K], undefined>

    • Allows a client to put the EVSE into a self-diagnostics mode.

      Returns MaybePromise

      MatterSpecification.v13.Cluster § 9.3.9.4

    • Description used in diagnostic messages.

      Returns string