---
name: "openDeviceGWSubSearchConfigure"
mode: "api"
versionRequirements:
  - { name: "@ray-js/ray", version: "1.7.60" }
title: "openDeviceGWSubSearchConfigure - 打开搜索配网页面"
---

## openDeviceGWSubSearchConfigure

> [VERSION] @ray-js/ray >= 1.7.60

### 描述

打开网关面板搜索配网页面，用于搜索并添加子设备

### 参数

`Params`

| 参数 | 类型 | 必填 | 描述 |
| --- | --- | --- | --- |
| `params` | `GwIdParams` | 否 | 网关参数 |

### 返回值

类型: `Promise<void>`

void

### 引用对象

##### `type` GwIdParams

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `gwId` | `string` | 网关 ID |

##### `type` ICommon

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `success` | `() => void` | 接口调用成功的回调函数 |
| `fail` | `(err: ErrorMsg) => void` | 接口调用失败的回调函数 |
| `complete` | `() => void` | 接口调用结束的回调函数（调用成功、失败都会执行） |

##### `type` ErrorMsg

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `errorMsg` | `string` | 错误信息 |
| `errorCode` | `string \| number` | 错误码 |
| `innerError` | `Object` | 错误扩展 |

##### `type` ErrorMsg.innerError

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `errorCode` | `string \| number` | 错误扩展码 |
| `errorMsg` | `string` | 错误扩展信息 |


### 示例代码

```typescript
import { openDeviceGWSubSearchConfigure } from '@ray-js/ray';

const openSearchPage = async () => {
  try {
    await openDeviceGWSubSearchConfigure({ gwId: 'gateway_001' });
    console.log('已打开搜索配网页面');
  } catch (err) {
    console.error('打开失败:', err);
  }
};
```


## 注意事项

- IDE 模拟器与真机调试环境当前无法使用
