# 220V智能断路器63A-WiFi版 (型号：GSBR2B) - 开发者指令 
## 产品基本描述 
本设备是支持二次开发的导轨式智能断路器，AC 220V工作电压，最大工作电流63A，最大负载可达12KW。可远程控制分合闸、用电数据监测采集，支持电量信息定时上报，过流过压过载告警。
2.4GHz WiFi 通信，可在内网、专网环境使用。支持MQTT/TCP协议接入用户自建服务器平台，还可以通过API接口来进行自定义应用程序和系统集成。 
## 产品主要特点 
WiFi网络，电流/电压/视在功率电量采集
AC 220V输入，
最大负载电流63A，可设阈值 
## 产品图 
<https://smart-bird-oss.smart-bird.cn/images/2026/09/18/14553938067846.png> 
<https://smart-bird-oss.smart-bird.cn/images/2026/01/22/1016497961586309.png> 
<https://smart-bird-oss.smart-bird.cn/images/2026/01/22/1017055130330751.png> 
<https://smart-bird-oss.smart-bird.cn/images/2026/01/22/1017146243238465.png> 
<https://smart-bird-oss.smart-bird.cn/images/2026/09/18/958538686830105.png> 
## 官网产品资料 
### 品牌信息说明 
品牌LOGO <https://smart-bird-oss.smart-bird.cn/images/2026/02/18/1722133698642421.png> 
智鸟科技GemeOpen专注为软件开发者提供商用智能设备，软件工程师通过简单的测试即可完成项目设备选型，使用标准的MQTT/TCP协议，发送JSON指令控制设备通断电、查询设备用电信息。能够极大节省项目实施时间与自研设备风险，与厂商云解耦，搭建私有化MQTT服务，完全掌控设备且无任何捆绑与隐性成本！ 
### 产品详细信息 
<https://www.smart-bird.cn/air-switch-wifi.html> 
### 淘宝购买网址 
<https://item.taobao.com/item.htm?ft=t&id=805708183085> 
### 京东购买网址 
<null> 
### 开发者文档 
<https://www.smart-bird.cn/doc/product/GSBR/device/GSBR2B/command> 
## 产品电气参数 
--- 
| 参数名 | 参数值 | 
|------|------| 
| 品牌 | GemeOpen | 
| 上市日期 | 2025年 | 
| 产品类型 | 智能断路器63A-2P-WiFi版 | 
| 产品型号 | GSBR2B | 
| 外观尺寸 | 54mm*100mm*69mm | 
| 极数 | 2P（火线+零线） | 
| 接线方式 | 一零一火 | 
| 输入电压 | 220Vac | 
| 工作电流 | MAX 63A | 
| 最大负载 | MAX 12KW | 
| 待机功率 | ＜3W | 
| 额定短路能力 | 6kA | 
| 分断能力 | Ics为6000A | 
| 瞬时脱扣特性 | C型，5-10倍额定电流 | 
| 温度 | 工作温度-5℃ ~ 40℃；极限温度 -25℃ ~ 70℃ | 
| 工作湿度 | +40℃，≤50%RH；+25℃，≤90%RH | 
| 通讯方式 | 2.4GHz WIFI | 
| 通讯模块 | 乐鑫ESP8266 | 
| 设备寿命 | 机械寿命通断10000次，电气寿命通断6000次 | 
| 灭弧方式 | 空气灭弧 | 
| 防护等级 | IP20 | 
| 测量精度 | ±2% | 
| 接线方式 | 夹箍接线 | 
| 安装方式 | 35 x 7.5mm标准导轨安装 | 
| 海拔 | 安装地点 <=2000米 | 
| 外壳材质 | PC阻燃 | 
| 数据监测 | 监控被测的每一条用电回路的电流、电压、功率、电量、整体板载温度等数据 | 
| 3C证书编号 | 2025010307762071 | 
--- 
 
## 控制采集 
 
### 远程控制设备通断电 
*controller-event* 
 
