# 86型智能门磁PUSH开关 S1-WiFi版 (型号：GSAW1B) - 开发者指令 
## 产品基本描述 
一款支持远程控制且具备传统功能的PUSH开关，220V交流供电，自带12V直流输出给门禁供电，适配电磁门控制通断，支持MQTT协议与TCP协议二次开发  
## 产品主要特点 
 
## 产品图 
<https://smart-bird-oss.smart-bird.cn/images/2026/03/12/1720506219722044.png> 
<https://smart-bird-oss.smart-bird.cn/images/2026/03/12/1720544690518203.png> 
<https://smart-bird-oss.smart-bird.cn/images/2026/03/12/1720587636233447.png> 
<https://smart-bird-oss.smart-bird.cn/images/2026/03/12/172100616887332.png> 
<https://smart-bird-oss.smart-bird.cn/images/2026/03/12/1721039822931747.png> 
## 官网产品资料 
### 产品详细信息 
<null> 
### 淘宝购买网址 
<null> 
### 京东购买网址 
<null> 
### 开发者文档 
<https://www.smart-bird.cn/doc/product/GSAM/device/GSAW1B/command> 
## 客户常见问题 
 
### 设备可以连接到自己的阿里云服务器吗，数据不需要通过您那边中转吧？ 
是的，配置MQTT参数，即可连接到指定的服务器，数据完全不经过厂商  
 
### 二次开发对接要额外收费吗？ 
不收费。接入自己的平台没有额外费用。  
 
### 自定义 MQTT 配置好了为什么不生效？ 
自定义 MQTT 必须重启设备后才生效（拔插电源，或在配置首页点「重新启动」）。只在配置页点保存不会生效。  
 
### 设备是否支持连接TSL加密服务器？是否支持mqtts？ 
该功能正在研发中，即将更新。可在自定义 MQTT 中配置 mqtts / TLS 加密连接，端口与证书参数按开发文档设置，配置后重启设备生效。  
 
### 为什么控制台上一直显示设备离线/未激活？ 
请先确认： 1、设备是否已经配置了单频的2.4G WiFi，或者4G物联网卡是否正常； 2、是否进行过自定义MQTT操作，自定义MQTT的设备会和控制台MQTT断开连接，此时控制台显示设备离线或未激活是正常的  
 
### 支持二次开发写入我们自己内部的运维平台吗？ 
支持。设备开放 MQTT / TCP协议与指令文档，可直接连接用户自有服务器平台，接入不收取额外费用。  
 
### 能接入哪些系统或平台？支持接入米家/华为生态/涂鸦吗？ 
1、【支持】自建服务器 / 自建平台：你自己的 MQTT Broker（Mosquitto、EMQX、HiveMQ 等）+ 自研业务系统； 2、【支持】第三方物联网云平台：阿里云 IoT、华为云 IoT、腾讯云 IoT等； 3、【支持】开源 / 第三方平台：ThingsBoard、Home Assistant、 4、【不支持】暂不支持接入米家、华为 HiLink、涂鸦等第三方公有生态； 总结：设备面向开发者免费开放MQTT/TCP协议，适合接入自建平台做深度集成。  
 
### 可不可以连接我们的内网服务器？ 
可以。 1、WiFi设备：连接您的内网WiFi后，自定义 MQTT 直连您的内网服务器； 2、4G设备：可安装使用您自己专网卡，自定义MQTT后直连您的内网服务器。 配置完成后重启设备生效，数据不经过厂商。  
 
### 能不能按我提供的MQTT信息批量写入到设备里？ 
支持。可联系工作人员获取批量配置表格。在表单内填写您的服务器参数信息后，由技术人员上传表格至智鸟ERP系统生效。 后续我们还将提供客户运维管理系统（vip.smart-bird.cn），企业客户可通过该平台自己批量维护。  
 
### 是否需要连接网关？ 
不需要。设备WiFi/4G正常通信后，通过协议直连您的服务器平台，无需网关。  
 
