Magic Pair Pairing
1. Overview
This article mainly introduces how to use the Device Pairing SDK (With UI) and Device Pairing SDK (Without UI) for Magic Pair pairing.
2. Prerequisites
- Complete the preparation work
- Complete the environment setup
- Complete Device Pairing SDK (With UI) or Device Pairing SDK (Without UI) integration
3. Usage
3.1 Pairing Process
The Magic Pair pairing process means that the SDK and the device complete pairing based on a private protocol. Through standard device discovery (Bluetooth, Wi-Fi, LAN, and so on), it simplifies the user configuration flow, quickly brings the device online, and improves the efficiency of adding devices.
3.2 Device Pairing SDK (With UI)
3.2.1 Initialization
See Environment Build - Unified Initialization.
Before pairing, make sure the following are configured correctly:
positionInfo(home / position ID)coapServer(device onboarding domain that matches the current service region)country/area/supportDeviceArea(it is recommended to determinecountryfirst, then look up the corresponding values; see Region Comparison Table)
3.2.2 Jump to the specified device pairing page
After unified initialization is complete, you can launch the pairing UI for a specified device model through LumiAccessSDKManager:
Kotlin
LumiAccessSDKManager.getInstance().gotoAccessConfigModule(
this,
"deviceModel",
object : LumiResultCallBack {
override fun fail(errorCode: Int?, errorMessage: String?) {
// Pairing failed
}
override fun success(activity: WeakReference<Activity>, message: String?) {
// Pairing succeeded. After success, you can close the pairing page at an appropriate time:
activity.get()?.finish()
}
}
)
Parameter Description
| Field | Type of data | Description | Access channel |
|---|---|---|---|
| deviceModel | String | Device model value | See Device Pairing SDK Supported Device List |
3.3 Device Pairing SDK (Without UI)
Currently, Magic Pair pairing does not support the without-UI integration approach.