Start or stop discovery
PUT /clip/v2/resource/zigbee_device_discovery/discovery_uuid
Start or stop Zigbee device discovery using the discovery service UUID.
A discovery session runs for one minute, then stops automatically. Send stop to end it sooner. You can also pass sn with start to search by serial number, or delete_flag with stop to remove devices that have not been added to the gateway service.
Parameters
| Field | Location | Type | Required | Description |
|---|---|---|---|---|
action | body | string | Yes | start: search by SN; search: search for a specific device; stop: stop discovery. |
sn | body | string[] | No | Serial number (SN). Search by serial number. |
enable_auto_join | body | integer | No | With start, set to 1 to automatically add one panel device during this session. |
delete_flag | body | integer | No | Set to 1 to remove devices with join_status=0 that have not been added to the gateway service. |
Example response
json
{
"code": 0,
"data": {
"arr": [],
"obj": {}
},
"msg": "success"
}Responses
| Status code | Meaning |
|---|---|
| 200 | OK |
Response fields
HTTP 200 OK
| Field | Type | Required | Description |
|---|---|---|---|
code | integer | Yes | Status code |
msg | string | Yes | Message |
Discover lights and curtains
Search without a serial number
Start discovery
{"action":"start"}Stop discovery
{"action":"stop","delete_flag":1}Search by serial number
Start discovery
{"action":"start","sn":["QWERTY"]}Stop discovery
{"action":"stop"}Discover panels
Start discovery
{"action":"search","enable_auto_join":1}Stop discovery
{"action":"stop","delete_flag":1}Check your firmware: The parameter definition associates
enable_auto_joinwithstart, but the panel example usessearch. Verify which action your gateway supports before enabling automatic panel registration.