通断器、空开、10A-86插座、16A-86插座、10A转换器插座、16A转换器插座等单路设备的通电或断电操作 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"key" : 0,
"type" : "event"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| key | int | 插座通断电状态，0：断电，1：通电 | 0 | 
| type | String | 控制设备开合闸固定传"event" | event | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"bssid" : "742ad7790468",
"channel" : "6",
"code" : "GSBR2B",
"commandName" : "controller-event",
"ip" : "192.168.0.3",
"key" : 0,
"keyLock" : 0,
"mac" : "e868e7637a41",
"signal" : -40,
"source" : "command",
"ssid" : "gemeopen",
"timerEnable" : 0,
"timerInterval" : 10,
"version" : "1.3.11",
"wifiLock" : 0
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| bssid | String | 路由器 MAC 地址 | 742ad7790468 | 
| channel | String | 主从机或多子机时，使用channel | 6 | 
| code | String | 设备型号代码 | GSBR2B | 
| commandName | String | 指令名称 | controller-event | 
| ip | String | 设备连接WIFI后获取的IP | 192.168.0.3 | 
| key | int | 设备通断电状态，0：断电，1：通电 | 0 | 
| keyLock | int | 按键锁，0：关闭，1：开启 | 0 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | e868e7637a41 | 
| signal | int | 信号强度，显示规则为： signal<= 0 && signal>= -50 //信号最好 signal< -50 && signal>= -70 //信号较好 signal< -70 && signal>= -80 //信号一般 signal<-80 && signal>= -100 //信号较差 signal没有在0～（-100)之间，表示无信号 | -40 | 
| source | String | 指令回复“command" | command | 
| ssid | String | 设备当前连接的WIFI名称 | gemeopen | 
| timerEnable | int | 设备统计信息定时上报状态，0：关闭；1：开启 | 0 | 
| timerInterval | int | 设备统计信息上报时间间隔（单位秒），取值范围5-86400 | 10 | 
| version | String | 当前固件版本号 | 1.3.11 | 
| wifiLock | int | 配网锁，0：关闭，1：开启 | 0 | 
---  
 
### 设置定时上报任务频率 
*device-timer-interval* 
 
设置定时上报电量信息 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"timerEnable" : 1,
"timerInterval" : 15,
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| timerEnable | int | 设备电量信息定时上报状态，0：关闭；1：开启 | 1 | 
| timerInterval | int | 电量信息上报时间间隔（单位秒），取值范围5-86400 | 15 | 
| type | String | 设备设置固定传"setting" | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "mac": "e868e7637a41",
 "code": "GSBR2B",
 "version": "1.3.11",
 "key": 0,
 "wifiLock": 0,
 "keyLock": 0,
 "ip": "192.168.0.3",
 "ssid": "gemeopen",
 "bssid": "742ad7790468",
 "channel": 6,
 "signal": -41,
 "source": "command",
 "commandName": "controller-event",
 "timerInterval": 15,
 "timerEnable": 0
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| bssid | String | 路由器 MAC 地址 | 742ad7790468 | 
| channel | String | 主从机或多子机时，使用channel | 6 | 
| code | String | 设备型号代码 | GSBR2B | 
| commandName | String | 指令名称 | controller-event | 
| ip | String | 设备连接WIFI后获取的IP | 192.168.0.3 | 
| key | int | 设备通断电状态，0：断电，1：通电 | 0 | 
| keyLock | int | 按键锁，0：关闭，1：开启 | 0 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | e868e7637a41 | 
| signal | int | 信号强度，显示规则为： signal<= 0 && signal>= -50 //信号最好 signal< -50 && signal>= -70 //信号较好 signal< -70 && signal>= -80 //信号一般 signal<-80 && signal>= -100 //信号较差 signal没有在0～（-100)之间，表示无信号 | -41 | 
| source | String | 指令回复“command" | command | 
| ssid | String | 设备当前连接的WIFI名称 | gemeopen | 
| timerEnable | int | 设备统计信息定时上报状态，0：关闭；1：开启 | 0 | 
| timerInterval | int | 设备统计信息上报时间间隔（单位秒），取值范围5-86400 | 15 | 
| version | String | 当前固件版本号 | 1.3.11 | 
| wifiLock | int | 配网锁，0：关闭，1：开启 | 0 | 
---  
 