### 支持API调用吗？ 
可通过HTTP调用GemeOpen控制台接口。控制台仅供用户测试使用，不能保证稳定性，常会因为其他用户极限测试，影响平台设备正常使用。 如果您是做商用项目，建议通过MQTT/TCP接入您自己搭建的服务器平台，更稳定，更便于后续二次开发。  
 
### 我们是做商用项目的，GemeOpen可不可以提供中性产品？ 
开关、插座类强制认证过的产品，不支持提供中性产品。所有信息均在认证机构做过照片备案，无法修改。 其他非强制认证类产品，外壳支持自定义打标，可修改为用户自有品牌型号信息。  
 
### 自定义mqtt后，客户端发布消息，为什么收不到订阅回复？ 
常见原因： ①订阅/发布的主题与开发文档定义不一致，可尝试将订阅主题发布主题交换位置填写； ②修改自定义 MQTT 后未重启设备； ③服务器参数填写错误，服务器端 ACL 未放行。  
## 产品电气参数 
--- 
| 参数名 | 参数值 | 
|------|------| 
--- 
 
## 控制采集 
 
### 点动控制 
*controller-event-pulseTime* 
 
远程控制设备的导通状态，指令执行后，设备立即导通PUSH和GND。（仅在自动模式下才能触发） 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"messageId" : "202201241610366046",
"pulse" : 1,
"type" : "event"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| pulse | int | 点动控制 ，固定传1 | 1 | 
| type | String | 控制设备点动固定传"event" | event | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"commandName" : "controller-event-pulseTime",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | controller-event-pulseTime | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | 4CEBD60BFD62 | 
| message | String | 执行返回结果 | ok | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| source | String | 指令回复“command" | command | 
| success | boolean | 执行结果 | true | 
---  
 
### 获取设备基础信息 
*info-all* 
 
获取设备信息一般会包含：设备通断电状态、MAC/IMEI、固件版本、设备内网IP地址、设备WIFI网络名称等信息，不同的产品返回的信息有所差异 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"messageId" : "202201241610366046",
"type" : "info"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| type | String | 获取设备基本信息固定传"info" | info | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"commandName" : "info-all",
"delayPowerOn" : 8,
"dhcpEnable" : 1,
"doorMode" : 0,
"ip" : "192.168.0.85",
"mac" : "78EE4CFFD0A0",
"messageId" : "202201241610366046",
"signal" : -75,
"source" : "command",
"ssid" : "GemeOpen",
"type" : "GSAM1B",
"version" : "1.0.0",
"wifiLock" : 1
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | info-all | 
| delayPowerOn | int | 通电延时时间，0-30秒 | 8 | 
| dhcpEnable | int | 自动寻址1：开启， 0：关闭，默认开启 | 1 | 
| doorMode | int | 0 ：常开 、1常闭 2 ：自动 ，默认模式为：自动 | 0 | 
| ip | String | 设备连接WIFI后获取的IP | 192.168.0.85 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | 78EE4CFFD0A0 | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| signal | int | 信号强度，显示规则为： signal<= 0 && signal>= -50 //信号最好 signal< -50 && signal>= -70 //信号较好 signal< -70 && signal>= -80 //信号一般 signal<-80 && signal>= -100 //信号较差 signal没有在0～（-100)之间，表示无信号 | -75 | 
| source | String | 消息来源，自动上报“auto”，指令回复“command”，按键反馈“button” | command | 
| ssid | String | 设备当前连接的WIFI名称 | GemeOpen | 
| type | String | 设备类型 | GSAM1B | 
| version | String | 当前固件版本号 | 1.0.0 | 
| wifiLock | int | 配网锁，0：关闭，1：开启 | 1 | 
---   
 
## 设备维护 
 
### 重置设备 
*controller-reset* 
 
