Configuration for performing discovery + commissioning in one step.

interface DiscoveryAndCommissioningOptions {
    adminVendorId?: VendorId;
    discovery: ({
        identifierData: CommissionableDeviceIdentifiers;
    } | {
        commissionableDevice: CommissionableDevice;
    }) & {
        discoveryCapabilities?: TypeFromPartialBitSchema<{
            ble: BitFlag;
            onIpNetwork: BitFlag;
        }>;
        knownAddress?: ServerAddress | undefined;
        timeoutSeconds?: number;
    };
    fabric: Fabric;
    finalizeCommissioning?: ((peerAddress: PeerAddress, discoveryData?: DiscoveryData) => Promise<void>);
    nodeId?: NodeId;
    passcode: number;
    regulatoryCountryCode?: string;
    regulatoryLocation?: GeneralCommissioning.RegulatoryLocationType;
    threadNetwork?: {
        networkName: string;
        operationalDataset: string;
    };
    wifiNetwork?: {
        wifiCredentials: string;
        wifiSsid: string;
    };
}

Hierarchy (view full)

Properties

adminVendorId?: VendorId

The vendor ID we present as a commissioner.

discovery: ({
    identifierData: CommissionableDeviceIdentifiers;
} | {
    commissionableDevice: CommissionableDevice;
}) & {
    discoveryCapabilities?: TypeFromPartialBitSchema<{
        ble: BitFlag;
        onIpNetwork: BitFlag;
    }>;
    knownAddress?: ServerAddress | undefined;
    timeoutSeconds?: number;
}

Discovery related options.

Type declaration

  • OptionaldiscoveryCapabilities?: TypeFromPartialBitSchema<{
        ble: BitFlag;
        onIpNetwork: BitFlag;
    }>

    Discovery capabilities to use for discovery. These are included in the QR code normally and defined if BLE is supported for initial commissioning.

  • OptionalknownAddress?: ServerAddress | undefined

    Known address of the device to use for discovery. if this is set this will be tried first before discovering the device.

  • OptionaltimeoutSeconds?: number

    Timeout in seconds for the discovery process. Default: 30 seconds

fabric: Fabric

The fabric into which to commission.

finalizeCommissioning?: ((peerAddress: PeerAddress, discoveryData?: DiscoveryData) => Promise<void>)

Commissioning completion callback

This optional callback allows the caller to complete commissioning once PASE commissioning completes. If it does not throw, the commissioner considers commissioning complete.

nodeId?: NodeId

The node ID to assign (the commissioner assigns a random node ID if omitted)

passcode: number

Passcode to use for commissioning.

regulatoryCountryCode?: string

The country where the device is used.

The regulatory location (indoor or outdoor) where the device is used.

threadNetwork?: {
    networkName: string;
    operationalDataset: string;
}

If the device should connect to a thread network.

wifiNetwork?: {
    wifiCredentials: string;
    wifiSsid: string;
}

Required credentials if the device is to connect to a wifi network provide the credentials here.