### 用电数据自动上报 
*device-timer-task* 
 
查看设备定时上报数据的 JSON 格式，供服务器端对接解析设备上报的数据。是否上报与上报频率由"设置数据定时上报频率"指令配置，配置后设备按周期将数据发布至约定主题（topic），设备端无订阅行为（仅发布），服务端订阅该发布主题后即可接收上报数据。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "voltage": 2305,
 "current": 0,
 "power": 0,
 "key": 0,
 "energy": 0,
 "source": "command",
 "commandName": "device-timer-task",
 "mac": "e868e7637a41"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | device-timer-task | 
| current | float | 当前电流，单位A，保留三位小数 | 0 | 
| energy | float | 累计用电量，单位KW*H，保留三位小数，断电后不会归零，重置后会归零 | 0 | 
| key | int | 设备通断电状态，0：断电，1：通电 | 0 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | e868e7637a41 | 
| power | float | 当前功率，单位W，保留三位小数 | 0 | 
| source | String | 指令回复“command" | command | 
| voltage | float | 当前电压，单位V，保留三位小数 | 2305 | 
---  
 
### 获取设备基础信息 
*info-all* 
 
获取设备信息一般会包含：设备通断电状态、MAC/IMEI、固件版本、设备内网IP地址、设备WIFI网络名称等信息，不同的产品返回的信息有所差异 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"type" : "info"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| type | String | 获取设备基本信息固定传"info" | info | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "mac": "e868e7637a41",
 "code": "GSBR2B",
 "version": "1.3.11",
 "key": 0,
 "wifiLock": 0,
 "keyLock": 0,
 "ip": "192.168.0.3",
 "ssid": "gemeopen",
 "bssid": "742ad7790468",
 "channel": 6,
 "signal": -35,
 "source": "command",
 "commandName": "info-all",
 "timerInterval": 10,
 "timerEnable": 0
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| bssid | String | 路由器 MAC 地址 | 742ad7790468 | 
| channel | String | 主从机或多子机时，使用channel | 6 | 
| code | String | 设备型号代码 | GSBR2B | 
| commandName | String | 指令名称 | info-all | 
| ip | String | 设备连接WIFI后获取的IP | 192.168.0.3 | 
| key | int | 设备通断电状态，0：断电，1：通电 | 0 | 
| keyLock | int | 按键锁，0：关闭，1：开启 | 0 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | e868e7637a41 | 
| signal | int | 信号强度，显示规则为： signal<= 0 && signal>= -50 //信号最好 signal< -50 && signal>= -70 //信号较好 signal< -70 && signal>= -80 //信号一般 signal<-80 && signal>= -100 //信号较差 signal没有在0～（-100)之间，表示无信号 | -35 | 
| source | String | 指令回复“command" | command | 
| ssid | String | 设备当前连接的WIFI名称 | gemeopen | 
| timerEnable | int | 设备统计信息定时上报状态，0：关闭；1：开启 | 0 | 
| timerInterval | int | 设备统计信息上报时间间隔（单位秒），取值范围5-86400 | 10 | 
| version | String | 当前固件版本号 | 1.3.11 | 
| wifiLock | int | 配网锁，0：关闭，1：开启 | 0 | 
---  
 
### 获取设备剩余电量 
*info-chargeenergy* 
 
该指令只针对开启了预付费功能的设备有效。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"type" : "chargeenergy"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| type | String | 设备设置固定传“chargeenergy” | chargeenergy | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "chargeenergy": 0,
 "source": "command",
 "commandName": "info-chargeenergy"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| chargeenergy | int | “12”为剩余电量，即剩余12KWH电量可用 | 0 | 
| commandName | String | 指令名称 | info-chargeenergy | 
| source | String | 指令回复“command" | command | 
---  
 
### 获取设备统计信息 
*info-statistic* 
 
获取设备采集的累积电量、实时电压、实时电流、实时功率信息，注意不同的设备数值单位有区别，取决于设备设计的精度 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"type" : "statistic"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| type | String | 获取设备电量信息固定传"statistic" | statistic | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "voltage": 2306,
 "current": 0,
 "power": 0,
 "key": 0,
 "energy": 0,
 "source": "command",
 "commandName": "info-statistic",
 "mac": "e868e7637a41"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | info-statistic | 