恢复出厂设置后配网信息和自定义信息都会清空，请谨慎操作！ 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"messageId" : "202201241610366046",
"system" : "reset",
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| system | String | 重置/恢复出厂设置默认填"reset" | reset | 
| type | String | 固定传"setting" | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"commandName" : "controller-reset",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | controller-reset | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | 4CEBD60BFD62 | 
| message | String | 执行返回结果 | ok | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| source | String | 指令回复“command" | command | 
| success | boolean | 执行结果 | true | 
---  
 
### 重启设备 
*controller-restart* 
 
软重启后，通过指令设置的参数将生效，同时设备将重新连接Wifi/4G网络，注意设备IP地址可能发生变化 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"messageId" : "202201241610366046",
"system" : "restart",
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| system | String | 重启设备默认填"restart" | restart | 
| type | String | 固定填"setting" | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"commandName" : "controller-restart",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | controller-restart | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | 4CEBD60BFD62 | 
| message | String | 执行返回结果 | ok | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| source | String | 指令回复“command" | command | 
| success | boolean | 执行结果 | true | 
---  
 
### 获取设备通讯信息 
*info-protocol* 
 
获取当前设备与服务端交互的通信协议及协议配置参数，目前支持MQTT、TCP Client，设备出厂时默认接入GemeOpen厂家MQTT测试服务器，免费提供客户调试使用，如需接入自己的服务器或使用其他协议，请自行搭建服务器。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"messageId" : "202201241610366046",
"type" : "protocol"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| type | String | 获取设备通讯信息固定传"protocol" | protocol | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"clientId" : "admin",
"commandName" : "info-protocol",
"messageId" : "202201241610366046",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/qos0",
"server" : "192.168.0.66",
"source" : "command",
"subcribe" : "/topic/qos1",
"username" : "username"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| clientId | String | 自定义MQTT客户端ID注意：不可重复 | admin | 
| commandName | String | 指令名称 | info-protocol | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| port | String | 端口号 | 1883 | 
| protocol | String | 协议类型 | mqtt | 
| publish | String | 自定义发布主题 注意:不可重复 | /topic/qos0 | 
| server | String | 自定义服务器地址 | 192.168.0.66 | 
| source | String | 指令回复“command" | command | 
| subcribe | String | 自定义订阅主题，注意：不可重复 | /topic/qos1 | 
| username | String | 自定义服务器用户名 | username | 
---  
 
### 设置设备通电延时 
*setting-delayPowerOn* 
 
设置点动控制后，门磁再次通电的时间，如设置5秒，按下面板或触发点动控制后，门磁5秒后才会通电，这时合上门磁才会吸合。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"delayPowerOn" : 0,
"messageId" : "202201241610366046",
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| delayPowerOn | int | 通电延时时间，0-30秒 | 0 | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| type | String | 固定传"setting" | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"commandName" : "setting-delayPowerOn",
"delayPowerOn" : 8,
"dhcpEnable" : 1,
"doorMode" : 0,
"ip" : "192.168.122.119
",
"mac" : "4CEBD60BFD62",
"messageId" : "202201241610366046",
"signal" : -75,
"source" : "command",
"ssid" : "GemeOpen",
"type" : "GSAM1B",
"version" : "1.2.3",
"wifiLock" : 0
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | setting-delayPowerOn | 
| delayPowerOn | int | 通电延时时间，0-30秒 | 8 | 
| dhcpEnable | int | 自动寻址1：开启， 0：关闭，默认开启 | 1 | 
| doorMode | int | 0 ：常开 、1常闭 2 ：自动 ，默认模式为：自动 | 0 | 
| ip | String | 设备连接WIFI后获取的IP | 192.168.122.119 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | 4CEBD60BFD62 | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| signal | int | 信号强度，显示规则为： signal<= 0 && signal>= -50 //信号最好 signal< -50 && signal>= -70 //信号较好 signal< -70 && signal>= -80 //信号一般 signal<-80 && signal>= -100 //信号较差 signal没有在0～（-100)之间，表示无信号 | -75 | 
| source | String | 指令回复“command" | command | 
| ssid | String | 设备当前连接的WIFI名称 | GemeOpen | 
| type | String | 设备类型 | GSAM1B | 
| version | String | 当前固件版本号 | 1.2.3 | 
| wifiLock | int | 配网锁，0：关闭，1：开启 | 0 | 
---  
 
