Class to represents one node that is paired/commissioned with the matter.js Controller. Instances are returned by the CommissioningController on commissioning or when connecting.

Constructors

Properties

events: {
    attributeChanged: Observable<[data: DecodedAttributeReportValue<any>, oldValue: any], void>;
    decommissioned: Observable<[void], void>;
    eventTriggered: Observable<[DecodedEventReportValue<any>], void>;
    initialized: AsyncObservable<[details: DeviceInformationData], void>;
    initializedFromRemote: AsyncObservable<[details: DeviceInformationData], void>;
    stateChanged: Observable<[nodeState: NodeStates], void>;
    structureChanged: Observable<[void], void>;
} = ...

Type declaration

  • attributeChanged: Observable<[data: DecodedAttributeReportValue<any>, oldValue: any], void>

    Emitted when an attribute value changes. If the oldValue is undefined then no former value was known.

  • decommissioned: Observable<[void], void>

    Emitted when the node is decommissioned.

  • eventTriggered: Observable<[DecodedEventReportValue<any>], void>

    Emitted when an event is triggered.

  • initialized: AsyncObservable<[details: DeviceInformationData], void>

    Emitted when the node is initialized from local data. These data usually are stale, but you can still already use the node to interact with the device. If no local data are available this event will be emitted together with the initializedFromRemote event.

  • initializedFromRemote: AsyncObservable<[details: DeviceInformationData], void>

    Emitted when the node is fully initialized from remote and all attributes and events are subscribed. This event can also be awaited if code needs to be blocked until the node is fully initialized.

  • stateChanged: Observable<[nodeState: NodeStates], void>

    Emitted when the state of the node changes.

  • structureChanged: Observable<[void], void>

    Emitted when the structure of the node changes (Endpoints got added or also removed).

nodeId: NodeId

Accessors

Methods

  • Opens a Basic Commissioning Window (uses the original Passcode printed on the device) with the device.

    Parameters

    • commissioningTimeout: number = 900

    Returns Promise<void>

  • Opens an Enhanced Commissioning Window (uses a generated random Passcode) with the device.

    Parameters

    • commissioningTimeout: number = 900

    Returns Promise<{
        manualPairingCode: string;
        qrPairingCode: string;
    }>