| current | float | 当前电流，单位A，保留三位小数 | 0 | 
| energy | float | 累计用电量，单位KW*H，保留三位小数，断电后不会归零，重置后会归零 | 0 | 
| key | int | 设备通断电状态，0：断电，1：通电 | 0 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | e868e7637a41 | 
| power | float | 当前功率，单位W，保留三位小数 | 0 | 
| source | String | 指令回复“command" | command | 
| voltage | float | 当前电压，单位V，保留三位小数 | 2306 | 
---  
 
### 获取设备板载温度 
*info-temperature* 
 
 触发该指令可以查询设备板载温度，如"temperature": 290,及温度：29.0℃ 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"type" : "temperature"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| type | String | 获取设备板载温度固定传"temperature"。 | temperature | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "temperature": 290,
 "mac": "e868e7637a41",
 "ip": "192.168.0.3",
 "source": "command",
 "commandName": "info-temperature"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | info-temperature | 
| ip | String | 设备连接WIFI后获取的IP | 192.168.0.3 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | e868e7637a41 | 
| source | String | 指令回复“command" | command | 
| temperature | float | 板载温度为17℃ | 170 | 
---   
 
## 告警任务 
 
### 获取设备全部告警设置 
*info-allset* 
 
获取设备过载、漏电、过温、过流、欠压、过压设置信息 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"type" : "allset"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| type | String | 获取设备告警设置信息固定传"allset" | allset | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "overvoltage": 275,
 "overvol_set": 1,
 "overcurrent": 63,
 "overcur_set": 1,
 "overpower": 13,
 "overpow_set": 1,
 "leak": 30,
 "leak_set": 1,
 "undervoltage": 160,
 "undervol_set": 1,
 "overtemp": 80,
 "overtemp_set": 1,
 "balance": 10,
 "balance_set": 0,
 "source": "command",
 "commandName": "info-allset"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| balance | int | 余额不足阈值，如余额不足阈值为：10kwh | 10 | 
| commandName | String | 指令名称 | info-allset | 
| leak | int | 漏电阈值，如漏电阈值为：30ma | 30 | 
| overcurrent | int | 过流阈值，如过流阈值为：63A | 63 | 
| overpower | int | 过载阈值，如过载阈值为：13kw | 13 | 
| overtemp | int | 过温阈值，如过温阈值为：80℃ | 80 | 
| overvoltage | int | 过压阈值，如过压阈值为：275V | 275 | 
| source | String | 指令回复“command" | command | 
| undervoltage | int | 欠压阈值，如欠压阈值为：160V | 160 | 
---  
 
### 设置设备过载/漏电/过温告警信息 
*setting-seterror1* 
 
 支持过载、漏电、过温告警阈值配置，设备上报告警状态，云端接收告警通知。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"leak" : 30,
"leak_set" : 1,
"overpower" : 13,
"overpow_set" : 0,
"overtemp" : 80,
"overtem_set" : 1,
"type" : "seterror1"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| leak | int | 漏电阈值，如漏电阈值为：30ma | 30 | 
| leak_set | int | 漏电时是否跳闸，1：跳闸，0：不跳闸 | 1 | 
| overpower | int | 过载阈值，如过载阈值为：13kw | 13 | 
| overpow_set | int | 过载时是否跳闸，1：跳闸，0：不跳闸 | 0 | 
| overtemp | int | 过温阈值，如过温阈值为：80℃ | 80 | 
| overtem_set | int | 过温时是否跳闸，1：跳闸，0：不跳闸 | 1 | 
| type | String | 设备设置固定值"seterror1" | seterror1 | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "commandName": "setting-seterror1",
 "mac": "e868e7637a41",
 "message": "ok",
 "source": "command",
 "success": true
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | setting-seterror1 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | e868e7637a41 | 
| message | String | 执行结果描述：对命令执行结果的文本说明。执行完成且无异常：ok ；如果出现异常，返回异常结果描述。 | ok | 
| source | String | 指令回复“command" | command | 
| success | boolean | 执行结果，执行成功：true；执行失败：false | true | 
---  
 