### 设置设备常开/常闭/自动模式 
*setting-doorMode* 
 
设置模式为0及常开模式，门磁一直不吸合；设置模式为1及常闭模式，门磁一直吸合；设置模式为2及自动模式，门磁默认吸合状态，通过按动面板或点动控制触发门磁不吸合。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"doorMode" :2,
"messageId" : "202201241610366046",
"type" : "event"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| doorMode | int | 0 ：常开 、1常闭 2 ：自动 ，默认模式为：自动 | 0 | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| type | String | 设备控制传"event" | event | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"commandName" : "setting-doorMode",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"source" : "command",
"success" : true
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | setting-doorMode | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | 4CEBD60BFD62 | 
| message | String | 执行返回结果 | ok | 
| source | String | 指令回复“command" | command | 
| success | boolean | 执行结果 | true | 
---  
 
### 自定义MQTT 
*setting-mqtt* 
 
设备支持自定义MQTT，注意：在通过MQTT自定义MQTT信息后，需要将设备断电重启或者向设备发送重启命令才可生效。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"clientId" : "admin",
"messageId" : "202201241610366046",
"password" : "123456",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/qos0",
"server" : "192.168.0.66",
"subcribe" : "/topic/qos1",
"type" : "custom",
"username" : "username"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| clientId | String | 自定义MQTT客户端ID注意：不可重复 | admin | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| password | String | 密码 | 123456 | 
| port | String | 端口号 | 1883 | 
| protocol | String | 协议类型 | mqtt | 
| publish | String | 自定义发布主题 注意:不可重复 | /topic/qos0 | 
| server | String | 自定义服务器地址 | 192.168.0.66 | 
| subcribe | String | 自定义订阅主题，注意：不可重复 | /topic/qos1 | 
| type | String | 固定传"custom" | custom | 
| username | String | 自定义服务器用户名 | username | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"clientId" : "admin",
"commandName" : "setting-mqtt",
"mac" : "4CEBD60BFD62",
"messageId" : "202201241610366046",
"password" : "123456",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/qos0",
"server" : "192.168.0.66",
"source" : "command",
"subcribe" : "/topic/qos1",
"username" : "username"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| clientId | String | 自定义MQTT客户端ID注意：不可重复 | admin | 
| commandName | String | 指令名称 | setting-mqtt | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | 4CEBD60BFD62 | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| password | String | 密码 | 123456 | 
| port | String | 端口号 | 1883 | 
| protocol | String | 协议类型 | mqtt | 
| publish | String | 自定义发布主题 注意:不可重复 | /topic/qos0 | 
| server | String | 自定义服务器地址 | 192.168.0.66 | 
| source | String | 指令回复“command" | command | 
| subcribe | String | 自定义订阅主题，注意：不可重复 | /topic/qos1 | 
| username | String | 自定义服务器用户名 | username | 
---  
 
### 清除已匹配遥控器 
*setting-remote-clear* 
 
