Pairing
Register and remove Igloohome devices from your account.
pair
Pairs an Igloo lock via Bluetooth and registers it on the server. Protocol (G2/G3) is auto-detected from the lock's firmware.
The SDK orchestrates the full flow: timezone resolution, DST data fetch, BLE handshake, server registration, and commit. If commit fails after server registration, the device is automatically rolled back (deleted from server).
Signature
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
deviceId |
String |
Yes | Bluetooth device name of the lock (e.g. "SP2Xo01231"). |
name |
String |
Yes | User-assigned name for the lock. |
propertyIds |
List<String> |
Yes | IDs of properties to assign this lock to. Must be non-empty. All properties must share the same timezone. |
accessToken |
String |
Yes | OAuth access token for server calls. |
Return Type
Error Codes
| Exception | Code | Description |
|---|---|---|
BluetoothException |
708 | Bluetooth is off or unavailable. |
ConnectionException |
12 | BLE connection failed or device disconnected during pairing. |
TimeoutException |
703 | BLE operation exceeded the timeout. |
DevicePairedException |
910 | Device is already paired (detected server-side or via BLE scan). |
ApiException |
varies | Server API call failed. |
GenericException |
1 | Property IDs empty, timezone conflict, or unsupported protocol. |
Example
Notes
- The device must be in pairing mode (unpaired state).
- All
propertyIdsmust share the same timezone — the SDK fetches DST data based on this shared timezone. - G3 locks (protocol version 2) use certificate-based pairing with an additional server round-trip.
- If the BLE commit step fails after server registration, the SDK automatically deletes the server record.
unpair
Unpairs a lock via Bluetooth and removes it from the server.
The SDK checks for linked devices first. If the lock has linked accessories (keypads, fobs, bridges), it throws HasLinkedDeviceException — you must unlink them first.
Signature
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
deviceId |
String |
Yes | Bluetooth device name of the lock. |
accessToken |
String |
Yes | OAuth access token for server calls. |
Error Codes
| Exception | Code | Description |
|---|---|---|
BluetoothException |
708 | Bluetooth is off or unavailable. |
ConnectionException |
12 | Device disconnected during unpair. |
TimeoutException |
703 | BLE operation exceeded the timeout. |
HasLinkedDeviceException |
910 | Device has linked accessories. Contains linkedDeviceIds: List<String>. |
ApiException |
varies | Server API call failed. |
Example
Notes
- The SDK automatically fetches the correct key for BLE unpair (ekey for G3, admin key for G2). Unlike
lock/unlock,unpairon both platforms does not take akeyparameter — it is resolved internally. - Server deletion retries up to 3 times with 5-second delays on failure.
- After unpair, all access credentials (PINs, keycards, fingerprints) are removed.
setWifiConfig
Configures WiFi on an Igloo Bridge device via Bluetooth.
After sending WiFi credentials via BLE, the SDK generates a CSR on the bridge and polls the server until the bridge is provisioned and online.
Signature
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
deviceId |
String |
Yes | Bluetooth device name of the bridge (e.g. "EB1-XXXX"). |
key |
String |
Yes | Admin key for BLE authentication. |
ssid |
String |
Yes | WiFi network SSID. |
networkPassword |
String |
Yes | WiFi network password. |
accessToken |
String |
Yes | OAuth access token for server calls. |
Error Codes
| Exception | Code | Description |
|---|---|---|
BluetoothException |
708 | Bluetooth is off or unavailable. |
ConnectionException |
12 | Device disconnected during setup. |
TimeoutException |
703 | Bridge was not provisioned or online after all polling retries (15s, 30s, 45s). |
Example
Notes
- The SDK sends WiFi credentials + MQTT broker config to the bridge in a single BLE command.
- After the BLE write, the SDK generates a private key CSR on the bridge.
- The SDK then polls the server at 15s, 30s, and 45s intervals until
isProvisionedandisOnlineare bothtrue. - If the bridge doesn't come online after all retries,
TimeoutException(Android) /IgloohomeError.timeout(iOS) is thrown.