### 设置过流/欠压/过压告警信息 
*setting-seterror2* 
 
 设置设备过流、欠压、过压信息，若超过设置的值，自动触发空开跳闸 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"balance" : 10,
"balance_set" : 0,
"overcurrent" : 63,
"overcur_set" : 1,
"overvoltage" : 275,
"overvol_set" : 1,
"type" : "seterror2",
"undervoltage" : 160,
"undervol_set" : 1
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| balance | int | 余额不足阈值，如余额不足阈值为：10kwh | 10 | 
| balance_set | int | 余额不足时是否跳闸，1：跳闸，0：不跳闸 | 0 | 
| overcurrent | int | 过流阈值，如过流阈值为：63A | 63 | 
| overcur_set | int | 过流时是否跳闸，1：跳闸，0：不跳闸 | 1 | 
| overvoltage | int | 过压阈值，如过压阈值为：275V | 275 | 
| overvol_set | int | 过压时是否跳闸：1:跳闸，0:不跳闸 | 1 | 
| type | String | 设备设置固定值"seterror2" | seterror2 | 
| undervoltage | int | 欠压阈值，如欠压阈值为：160V | 160 | 
| undervol_set | int | 欠压时是否跳闸，1：跳闸，0：不跳闸 | 1 | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "commandName": "setting-seterror2",
 "mac": "e868e7637a41",
 "message": "ok",
 "source": "command",
 "success": true
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | setting-seterror2 | 
| mac | String | wifi设备mac地址，唯一标识 | e868e7637a41 | 
| message | String | 执行结果描述：对命令执行结果的文本说明。执行完成且无异常：ok ；如果出现异常，返回异常结果描述。 | ok | 
| source | String | 指令回复“command" | command | 
| success | boolean | 执行结果，执行成功：true；执行失败：false | true | 
---   
 
## 设备维护 
 
### 重置/恢复出厂设置 
*controller-reset* 
 
恢复出厂设置后配网信息和自定义信息都会清空，请谨慎操作！ 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"system" : "reset",
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| system | String | 重置/恢复出厂设置默认填"reset" | reset | 
| type | String | 设备设置固定传"setting" | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "success": true,
 "message": "ok",
 "commandName": "controller-reset",
 "source": "command",
 "mac": "e868e7637a41"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | controller-reset | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | e868e7637a41 | 
| message | String | 执行结果描述：对命令执行结果的文本说明。执行完成且无异常：ok ；如果出现异常，返回异常结果描述。 | ok | 
| source | String | 指令回复“command" | command | 
| success | boolean | 执行结果，执行成功：true；执行失败：false | true | 
---  
 
### 设备软重启 
*controller-restart* 
 
软重启后，通过指令设置的参数将生效，同时设备将重新连接Wifi/4G网络，注意设备IP地址可能发生变化 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"system" : "restart",
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| system | String | 设备软重启固定传"restart" | restart | 
| type | String | 设备设置固定传"setting" | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "success": true,
 "message": "ok",
 "commandName": "controller-restart",
 "source": "command",
 "mac": "e868e7637a41"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | controller-restart | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | e868e7637a41 | 
| message | String | 执行结果描述：对命令执行结果的文本说明。执行完成且无异常：ok ；如果出现异常，返回异常结果描述。 | ok | 
| source | String | 指令回复“command" | command | 
| success | boolean | 执行结果，执行成功：true；执行失败：false | true | 
---  
 
### 告警信息自动上报 
*error-error* 
 
 0，无告警；1，短路告警；2，浪涌告警；4，过载告警；8，漏电告警；16，温度异常告警；32，打火告警；64，高功率告警；128，漏电自检不正常；256，过流告警；512，三相电流不平衡告警；1024，过压告警；2048，欠压告警；4096，三相缺相告警；8192，停电事件告警；16384，磁影响告警；32768，余额不足告警；65535，欠费告警； 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"error" : 0
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| error | int | 0，无告警；1，短路告警；2，浪涌告警；4，过载告警；8，漏电告警；16，温度异常告警；32，打火告警；64，高功率告警；128，漏电自检不正常；256，过流告警；512，三相电流不平衡告警；1024，过压告警；2048，欠压告警；4096，三相缺相告警；8192，停电事件告警；16384，磁影响告警；32768，余额不足告警；65535，欠费告警； | 0 | 
---  
 