支持通过指令远程清除匹配遥控器。可一次性清除全部4个按键，也可单独清除指定按键。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"messageId" : "20260520",
"remoteMatch" : 2,
"remoteMatchKey" : "A",
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| messageId | String | 业务流水号。由请求方生成的唯一标识，响应方原样回显，用于请求与响应的关联匹配。 | 20260520 | 
| remoteMatch | int | 1 开始匹配，0 取消匹配，2 清除已匹配数据 | 2 | 
| remoteMatchKey | String | 单独清除指定按键："A" "B" "C" "D"。不传或传空字符串 "" 表示清除全部 | A | 
| type | String | 设备设置固定传"setting" | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"commandName" : "setting-remote-clear",
"mac" : "2026bb16aa14",
"message" : "ok",
"messageId" : "20260520",
"remoteMatched" : 1,
"remoteMatchKey" : "A",
"remoteMatchStep" : "",
"source" : "command",
"success" : true
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | setting-remote-clear | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | 2026bb16aa14 | 
| message | String | 执行返回结果 | ok | 
| messageId | String | 业务流水号。由请求方生成的唯一标识，响应方原样回显，用于请求与响应的关联匹配。 | 20260520 | 
| remoteMatched | int | int 遥控器匹配状态：0 未匹配，1 已匹配 | 1 | 
| remoteMatchKey | String | 单独清除指定按键："A" "B" "C" "D"。不传或传空字符串 "" 表示清除全部 | A | 
| remoteMatchStep | String | 当前等待学习的按键："A" "B" "C" "D"，未在匹配模式为空字符串 "" | | 
| source | String | 指令回复“command" | command | 
| success | boolean | 执行结果 | true | 
---  
 
### 进入遥控器匹配模式 
*setting-remote-match* 
 
支持通过指令远程匹配遥控器。可一次性学习全部4个按键，也可单独学习指定按键。设备进入匹配模式后，等待接收对应按键信号，学习成功后断电保存。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"messageId" : "20260520",
"remoteMatch" : 2,
"remoteMatchKey" : "A",
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| messageId | String | 业务流水号。由请求方生成的唯一标识，响应方原样回显，用于请求与响应的关联匹配。 | 20260520 | 
| remoteMatch | int | 1 开始匹配，0 取消匹配，2 清除已匹配数据 | 2 | 
| remoteMatchKey | String | 单独学习指定按键："A" "B" "C" "D"。不传或传空字符串 "" 表示学习全部4个按键 | A | 
| type | String | 固定传 "setting" | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"commandName" : "setting-remote-match",
"mac" : "2026bb16aa14",
"message" : "ok",
"messageId" : "key C matched",
"remoteMatched" : 1,
"remoteMatchKey" : "A",
"remoteMatchStep" : "",
"source" : "auto",
"success" : true
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | setting-remote-match | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | 2026bb16aa14 | 
| message | String | 执行返回结果 | ok | 
| messageId | String | 业务流水号。由请求方生成的唯一标识，响应方原样回显，用于请求与响应的关联匹配。 | key C matched | 
| remoteMatched | int | int 遥控器匹配状态：0 未匹配，1 已匹配 | 1 | 
| remoteMatchKey | String | 单独学习指定按键："A" "B" "C" "D"。不传或传空字符串 "" 表示学习全部4个按键 | A | 
| remoteMatchStep | String | 当前等待学习的按键："A" "B" "C" "D"，未在匹配模式为空字符串 "" | | 
| source | String | 指令回复“command" | auto | 
| success | boolean | 执行结果 | true | 
---  
 
### 自定义TCP 
*setting-tcp* 
 
设备支持通过MQTT方式自定义TCP信息，注意：通过MQTT自定义TCP信息后，需要将设备断电重启或者向设备发送重启命令才可生效。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"messageId" : "202201241610366046",
"port" : "1883",
"protocol" : "mqtt",
"server" : "192.168.0.66",
"type" : "custom"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| port | String | 端口号 | 1883 | 
| protocol | String | 协议类型 | mqtt | 
| server | String | 自定义服务器地址 | 192.168.0.66 | 
| type | String | 固定传"custom" | custom | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"commandName" : "setting-tcp ",
"messageId" : "202201241610366046",
"port" : "1883",
"protocol" : "mqtt",
"server" : "192.168.0.66",
"source" : "command"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | setting-tcp | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| port | String | 端口号 | 1883 | 
| protocol | String | 协议类型 | mqtt | 
| server | String | 自定义服务器地址 | 192.168.0.66 | 
| source | String | 指令回复“command" | command | 
---  
 
### 设置WiFi账号 
*setting-wifi-config* 
 
