GemeOpen 交流双路智能通断器10A-WiFi (型号:GSMM2B) - 开发者指令
# 交流双路智能通断器10A-WiFi (型号:GSMM2B) - 开发者指令
## 产品基本描述
## 产品主要特点
WiFi网络,双路输出,
AC85~265V宽电压输入,
AC85~265V宽电压输入,
## 官网产品资料
### 产品详细信息
### 淘宝购买网址
### 京东购买网址
### 开发者文档
https://www.smart-bird.cn/doc/product/GSCW/device/GSMM2B/command
## 产品电气参数
---
| 参数名 | 参数值 |
|------|------|
|
品牌
| GemeOpen
|
|
上市日期
| 2026年
|
|
产品类型
| 交流双路智能通断器10A-WiFi
|
|
产品型号
| GSMM2B
|
|
产品尺寸
| 54mm*68mm*26mm
|
|
输入电压
| 85Vac-265Vac
|
|
输出通道
| 双路
|
|
工作电流
| 10A
|
|
最大负载
| MAX 2500W (1250W/路)
|
|
待机功率
| <3W
|
|
通讯方式
| 2.4GHz WIFI
|
|
通讯模块
| 乐鑫ESP32
|
|
设备寿命
| 机械寿命通断5000000次,电气寿命通断50000次
|
|
外壳材质
| PC阻燃
|
|
3C证书编号
| -
|
|
RS485
| |
|
红外遥控
| |
---
## 控制采集
### 远程控制设备
*controller-event*
通断器、空开、10A-86插座、16A-86插座、10A转换器插座、16A转换器插座等单路设备的通电或断电操作
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"key1" : 0,
"key2" : 0,
"type" : "event"
}
"key1" : 0,
"key2" : 0,
"type" : "event"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
key1
| int
| 控制设备一路通断 0:关灯,1:开灯
| 0
|
|
key2
| int
| 控制设备二路通断 0:关灯,1:开灯
| 0
|
|
type
| String
| 控制设备开关固定传"event"
| event
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"bssid" : "742ad7790468",
"commandName" : "controller-event",
"ip" : "192.168.0.112",
"key1" : 0,
"key2" : 0,
"keyLock" : 0,
"mac" : "b0a6044bb720",
"onState" : 1,
"signal" : -47,
"source" : "command",
"ssid" : "gemeopen",
"timerEnable" : 1,
"timerInterval" : 15,
"type" : "GSMM2B",
"version" : "1.0.7",
"wifiLock" : 0
}
"bssid" : "742ad7790468",
"commandName" : "controller-event",
"ip" : "192.168.0.112",
"key1" : 0,
"key2" : 0,
"keyLock" : 0,
"mac" : "b0a6044bb720",
"onState" : 1,
"signal" : -47,
"source" : "command",
"ssid" : "gemeopen",
"timerEnable" : 1,
"timerInterval" : 15,
"type" : "GSMM2B",
"version" : "1.0.7",
"wifiLock" : 0
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
bssid
| String
| 路由器 MAC 地址
| 742ad7790468
|
|
commandName
| String
| 指令名称
| controller-event
|
|
ip
| String
| 设备连接WIFI后获取的IP
| 192.168.0.112
|
|
key1
| int
| 控制设备一路通断 0:关灯,1:开灯
| 0
|
|
key2
| int
| 控制设备二路通断 0:关灯,1:开灯
| 0
|
|
keyLock
| int
| 按键锁,0:关闭,1:开启
| 0
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
onState
| int
| 设备上电的默认状态:
0:记忆;是指记忆最后一次设备断电前的状态,如断电前设备是通电状态(指示灯是蓝的),设备下次上电默认是通电状态(指示灯是蓝的)。
1:关闭,即断电状态(指示灯是灭的),如断电前,设备是通电状态(指示灯是蓝的),设备下次上电默认是依旧是断电状态(指示灯是灭的)。需要手动/远程开启通电状态。
2:开启,即通电状态(指示灯是蓝色的),是指设备上电之后,默认是通电状态,此刻需要注意,插在设备上的负载会通电运行,会有安全风险,所以建议是默认上电状态为关闭。
| 1
|
|
signal
| int
| 信号强度,显示规则为: signal<= 0 && signal>= -50
//信号最好 signal< -50 && signal>= -70
//信号较好 signal< -70 && signal>= -80
//信号一般 signal<-80 && signal>= -100
//信号较差 signal没有在0~(-100)之间,表示无信号
| -47
|
|
source
| String
| 指令回复“command"
| command
|
|
ssid
| String
| 设备当前连接的WIFI名称
| gemeopen
|
|
timerEnable
| int
| 设备统计信息定时上报状态,0:关闭;1:开启
| 1
|
|
timerInterval
| int
| 设备统计信息上报时间间隔(单位秒),取值范围5-86400
| 15
|
|
type
| String
| 设备型号
| GSMM2B
|
|
version
| String
| 当前固件版本号
| 1.0.7
|
|
wifiLock
| int
| 配网锁,0:关闭,1:开启
| 0
|
---
### 获取设备信息
*info-all*
获取设备信息一般会包含:设备通断电状态、MAC/IMEI、固件版本、设备内网IP地址、设备WIFI网络名称等信息,不同的产品返回的信息有所差异
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"type" : "info"
}
"type" : "info"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
type
| String
| 获取设备基本信息固定传"info"
| info
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| info-all
|
|
ip
| String
| 设备连接WIFI后获取的IP
| 192.168.122.119
|
|
key1
| int
| 控制设备一路通断 0:关灯,1:开灯
| 0
|
|
key2
| int
| 控制设备二路通断 0:关灯,1:开灯
| 0
|
|
keyLock
| int
| 按键锁,0:关闭,1:开启
| 0
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 4CEBD60BFD62
|
|
onState
| int
| 设备上电的默认状态:
0:记忆;是指记忆最后一次设备断电前的状态,如断电前设备是通电状态(指示灯是蓝的),设备下次上电默认是通电状态(指示灯是蓝的)。
1:关闭,即断电状态(指示灯是灭的),如断电前,设备是通电状态(指示灯是蓝的),设备下次上电默认是依旧是断电状态(指示灯是灭的)。需要手动/远程开启通电状态。
2:开启,即通电状态(指示灯是蓝色的),是指设备上电之后,默认是通电状态,此刻需要注意,插在设备上的负载会通电运行,会有安全风险,所以建议是默认上电状态为关闭。
| 1
|
|
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
|
|
timerEnable
| int
| 设备电量信息定时上报状态,0:关闭;1:开启
| 1
|
|
type
| String
| 设备类型
| GSMM2B
|
|
version
| String
| 当前固件版本号
| 1.2.3
|
|
wifiLock
| int
| 配网锁,0:关闭,1:开启
| 0
|
---
### 获取设备统计信息
*info-statistic*
获取设备采集的累积电量、实时电压、实时电流、实时功率信息,注意不同的设备数值单位有区别,取决于设备设计的精度
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"type" : "statistic"
}
"type" : "statistic"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
type
| String
| 获取设备电量信息固定传"statistic"
| statistic
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"mac": "b0a6044bb720",
"commandName": "info-statistic",
"source": "command",
"voltage": 231.973,
"current_1": 0.004,
"power_1": 0.314,
"energy_1": 0,
"current_2": 0.004,
"power_2": 0.252,
"energy_2": 0,
"key1": 0,
"key2": 0
}
"mac": "b0a6044bb720",
"commandName": "info-statistic",
"source": "command",
"voltage": 231.973,
"current_1": 0.004,
"power_1": 0.314,
"energy_1": 0,
"current_2": 0.004,
"power_2": 0.252,
"energy_2": 0,
"key1": 0,
"key2": 0
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| info-statistic
|
|
key1
| int
| 控制设备一路通断 0:关灯,1:开灯
| 0
|
|
key2
| int
| 控制设备二路通断 0:关灯,1:开灯
| 0
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
source
| String
| 指令回复“command"
| command
|
|
voltage
| float
| 当前电压,单位V,保留三位小数
| 231.973
|
---
### 设置按键控制锁
*setting-key-lock*
功能按键锁定后,设备仅能通过MQTT/TCP协议操作,例如控制开关的通断、插座的通断电,都只能通过指令操作
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"keyLock" : 1,
"type" : "setting"
}
"keyLock" : 1,
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
keyLock
| int
| 按键锁,0:关闭,1:开启
| 1
|
|
type
| String
| 设备设置固定传"setting"
| setting
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"bssid" : "742ad7790468",
"commandName" : "setting-key-lock",
"ip" : "192.168.0.112",
"key1" : 1,
"key2" : 1,
"keyLock" : 1,
"mac" : "b0a6044bb720",
"onState" : 1,
"signal" : -47,
"source" : "command",
"ssid" : "gemeopen",
"timerEnable" : 1,
"timerInterval" : 15,
"type" : "GSMM2B",
"version" : "1.0.7",
"wifiLock" : 0
}
"bssid" : "742ad7790468",
"commandName" : "setting-key-lock",
"ip" : "192.168.0.112",
"key1" : 1,
"key2" : 1,
"keyLock" : 1,
"mac" : "b0a6044bb720",
"onState" : 1,
"signal" : -47,
"source" : "command",
"ssid" : "gemeopen",
"timerEnable" : 1,
"timerInterval" : 15,
"type" : "GSMM2B",
"version" : "1.0.7",
"wifiLock" : 0
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
bssid
| String
| 路由器 MAC 地址
| 742ad7790468
|
|
commandName
| String
| 指令名称
| setting-key-lock
|
|
ip
| String
| 设备连接WIFI后获取的IP
| 192.168.0.112
|
|
key1
| int
| 控制设备一路通断 0:关灯,1:开灯
| 1
|
|
key2
| int
| 控制设备二路通断 0:关灯,1:开灯
| 1
|
|
keyLock
| int
| 按键锁,0:关闭,1:开启
| 1
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
onState
| int
| 设备上电的默认状态:
0:记忆;是指记忆最后一次设备断电前的状态,如断电前设备是通电状态(指示灯是蓝的),设备下次上电默认是通电状态(指示灯是蓝的)。
1:关闭,即断电状态(指示灯是灭的),如断电前,设备是通电状态(指示灯是蓝的),设备下次上电默认是依旧是断电状态(指示灯是灭的)。需要手动/远程开启通电状态。
2:开启,即通电状态(指示灯是蓝色的),是指设备上电之后,默认是通电状态,此刻需要注意,插在设备上的负载会通电运行,会有安全风险,所以建议是默认上电状态为关闭。
| 1
|
|
signal
| int
| 信号强度,显示规则为: signal<= 0 && signal>= -50
//信号最好 signal< -50 && signal>= -70
//信号较好 signal< -70 && signal>= -80
//信号一般 signal<-80 && signal>= -100
//信号较差 signal没有在0~(-100)之间,表示无信号
| -47
|
|
source
| String
| 指令回复“command"
| command
|
|
ssid
| String
| 设备当前连接的WIFI名称
| gemeopen
|
|
timerEnable
| int
| 设备统计信息定时上报状态,0:关闭;1:开启
| 1
|
|
timerInterval
| int
| 设备统计信息上报时间间隔(单位秒),取值范围5-86400
| 15
|
|
type
| String
| 设备型号
| GSMM2B
|
|
version
| String
| 当前固件版本号
| 1.0.7
|
|
wifiLock
| int
| 配网锁,0:关闭,1:开启
| 0
|
---
## 定时任务
### 定时任务查询
*info-timer-task-query*
查询设备已设置的定时通断电任务列表及详情。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"action" : "timerTaskQuery",
"type" : "event"
}
"action" : "timerTaskQuery",
"type" : "event"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
action
| String
| 固定值timerTaskQuery
| timerTaskQuery
|
|
type
| String
| 设备设置固定传"event"
| event
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"action" : "timerTaskQuery",
"commandName" : "info-timer-task-query",
"list" : [{"number":1,"hour":0,"repeat":"oneof","command":{"key1":0,"key2":0,"type":"event"},"minute":0}],
"mac" : "b0a6044bb720",
"source" : "command",
"type" : "event"
}
"action" : "timerTaskQuery",
"commandName" : "info-timer-task-query",
"list" : [{"number":1,"hour":0,"repeat":"oneof","command":{"key1":0,"key2":0,"type":"event"},"minute":0}],
"mac" : "b0a6044bb720",
"source" : "command",
"type" : "event"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
action
| String
| 设备定时任务查询默认填"timerTaskQuery"
| timerTaskQuery
|
|
commandName
| String
| 指令名称
| info-timer-task-query
|
|
list
| List
| list为列表,参数带number、week、hour、minute、repeat是定时按星期时分执行一次,参数不带week则是每天按时分循环执行,key1、key2、key3含义同event指令
| [{"number":1,"hour":0,"repeat":"oneof","command":{"key1":0,"key2":0,"type":"event"},"minute":0}]
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
source
| String
| 指令回复“command"
| command
|
|
type
| String
| 固定值"event"
| event
|
---
### 设计倒计时任务
*setting-timer-countdown*
设置倒计时任务——指定时长与到点动作(关闭/开启)。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"countdownSecond" : 10,
"finishCommand" :
{
"duty1" : 100,
"duty2" : 100,
"duty3" : 100,
"type" : "event"
},
"messageId" : "$messageId",
"task" : "countdown",
"timerInterval" : 1,
"type" : "setting"
}
"countdownSecond" : 10,
"finishCommand" :
{
"duty1" : 100,
"duty2" : 100,
"duty3" : 100,
"type" : "event"
},
"messageId" : "$messageId",
"task" : "countdown",
"timerInterval" : 1,
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
countdownSecond
| int
| 倒计时总时间
| 10
|
|
duty1
| int
| 输出占空比 范围0-100
| 100
|
|
duty2
| int
| 输出占空比 范围0-100
| 100
|
|
duty3
| int
| 输出占空比 范围0-100
| 100
|
|
finishCommand
| Object
| 完成任务
| {"duty1":100,"duty2":100,"duty3":100,"type":"event"}
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| $messageId
|
|
task
| String
| 固定值“countdown"
| countdown
|
|
timerInterval
| int
| 设备统计信息上报时间间隔(单位秒),取值范围5-86400
| 1
|
|
type
| String
| 固定值"event"
| event
|
|
type
| String
| 固定值"setting"
| setting
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"commandName" : "setting-timer-countdown",
"countdownSecond" : 10,
"finishCommand" :
{
"key1" : 0,
"key2" : 0,
"type" : "event"
},
"mac" : "b0a6044bb720",
"messageId" : "$messageId",
"source" : "command",
"task" : "countdown",
"timerInterval" : 1,
"type" : "setting"
}
"commandName" : "setting-timer-countdown",
"countdownSecond" : 10,
"finishCommand" :
{
"key1" : 0,
"key2" : 0,
"type" : "event"
},
"mac" : "b0a6044bb720",
"messageId" : "$messageId",
"source" : "command",
"task" : "countdown",
"timerInterval" : 1,
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| setting-timer-countdown
|
|
countdownSecond
| int
| 倒计时总时间
| 10
|
|
finishCommand
| Object
| 完成任务
| {"key1":0,"key2":0,"type":"event"}
|
|
key1
| int
| 控制设备一路通断 0:关灯,1:开灯
| 0
|
|
key2
| int
| 控制设备二路通断 0:关灯,1:开灯
| 0
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| $messageId
|
|
source
| String
| 指令回复“command"
| command
|
|
task
| String
| 固定值“countdown"
| countdown
|
|
timerInterval
| int
| 设备统计信息上报时间间隔(单位秒),取值范围5-86400
| 1
|
|
type
| String
| 固定值"event"
| event
|
|
type
| String
| 固定值"setting"
| setting
|
---
### 倒计时任务自动上报
*setting-timer-countdown-active*
查看设备倒计时状态上报的 JSON 格式定义,供服务端对接解析设备上报的倒计时状态数据。上报频率由"设置倒计时任务"指令配置,配置后设备按周期将数据发布至约定主题(topic),设备端无订阅行为(仅发布),服务端订阅该发布主题后即可接收上报数据。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"commandName":"setting-timer-countdown-active",
"countdownSecond":10,
"mac":"78E36D1DFB78",
"remainingSecond":10,
"source":"auto",
"state":0
}
"commandName":"setting-timer-countdown-active",
"countdownSecond":10,
"mac":"78E36D1DFB78",
"remainingSecond":10,
"source":"auto",
"state":0
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| setting-timer-countdown-active
|
|
countdownSecond
| int
| 倒计时总时间
| 10
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 78E36D1DFB78
|
|
remainingSecond
| int
| 倒计时剩余时间,单位S
| 10
|
|
source
| String
| 指令回复“command"
| auto
|
|
state
| int
| 任务状态:0:待启动,1:正在进行,2:结束
| 0
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"state": 0,
"remainingSecond": 10,
"countdownSecond": 10,
"mac": "b0a6044bb720",
"commandName": "setting-timer-countdown-active",
"source": "auto"
}
"state": 0,
"remainingSecond": 10,
"countdownSecond": 10,
"mac": "b0a6044bb720",
"commandName": "setting-timer-countdown-active",
"source": "auto"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| setting-timer-countdown-active
|
|
countdownSecond
| int
| 倒计时总时间
| 10
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
remainingSecond
| int
| 倒计时剩余时间,单位S
| 10
|
|
source
| String
| 指令回复“command"
| auto
|
|
state
| int
| 任务状态:0:待启动,1:正在进行,2:结束
| 0
|
---
### 清除倒计时任务
*setting-timer-countdown-clear*
清除设备中已设置的倒计时任务。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"messageId" : "202201241610366046",
"task" : "countdown-clear",
"type" : "setting"
}
"messageId" : "202201241610366046",
"task" : "countdown-clear",
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
messageId
| String
| 消息ID字段
| 202201241610366046
|
|
task
| String
| 固定值"countdown-clear"
| countdown-clear
|
|
type
| String
| 设备设置固定传"setting"
| setting
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"messageId": "202201241610366046",
"success": true,
"message": "ok",
"commandName": "setting-timer-countdown-clear",
"source": "command",
"mac": "b0a6044bb720"
}
"messageId": "202201241610366046",
"success": true,
"message": "ok",
"commandName": "setting-timer-countdown-clear",
"source": "command",
"mac": "b0a6044bb720"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| setting-timer-countdown-clear
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
message
| String
| 执行结果描述:对命令执行结果的文本说明。执行完成且无异常:ok ;如果出现异常,返回异常结果描述。
| ok
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 202201241610366046
|
|
source
| String
| 指令回复“command"
| command
|
|
success
| boolean
| 执行结果,执行成功:true;执行失败:false
| true
|
---
### 删除定时任务
*setting-timer-delete*
删除设备中已设置的单条定时通断电任务,删除为不可逆操作,删除后需重新设置。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"action" : "delete",
"countdownSecond" : 10,
"finishCommand" :
{
"duty1" : 100,
"duty2" : 100,
"duty3" : 100,
"type" : "event"
},
"messageId" : "202201241610366046",
"number" : 1,
"task" : "countdown",
"timerInterval" : 1,
"type" : "setting"
}
"action" : "delete",
"countdownSecond" : 10,
"finishCommand" :
{
"duty1" : 100,
"duty2" : 100,
"duty3" : 100,
"type" : "event"
},
"messageId" : "202201241610366046",
"number" : 1,
"task" : "countdown",
"timerInterval" : 1,
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
action
| String
| 固定值delete
| delete
|
|
countdownSecond
| int
| 倒计时总时间
| 10
|
|
duty1
| int
| 输出占空比 范围0-100
| 100
|
|
duty2
| int
| 输出占空比 范围0-100
| 100
|
|
duty3
| int
| 输出占空比 范围0-100
| 100
|
|
finishCommand
| Object
| 完成任务
| {"duty1":100,"duty2":100,"duty3":100,"type":"event"}
|
|
messageId
| String
| 消息ID字段
| 202201241610366046
|
|
number
| int
| 任务编号
| 1
|
|
task
| String
| 固定值“countdown"
| countdown
|
|
timerInterval
| int
| 设备统计信息上报时间间隔(单位秒),取值范围5-86400
| 1
|
|
type
| String
| 设备设置固定传"setting"
| setting
|
|
type
| String
| 固定值"event"
| event
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"commandName" : "setting-timer-delete",
"mac" : "b0a6044bb720",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
"commandName" : "setting-timer-delete",
"mac" : "b0a6044bb720",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| setting-timer-delete
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
message
| String
| 执行结果描述:对命令执行结果的文本说明。执行完成且无异常:ok ;如果出现异常,返回异常结果描述。
| ok
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 202201241610366046
|
|
source
| String
| 指令回复“command"
| command
|
|
success
| boolean
| 执行结果,执行成功:true;执行失败:false
| true
|
---
### 设置定时任务
*setting-timer-task*
新增或编辑定时通断电任务,设置后到点执行开启/关闭操作。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"command" :
{
"key1" : 0,
"key2" : 0
},
"hour" : 0,
"messageId" : "202201241610366046",
"minute" : 0,
"number" : 1,
"repeat" : "oneof",
"task" : "timer",
"type" : "setting"
}
"command" :
{
"key1" : 0,
"key2" : 0
},
"hour" : 0,
"messageId" : "202201241610366046",
"minute" : 0,
"number" : 1,
"repeat" : "oneof",
"task" : "timer",
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
command
| Object
| 指令
| {"key1":0,"key2":0}
|
|
hour
| int
| 小时0~23
| 0
|
|
key1
| int
| 控制设备一路通断 0:关灯,1:开灯
| 0
|
|
key2
| int
| 控制设备二路通断 0:关灯,1:开灯
| 0
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 202201241610366046
|
|
minute
| int
| 分钟0~60
| 0
|
|
number
| int
| 任务编号
| 1
|
|
repeat
| String
| 重复weekdays:按周重复,day:按天重复,oneof:一次任务
| oneof
|
|
task
| String
| 固定值“countdown"
| timer
|
|
type
| String
| 固定值"setting"
| setting
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"commandName" : "setting-timer-delete",
"mac" : "b0a6044bb720",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
"commandName" : "setting-timer-delete",
"mac" : "b0a6044bb720",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| setting-timer-delete
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
message
| String
| 执行结果描述:对命令执行结果的文本说明。执行完成且无异常:ok ;如果出现异常,返回异常结果描述。
| ok
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 202201241610366046
|
|
source
| String
| 指令回复“command"
| command
|
|
success
| boolean
| 执行结果,执行成功:true;执行失败:false
| true
|
---
## 设备维护
### 重置/恢复出厂设置
*controller-reset*
恢复出厂设置后配网信息和自定义信息都会清空,请谨慎操作!
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"system" : "reset",
"type" : "setting"
}
"system" : "reset",
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
system
| String
| 重置/恢复出厂设置默认填"reset"
| reset
|
|
type
| String
| 设备设置固定传"setting"
| setting
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"success": true,
"message": "ok",
"commandName": "controller-reset",
"source": "command",
"mac": "b0a6044bb720"
}
"success": true,
"message": "ok",
"commandName": "controller-reset",
"source": "command",
"mac": "b0a6044bb720"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| controller-reset
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
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" : "restart",
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
system
| String
| 设备软重启固定传"restart"
| restart
|
|
type
| String
| 设备设置固定传"setting"
| setting
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"success": true,
"message": "ok",
"commandName": "controller-restart",
"source": "command",
"mac": "b0a6044bb720"
}
"success": true,
"message": "ok",
"commandName": "controller-restart",
"source": "command",
"mac": "b0a6044bb720"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| controller-restart
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
message
| String
| 执行结果描述:对命令执行结果的文本说明。执行完成且无异常:ok ;如果出现异常,返回异常结果描述。
| ok
|
|
source
| String
| 指令回复“command"
| command
|
|
success
| boolean
| 执行结果,执行成功:true;执行失败:false
| true
|
---
### 电量清零
*energy-clear*
将设备累计用电量清零,清零后从零开始重新累计统计,仅清除累计用电量,不影响其他数据。清零为不可逆操作,清除后累计数据无法恢复!
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"system" : "energy-clear",
"type" : "setting"
}
"system" : "energy-clear",
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
system
| String
| energy-clear 电量清零
| energy-clear
|
|
type
| String
| 设置设备固定传"setting"
| setting
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"success": true,
"message": "ok",
"commandName": "energy-clear",
"source": "command",
"mac": "b0a6044bb720"
}
"success": true,
"message": "ok",
"commandName": "energy-clear",
"source": "command",
"mac": "b0a6044bb720"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| energy-clear
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
message
| String
| 执行结果描述:对命令执行结果的文本说明。执行完成且无异常:ok ;如果出现异常,返回异常结果描述。
| ok
|
|
source
| String
| 指令回复“command"
| command
|
|
success
| boolean
| 执行结果,执行成功:true;执行失败:false
| true
|
---
### 获取设备通讯信息
*info-protocol*
获取设备通讯信息
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"type" : "protocol"
}
"type" : "protocol"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
type
| String
| 获取设备通讯协议固定传protocol
| protocol
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"protocol": "mqtt",
"mac": "b0a6044bb720",
"source": "command",
"commandName": "info-protocol",
"server": "mqtt.smart-bird.cn",
"port": 1883,
"clientId": "b0a6044bb720",
"username": "uYDyeMaaKDxV",
"subcribe": "/uefyqI/uYDyeMaaKDxV/b0a6044bb720/publish",
"publish": "/uefyqI/uYDyeMaaKDxV/b0a6044bb720/subscribe"
}
"protocol": "mqtt",
"mac": "b0a6044bb720",
"source": "command",
"commandName": "info-protocol",
"server": "mqtt.smart-bird.cn",
"port": 1883,
"clientId": "b0a6044bb720",
"username": "uYDyeMaaKDxV",
"subcribe": "/uefyqI/uYDyeMaaKDxV/b0a6044bb720/publish",
"publish": "/uefyqI/uYDyeMaaKDxV/b0a6044bb720/subscribe"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
clientId
| String
| 自定义MQTT客户端ID注意:不可重复
| b0a6044bb720
|
|
commandName
| String
| 指令名称
| info-protocol
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
port
| String
| 端口号
| 1883
|
|
protocol
| String
| 协议类型
| mqtt
|
|
publish
| String
| 自定义发布主题 注意:不可重复
| /uefyqI/uYDyeMaaKDxV/b0a6044bb720/subscribe
|
|
server
| String
| 自定义服务器地址
| mqtt.smart-bird.cn
|
|
source
| String
| 指令回复“command"
| command
|
|
subcribe
| String
| 自定义订阅主题,注意:不可重复
| /uefyqI/uYDyeMaaKDxV/b0a6044bb720/publish
|
|
username
| String
| 自定义服务器用户名
| uYDyeMaaKDxV
|
---
### 自定义MQTT
*setting-mqtt*
设备支持自定义MQTT,注意:在通过MQTT自定义MQTT信息后,需要将设备断电重启或者向设备发送重启命令才可生效。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
clientId
| String
| 自定义MQTT客户端ID注意:不可重复
| admin
|
|
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
| String
| 自定义MQTT客户端ID注意:不可重复
| admin
|
|
commandName
| String
| 指令名称
| setting-mqtt
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 4CEBD60BFD62
|
|
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-on-state*
断电记忆功能,默认关闭,即设备重新上电后,设备输出将处于断电状态
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"onState" : 1,
"type" : "setting"
}
"onState" : 1,
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
onState
| int
| 设备上电的默认状态:
0:记忆;是指记忆最后一次设备断电前的状态,如断电前设备是通电状态(指示灯是蓝的),设备下次上电默认是通电状态(指示灯是蓝的)。
1:关闭,即断电状态(指示灯是灭的),如断电前,设备是通电状态(指示灯是蓝的),设备下次上电默认是依旧是断电状态(指示灯是灭的)。需要手动/远程开启通电状态。
2:开启,即通电状态(指示灯是蓝色的),是指设备上电之后,默认是通电状态,此刻需要注意,插在设备上的负载会通电运行,会有安全风险,所以建议是默认上电状态为关闭。
| 1
|
|
type
| String
| 设备设置固定传"setting"
| setting
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"bssid" : "742ad7790468",
"commandName" : "setting-on-state",
"ip" : "192.168.0.112",
"key1" : 0,
"key2" : 0,
"keyLock" : 0,
"mac" : "b0a6044bb720",
"onState" : 1,
"signal" : -47,
"source" : "command",
"ssid" : "gemeopen",
"timerEnable" : 1,
"timerInterval" : 15,
"type" : "GSMM2B",
"version" : "1.0.7",
"wifiLock" : 0
}
"bssid" : "742ad7790468",
"commandName" : "setting-on-state",
"ip" : "192.168.0.112",
"key1" : 0,
"key2" : 0,
"keyLock" : 0,
"mac" : "b0a6044bb720",
"onState" : 1,
"signal" : -47,
"source" : "command",
"ssid" : "gemeopen",
"timerEnable" : 1,
"timerInterval" : 15,
"type" : "GSMM2B",
"version" : "1.0.7",
"wifiLock" : 0
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
bssid
| String
| 路由器 MAC 地址
| 742ad7790468
|
|
commandName
| String
| 指令名称
| setting-on-state
|
|
ip
| String
| 设备连接WIFI后获取的IP
| 192.168.0.112
|
|
key1
| int
| 控制设备一路通断 0:关灯,1:开灯
| 0
|
|
key2
| int
| 控制设备二路通断 0:关灯,1:开灯
| 0
|
|
keyLock
| int
| 按键锁,0:关闭,1:开启
| 0
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
onState
| int
| 设备上电的默认状态:
0:记忆;是指记忆最后一次设备断电前的状态,如断电前设备是通电状态(指示灯是蓝的),设备下次上电默认是通电状态(指示灯是蓝的)。
1:关闭,即断电状态(指示灯是灭的),如断电前,设备是通电状态(指示灯是蓝的),设备下次上电默认是依旧是断电状态(指示灯是灭的)。需要手动/远程开启通电状态。
2:开启,即通电状态(指示灯是蓝色的),是指设备上电之后,默认是通电状态,此刻需要注意,插在设备上的负载会通电运行,会有安全风险,所以建议是默认上电状态为关闭。
| 1
|
|
signal
| int
| 信号强度,显示规则为: signal<= 0 && signal>= -50
//信号最好 signal< -50 && signal>= -70
//信号较好 signal< -70 && signal>= -80
//信号一般 signal<-80 && signal>= -100
//信号较差 signal没有在0~(-100)之间,表示无信号
| -47
|
|
source
| String
| 指令回复“command"
| command
|
|
ssid
| String
| 设备当前连接的WIFI名称
| gemeopen
|
|
timerEnable
| int
| 设备统计信息定时上报状态,0:关闭;1:开启
| 1
|
|
timerInterval
| int
| 设备统计信息上报时间间隔(单位秒),取值范围5-86400
| 15
|
|
type
| String
| 设备型号
| GSMM2B
|
|
version
| String
| 当前固件版本号
| 1.0.7
|
|
wifiLock
| int
| 配网锁,0:关闭,1:开启
| 0
|
---
### 自定义TCP客户端
*setting-tcp*
设备支持通过MQTT方式自定义TCP信息,注意:通过MQTT自定义TCP信息后,需要将设备断电重启或者向设备发送重启命令才可生效。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"port" : "1883",
"protocol" : "tcp",
"server" : "192.168.0.66",
"type" : "custom"
}
"port" : "1883",
"protocol" : "tcp",
"server" : "192.168.0.66",
"type" : "custom"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
port
| String
| 端口号
| 1883
|
|
protocol
| String
| 协议类型
| tcp
|
|
server
| String
| 自定义服务器地址
| 192.168.0.66
|
|
type
| String
| 设备自定义固定传"custom"
| custom
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"commandName" : "setting-tcp",
"mac" : "b0a6044bb720",
"port" : "1883",
"protocol" : "tcp",
"server" : "192.168.0.66",
"source" : "command"
}
"commandName" : "setting-tcp",
"mac" : "b0a6044bb720",
"port" : "1883",
"protocol" : "tcp",
"server" : "192.168.0.66",
"source" : "command"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| setting-tcp
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
port
| String
| 端口号
| 1883
|
|
protocol
| String
| 协议类型
| tcp
|
|
server
| String
| 自定义服务器地址
| 192.168.0.66
|
|
source
| String
| 指令回复“command"
| command
|
---
### 设置WiFi配网锁
*setting-wifi-lock*
wifi配网锁定后,设备无法通过长按配网按钮进入配网操作,仅能通过MQTT/TCP协议解锁配网功能<br/>
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"type" : "setting",
"wifiLock" : 0
}
"type" : "setting",
"wifiLock" : 0
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
type
| String
| 设备设置固定传"setting"
| setting
|
|
wifiLock
| int
| 配网锁,0:关闭,1:开启
| 0
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"bssid" : "742ad7790468",
"commandName" : "setting-wifi-lock",
"ip" : "192.168.0.112",
"key1" : 0,
"key2" : 0,
"keyLock" : 0,
"mac" : "b0a6044bb720",
"onState" : 1,
"signal" : -47,
"source" : "command",
"ssid" : "gemeopen",
"timerEnable" : 1,
"timerInterval" : 15,
"type" : "GSMM2B",
"version" : "1.0.7",
"wifiLock" : 0
}
"bssid" : "742ad7790468",
"commandName" : "setting-wifi-lock",
"ip" : "192.168.0.112",
"key1" : 0,
"key2" : 0,
"keyLock" : 0,
"mac" : "b0a6044bb720",
"onState" : 1,
"signal" : -47,
"source" : "command",
"ssid" : "gemeopen",
"timerEnable" : 1,
"timerInterval" : 15,
"type" : "GSMM2B",
"version" : "1.0.7",
"wifiLock" : 0
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
bssid
| String
| 路由器 MAC 地址
| 742ad7790468
|
|
commandName
| String
| 指令名称
| setting-wifi-lock
|
|
ip
| String
| 设备连接WIFI后获取的IP
| 192.168.0.112
|
|
key1
| int
| 控制设备一路通断 0:关灯,1:开灯
| 0
|
|
key2
| int
| 控制设备二路通断 0:关灯,1:开灯
| 0
|
|
keyLock
| int
| 按键锁,0:关闭,1:开启
| 0
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| b0a6044bb720
|
|
onState
| int
| 设备上电的默认状态:
0:记忆;是指记忆最后一次设备断电前的状态,如断电前设备是通电状态(指示灯是蓝的),设备下次上电默认是通电状态(指示灯是蓝的)。
1:关闭,即断电状态(指示灯是灭的),如断电前,设备是通电状态(指示灯是蓝的),设备下次上电默认是依旧是断电状态(指示灯是灭的)。需要手动/远程开启通电状态。
2:开启,即通电状态(指示灯是蓝色的),是指设备上电之后,默认是通电状态,此刻需要注意,插在设备上的负载会通电运行,会有安全风险,所以建议是默认上电状态为关闭。
| 1
|
|
signal
| int
| 信号强度,显示规则为: signal<= 0 && signal>= -50
//信号最好 signal< -50 && signal>= -70
//信号较好 signal< -70 && signal>= -80
//信号一般 signal<-80 && signal>= -100
//信号较差 signal没有在0~(-100)之间,表示无信号
| -47
|
|
source
| String
| 指令回复“command"
| command
|
|
ssid
| String
| 设备当前连接的WIFI名称
| gemeopen
|
|
timerEnable
| int
| 设备统计信息定时上报状态,0:关闭;1:开启
| 1
|
|
timerInterval
| int
| 设备统计信息上报时间间隔(单位秒),取值范围5-86400
| 15
|
|
type
| String
| 设备型号
| GSMM2B
|
|
version
| String
| 当前固件版本号
| 1.0.7
|
|
wifiLock
| int
| 配网锁,0:关闭,1:开启
| 0
|
---