### 电量充值 
*setting-chargeenergy* 
 
该指令只针对开启了预付费功能的设备有效。  
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"chargeenergy" : 1200,
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| chargeenergy | int | 充值的电量数值，如：充值12KWH, chargeenergy为1200，可设置范围为：0~999999 | 1200 | 
| type | String | 设备设置固定传“setting” | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "mac": "e868e7637a41",
 "ip": "192.168.0.3",
 "source": "command",
 "commandName": "setting-chargeenergy",
 "message": "ok",
 "success": true
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| commandName | String | 指令名称 | setting-chargeenergy | 
| ip | String | 设备连接WIFI后获取的IP | 192.168.0.3 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | e868e7637a41 | 
| message | String | 执行结果描述：对命令执行结果的文本说明。执行完成且无异常：ok ；如果出现异常，返回异常结果描述。 | ok | 
| source | String | 指令回复“command" | command | 
| success | boolean | 执行结果，执行成功：true；执行失败：false | true | 
---  
 
### 设置按键控制锁 
*setting-key-lock* 
 
功能按键锁定后，设备仅能通过MQTT/TCP协议操作，例如控制开关的通断、插座的通断电，都只能通过指令操作 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"keyLock" : 0,
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| keyLock | int | 按键锁，0：关闭，1：开启 | 0 | 
| type | String | 设备设置固定传"setting" | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
 "mac": "e868e7637a41",
 "code": "GSBR2B",
 "version": "1.3.11",
 "key": 0,
 "wifiLock": 0,
 "keyLock": 0,
 "ip": "192.168.0.3",
 "ssid": "gemeopen",
 "bssid": "742ad7790468",
 "channel": 6,
 "signal": -36,
 "source": "command",
 "commandName": "setting-key-lock",
 "timerInterval": 15,
 "timerEnable": 0
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| bssid | String | 路由器 MAC 地址 | 742ad7790468 | 
| channel | String | 主从机或多子机时，使用channel | 6 | 
| code | String | 设备型号代码 | GSBR2B | 
| commandName | String | 指令名称 | setting-key-lock | 
| ip | String | 设备连接WIFI后获取的IP | 192.168.0.3 | 
| key | int | 设备通断电状态，0：断电，1：通电 | 0 | 
| keyLock | int | 按键锁，0：关闭，1：开启 | 0 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | e868e7637a41 | 
| signal | int | 信号强度，显示规则为： signal<= 0 && signal>= -50 //信号最好 signal< -50 && signal>= -70 //信号较好 signal< -70 && signal>= -80 //信号一般 signal<-80 && signal>= -100 //信号较差 signal没有在0～（-100)之间，表示无信号 | -36 | 
| source | String | 指令回复“command" | command | 
| ssid | String | 设备当前连接的WIFI名称 | gemeopen | 
| timerEnable | int | 设备统计信息定时上报状态，0：关闭；1：开启 | 0 | 
| timerInterval | int | 设备统计信息上报时间间隔（单位秒），取值范围5-86400 | 15 | 
| version | String | 当前固件版本号 | 1.3.11 | 
| wifiLock | int | 配网锁，0：关闭，1：开启 | 0 | 
---  
 
### 自定义MQTT参数 
*setting-mqtt* 
 
设备支持自定义MQTT，注意：在通过MQTT自定义MQTT信息后，需要将设备断电重启或者向设备发送重启命令才可生效。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"clientId" : "custom",
"password" : "password",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/qos0",
"server" : "192.168.0.66",
"subcribe" : "/topic/qos1",
"type" : "custom",
"username" : "username"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| clientId | String | 自定义MQTT客户端ID注意：不可重复 | custom | 
| password | String | 密码 | password | 
| 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" : "custom",
"password" : "password",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/qos0",
"server" : "192.168.0.66",
"subcribe" : "/topic/qos1",
"type" : "custom",
"username" : "username"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| clientId | String | 自定义MQTT客户端ID注意：不可重复 | custom | 
| password | String | 密码 | password | 
| 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 | 
---  
 