修改设备的 WiFi 连接信息（网络名称与密码），使设备连接至指定的 WiFi 网络。设备仅支持 2.4G WiFi（不支持 5G 频段），请确认目标网络为 2.4G。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"messageId" : "202201241610366046",
"password" : "123456",
"ssid" : "GemeOpen",
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| password | String | 密码 | 123456 | 
| ssid | String | 设备当前连接的WIFI名称 | GemeOpen | 
| type | String | 固定传"setting" | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"commandName" : "setting-wifi-config",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | setting-wifi-config | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | 4CEBD60BFD62 | 
| message | String | 执行返回结果 | ok | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| source | String | 指令回复“command" | command | 
| success | boolean | 执行结果 | true | 
---  
 
### 设置IP获取方式 
*setting-wifi-dhcpEnable* 
 
配置设备的 IP 获取方式，设备出厂时IP获取方式默认为DHCP，静态 IP 需位于路由器网段内且未被占用，否则可能无法联网或冲突。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"dhcpEnable" : 1,
"dns" : "192.168.0.1",
"gateway" : "192.168.0.1",
"local_ip" : "192.168.0.118",
"messageId" : "202201241610366046",
"subnet" : "255.255.255.0",
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| dhcpEnable | int | 自动寻址1：开启， 0：关闭，默认开启 | 1 | 
| dns | String | DNS服务器地址 | 192.168.0.1 | 
| gateway | String | 默认网关 | 192.168.0.1 | 
| local_ip | String | IP地址 | 192.168.0.118 | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| subnet | String | 子网掩码 | 255.255.255.0 | 
| type | String | 设备设置固定传"setting" | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"commandName" : "setting-wifi-dhcpEnable",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | setting-wifi-dhcpEnable | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | 4CEBD60BFD62 | 
| message | String | 执行返回结果 | ok | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| source | String | 指令回复“command" | command | 
| success | boolean | 执行结果 | true | 
---  
 
### 设置WiFi配网锁 
*setting-wifi-lock* 
 
wifi配网锁定后，设备无法通过长按配网按钮进入配网操作，仅能通过MQTT/TCP协议解锁配网功能<br/> 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"type" : "setting",
"wifiLock" : 0
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| type | String | 设备设置固定传"setting" | setting | 
| wifiLock | int | 配网锁，0：关闭，1：开启 | 0 | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"commandName" : "setting-wifi-lock",
"delayPowerOn" : 8,
"dhcpEnable" : 1,
"doorMode" : 0,
"ip" : "192.168.122.119
",
"mac" : "4CEBD60BFD62",
"messageId" : "202201241610366046",
"signal" : -75,
"source" : "command",
"ssid" : "GemeOpen",
"type" : "GSAM1B",
"version" : "1.2.3",
"wifiLock" : 0
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | setting-wifi-lock | 
| delayPowerOn | int | 通电延时时间，0-30秒 | 8 | 
| dhcpEnable | int | 自动寻址1：开启， 0：关闭，默认开启 | 1 | 
| doorMode | int | 0 ：常开 、1常闭 2 ：自动 ，默认模式为：自动 | 0 | 
| ip | String | 设备连接WIFI后获取的IP | 192.168.122.119 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | 4CEBD60BFD62 | 
| messageId | String | 消息ID字段 | 202201241610366046 | 
| signal | int | 信号强度，显示规则为： signal<= 0 && signal>= -50 //信号最好 signal< -50 && signal>= -70 //信号较好 signal< -70 && signal>= -80 //信号一般 signal<-80 && signal>= -100 //信号较差 signal没有在0～（-100)之间，表示无信号 | -75 | 
| source | String | 指令回复“command" | command | 
| ssid | String | 设备当前连接的WIFI名称 | GemeOpen | 
| type | String | 设备类型 | GSAM1B | 
| version | String | 当前固件版本号 | 1.2.3 | 
| wifiLock | int | 配网锁，0：关闭，1：开启 | 0 | 
---