Skip to content

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 ​

FieldLocationTypeRequiredDescription
actionbodystringYesstart: search by SN; search: search for a specific device; stop: stop discovery.
snbodystring[]NoSerial number (SN). Search by serial number.
enable_auto_joinbodyintegerNoWith start, set to 1 to automatically add one panel device during this session.
delete_flagbodyintegerNoSet 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 codeMeaning
200OK

Response fields ​

HTTP 200 OK

FieldTypeRequiredDescription
codeintegerYesStatus code
msgstringYesMessage

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_join with start, but the panel example uses search. Verify which action your gateway supports before enabling automatic panel registration.