### 预付费功能设置 
*setting-prepayment* 
 
开启预付费功能后，可以进行电费充值 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
" prepayment" : 1,
"type" : "setting"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| prepayment | int | 是否开启预付费功能， 0：关闭；1：开启 | 1 | 
| type | String | 设备设置固定传“setting” | setting | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"error" : 0
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| error | int | 0，无告警；1，短路告警；2，浪涌告警；4，过载告警；8，漏电告警；16，温度异常告警；32，打火告警；64，高功率告警；128，漏电自检不正常；256，过流告警；512，三相电流不平衡告警；1024，过压告警；2048，欠压告警；4096，三相缺相告警；8192，停电事件告警；16384，磁影响告警；32768，余额不足告警；65535，欠费告警； | 0 | 
---  
 
### 自定义TCP客户端 
*setting-tcp* 
 
设备支持通过MQTT方式自定义TCP信息，注意：通过MQTT自定义TCP信息后，需要将设备断电重启或者向设备发送重启命令才可生效。 
 
**向设备发送指令（服务端向设备订阅topic发送消息）** 
```json 
{
"port" : "8080",
"protocol" : "tcp",
"server" : "192.168.0.66",
"type" : "custom"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| port | String | 端口号 | 8080 | 
| protocol | String | 协议类型 | tcp | 
| server | String | 自定义服务器地址 | 192.168.0.66 | 
| type | String | 设备自定义固定传"custom" | custom | 
--- 
**设备返回信息（设备向服务端订阅topic上报消息）** 
```json 
{
"port" : "8080",
"protocol" : "tcp",
"server" : "192.168.0.66"
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| port | String | 端口号 | 8080 | 
| protocol | String | 协议类型 | tcp | 
| server | String | 自定义服务器地址 | 192.168.0.66 | 
---  
 
### 设置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 
{
 "mac": "e868e7637a41",
 "code": "GSBR2B",
 "version": "1.3.11",
 "key": 0,
 "wifiLock": 0,
 "keyLock": 0,
 "ip": "192.168.0.3",
 "ssid": "gemeopen",
 "bssid": "742ad7790468",
 "channel": 6,
 "signal": -42,
 "source": "command",
 "commandName": "setting-wifi-lock",
 "timerInterval": 15,
 "timerEnable": 0
} 
``` 
#### 字段属性 
--- 
| 字段名称 | 字段类型 | 字段说明 | 示例值 | 
|------|------|------|------| 
| bssid | String | 路由器 MAC 地址 | 742ad7790468 | 
| channel | String | 主从机或多子机时，使用channel | 6 | 
| code | String | 设备型号代码 | GSBR2B | 
| commandName | String | 指令名称 | setting-wifi-lock | 
| ip | String | 设备连接WIFI后获取的IP | 192.168.0.3 | 
| key | int | 设备通断电状态，0：断电，1：通电 | 0 | 
| keyLock | int | 按键锁，0：关闭，1：开启 | 0 | 
| mac | String | wifi设备MAC地址或4G设备的IMEI号，唯一标识 | e868e7637a41 | 
| signal | int | 信号强度，显示规则为： signal<= 0 && signal>= -50 //信号最好 signal< -50 && signal>= -70 //信号较好 signal< -70 && signal>= -80 //信号一般 signal<-80 && signal>= -100 //信号较差 signal没有在0～（-100)之间，表示无信号 | -42 | 
| source | String | 指令回复“command" | command | 
| ssid | String | 设备当前连接的WIFI名称 | gemeopen | 
| timerEnable | int | 设备统计信息定时上报状态，0：关闭；1：开启 | 0 | 
| timerInterval | int | 设备统计信息上报时间间隔（单位秒），取值范围5-86400 | 15 | 
| version | String | 当前固件版本号 | 1.3.11 | 
| wifiLock | int | 配网锁，0：关闭，1：开启 | 0 | 
---