Sub-Device

1. Overview

This article mainly introduces how to configure zigbee child device through Device Pairing SDK (With UI) and Device Pairing SDK (Without UI).

2. Preconditions

  1. Confirm completion Preparation
  2. Confirm the completion of Environment Build
  3. Complete Device Pairing SDK (With UI) or distribution network SDK (without UI) integration

三、Device Pairing

3.1 Introduction

The access of zigbee child device to the network is mainly led by the hub. The app only needs to request the cloud interface through Http, requiring the hub to enter the pairing mode, and perform operations such as discovery, registration, and binding of the surrounding zigbee devices.

3.2 Device Pairing SDK (With UI)

3.2.1 Jump to the device pairing device list page

Jump to the select device list page, which lists all the devices supported by the current SDK.

   LMAccessSDKManager.Companion.getInstance()
                .gotoAccessListPage(
                        this,
                        "homeId",
                        "roomId",
                        "coapServer",
                        new LumiResultCallBack() {
                            @Override
                            public void success(@NonNull WeakReference<Activity> weakReference, @Nullable String s) {

                            }

                            @Override
                            public void fail(@Nullable Integer integer, @Nullable String s) {

                            }
                        }
                );

Note: The homeId and roomId transmitted by zigbee sub-device distribution network are invalid, and the location information of zigbee sub-device will follow the location information of the gateway.

Parameter Description

Field Type of data Describe Access channel
homeId String Home location Interface acquisition, see Aqara Developer Platform
roomId String Room location Interface acquisition, see Aqara Developer Platform
coapServer String Device network domain name (which server the device connects to) Interface acquisition, see Aqara Developer Platform

3.2.2 Jump to the specified device configuration page

LMAccessSDKManager.Companion.getInstance()
        .gotoAccessConfigModule(
                this,
                "deviceModel",
                "homeId",
                "roomId",
                "coapServer",
                new LumiResultCallBack() {
                    @Override
                    public void success(@NonNull WeakReference<Activity> weakReference, @Nullable String s) {

                    }

                    @Override
                    public void fail(@Nullable Integer integer, @Nullable String s) {

                    }
                }

        );

Parameter Description

Field Type of data Describe Access channel
deviceModel String Device model value See appendix List of supported network access devices
homeId String Home location Interface acquisition, see Aqara Developer Platform
roomId String Room location Interface acquisition, see Aqara Developer Platform
coapServer String Device network domain name (which server the device connects to) Interface acquisition, see Aqara Developer Platform

3.3 Device Pairing SDK (without UI)

The third-party app needs to request the cloud interface to obtain by itself. See Interface Documentation

Copyright © 2023 Lumi United Technology Co., Ltd. all right reserved,powered by GitbookFile Modify: 2024-04-24 15:18:24

results matching ""

    No results matching ""