• startRegisterZigbeeSubDevice(gw_id: string, timeout: number, callback: ((result: any) => void)): Promise<boolean>
  • Start registration zigbee devices under gateway
    It registers automatically if devices are found. Callback function offer sub device detail information.

    Returns

    Function's result

    Example

     const registerNotificationForSubDevice = async (result: any) => {
    console.log(result)
    }

    iot-device-sdk.startRegisterZigbeeSubDevice(
    "eb9a55f0d10d1c9a11luux",
    100,
    registerNotificationForSubDevice
    ).then(
    (okRes: boolean) => {
    debugText("Ok Res")
    },
    (errRes) => {
    debugText("Ng Res")
    }
    )

    Parameters

    • gw_id: string

      gateway id that zigbee device is connected to

    • timeout: number

      maximum timeout for sub devices registration, unit is seconds

    • callback: ((result: any) => void)

      Callback function for get information about registration

        • (result: any): void
        • Parameters

          • result: any

          Returns void

    Returns Promise<boolean>