重置设备
controller-reset
指令简介
恢复出厂设置后配网信息和自定义信息都会清空,请谨慎操作!
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "20260520",
"system" : "reset",
"type" : "setting"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 2 |
system |
String |
重置/恢复出厂设置默认填"reset" |
reset |
| 3 |
type |
String |
设备设置固定传"setting" |
setting |
{
"commandName" : "controller-reset",
"mac" : "28562f8c9e3c",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-reset |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
28562f8c9e3c |
| 3 |
message |
String |
执行返回结果 |
ok |
| 4 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
重启设备
controller-restart
指令简介
软重启后,通过指令设置的参数将生效,同时设备将重新连接Wifi/4G网络,注意设备IP地址可能发生变化
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "20260520",
"system" : "restart",
"type" : "setting"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 2 |
system |
String |
重置/恢复出厂设置默认填"restart" |
restart |
| 3 |
type |
String |
设备设置固定传"setting" |
setting |
{
"commandName" : "controller-restart",
"mac" : "28562f8c9e3c",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-restart |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
28562f8c9e3c |
| 3 |
message |
String |
执行返回结果 |
ok |
| 4 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
获取设备联网信息
info-connect
指令简介
获取设备当前联网模式时WiFi还是以太网,IP地址、子网掩码、网关、DNS
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "202201241610366046",
"type" : "connect"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 2 |
type |
String |
固定传“connect” |
connect |
{
"commandName" : "info-connect",
"connMethod" : "ethernet",
"dhcpEnable" : 0,
"dns" : "192.168.0.1",
"gateway" : "192.168.0.1",
"local_ip" : "192.168.0.118",
"mac" : "28562f8c9e3c",
"source" : "command",
"subnet" : "255.255.255.0"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
info-connect |
| 2 |
connMethod |
String |
网络连接方式wifi或者ethernet |
ethernet |
| 3 |
dhcpEnable |
int |
自动寻址1:开启, 0:关闭,默认开启 |
0 |
| 4 |
dns |
String |
DNS服务器地址 |
192.168.0.1 |
| 5 |
gateway |
String |
默认网关 |
192.168.0.1 |
| 6 |
local_ip |
String |
IP地址 |
192.168.0.118 |
| 7 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
28562f8c9e3c |
| 8 |
source |
String |
指令回复“command" |
command |
| 9 |
subnet |
String |
子网掩码 |
255.255.255.0 |
获取设备通讯信息
info-protocol
指令简介
获取当前设备与服务端交互的通信协议及协议配置参数,目前支持MQTT、TCP Client和HTTP Server(固件版本1.1.1以上支持),设备出厂时默认接入GemeOpen厂家MQTT测试服务器,免费提供客户调试使用,如需接入自己的服务器或使用其他协议,请自行搭建服务器。
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "20260520",
"type" : "protocol"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 2 |
type |
String |
获取设备通讯协议固定传protocol
|
protocol |
{
"clientId" : "1C6920F083C4",
"commandName" : "info-protocol",
"mac" : "28562f8c9e3c",
"messageId" : "202201241610366046",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/KIduUf/mSEiZxMFxOLD/1C6920F083C4/subscribe",
"server" : "mqtt.smart-bird.cn",
"source" : "command",
"subscribe" : "/topic/qos1",
"username" : "mSEiZxMFxOLD"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
clientId |
String |
自定义MQTT客户端ID注意:不可重复
|
1C6920F083C4 |
| 2 |
commandName |
String |
指令名称 |
info-protocol |
| 3 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
28562f8c9e3c |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
port |
String |
端口号 |
1883 |
| 6 |
protocol |
String |
协议类型,MQTT协议固定传"mqtt" |
mqtt |
| 7 |
publish |
String |
自定义MQTT发布主题 注意:不可重复 |
/KIduUf/mSEiZxMFxOLD/1C6920F083C4/subscribe |
| 8 |
server |
String |
自定义MQTT服务器地址 |
mqtt.smart-bird.cn |
| 9 |
source |
String |
指令回复“command" |
command |
| 10 |
subscribe |
String |
自定义设备MQTT订阅主题 注意:不可与发布主题重复 |
/topic/qos1 |
| 11 |
username |
String |
自定义MQTT服务器用户名 |
mSEiZxMFxOLD |
设置设备网络连接方式
setting-connmethod-config
指令简介
设置设备当前联网方式,设备默认出库为WiFi模式,使用以太网需要下发指令切换网络连接方式(固件版本1.1.5以上,在配置页里的其他设置中支持设置网络连接方式和静态IP设置),需要将设备断电重启或者向设备发送重启命令才可生效。
向设备发送指令
服务端向设备订阅topic发送消息
{
"connMethod" : "ethernet",
"dhcpEnable" : 0,
"dns" : "192.168.0.1",
"gateway" : "192.168.0.1",
"local_ip" : "192.168.0.118",
"messageId" : "202201241610366046",
"password" : "123456",
"ssid" : "GemeOpen",
"subnet" : "255.255.255.0",
"type" : "setting"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
connMethod |
String |
网络连接方式wifi或者ethernet |
ethernet |
| 2 |
dhcpEnable |
int |
自动寻址1:开启, 0:关闭,默认开启 |
0 |
| 3 |
dns |
String |
DNS服务器地址,dhcp关闭才有该字段 |
192.168.0.1 |
| 4 |
gateway |
String |
默认网关,dhcp关闭才有该字段 |
192.168.0.1 |
| 5 |
local_ip |
String |
静态ip,dhcp关闭才有该字段 |
192.168.0.118 |
| 6 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 7 |
password |
String |
设置wifi密码,网络连接方式wifi才有该字段 |
123456 |
| 8 |
ssid |
String |
设置wifi名称,网络连接方式wifi才有该字段 |
GemeOpen |
| 9 |
subnet |
String |
子网掩码,dhcp关闭才有该字段 |
255.255.255.0 |
| 10 |
type |
String |
设备设置固定传"setting" |
setting |
{
"commandName" : "setting-connMethod-config",
"mac" : "28562f8c9e3c",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
setting-connMethod-config |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
28562f8c9e3c |
| 3 |
message |
String |
执行返回结果 |
ok |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
自定义HTTP
setting-http
指令简介
用于配置http回调地址,用来设备事件推送地址,注意不支持https
向设备发送指令
服务端向设备订阅topic发送消息
{
"maxRetry" : 3,
"messageId" : "20260520",
"protocol" : "http",
"type" : "custom",
"url" : "http://192.168.0.63:8080"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
maxRetry |
int |
重试次数 |
3 |
| 2 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 3 |
protocol |
String |
协议类型 |
http |
| 4 |
type |
String |
设备自定义固定传"custom" |
custom |
| 5 |
url |
String |
回调地址 |
http://192.168.0.63:8080 |
{
"commandName" : "setting-http",
"mac" : "28562f8c9e3c",
"messageId" : "20260520",
"protocol" : "http",
"source" : "command",
"url" : "http://192.168.0.168:8080"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
setting-http |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
28562f8c9e3c |
| 3 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 4 |
protocol |
String |
协议类型 |
http |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
url |
String |
回调地址 |
http://192.168.0.168:8080 |
设置温湿度参数补偿
setting-humidity-compensate
指令简介
设置温度和湿度的补偿值,用于校准传感器采集数据的偏差。
向设备发送指令
服务端向设备订阅topic发送消息
{
"h_compensate" : 0,
"messageId" : "20260520",
"type" : "setting",
"t_compensate" : 0
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
h_compensate |
float |
湿度补偿(单位:%)[范围-20至+20] |
0 |
| 2 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 3 |
type |
String |
设备设置固定值"setting" |
setting |
| 4 |
t_compensate |
float |
温度补偿(单位:摄氏度)[范围-20至+20] |
0 |
{
"code" : "GSTMB1",
"commandName" : "setting-humidity-compensate",
"dhcpEnable" : 1,
"h_compensate" : 0,
"ip" : "192.168.122.119",
"mac" : "2026bb16aa14",
"messageId" : "20260520",
"signal" : -75,
"source" : "command",
"ssid" : "gemeopen",
"timerEnable" : 1,
"timerInterval" : 15,
"type" : "setting",
"t_compensate" : 0,
"version" : "1.0.0"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
code |
String |
设备型号代码 |
GSTMB1 |
| 2 |
commandName |
String |
指令名称 |
setting-humidity-compensate |
| 3 |
dhcpEnable |
int |
自动寻址1:开启, 0:关闭,默认开启 |
1 |
| 4 |
h_compensate |
float |
湿度补偿(单位:%)[范围-20至+20] |
0 |
| 5 |
ip |
String |
设备连接WIFI后获取的IP |
192.168.122.119 |
| 6 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
2026bb16aa14 |
| 7 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 8 |
signal |
int |
信号强度,显示规则为: signal<= 0 && signal>= -50
//信号最好 signal< -50 && signal>= -70
//信号较好 signal< -70 && signal>= -80
//信号一般 signal<-80 && signal>= -100
//信号较差 signal没有在0~(-100)之间,表示无信号 |
-75 |
| 9 |
source |
String |
指令回复“command" |
command |
| 10 |
ssid |
String |
设备当前连接的WIFI名称 |
gemeopen |
| 11 |
timerEnable |
int |
设备统计信息定时上报状态,0:关闭;1:开启 |
1 |
| 12 |
timerInterval |
int |
设备统计信息上报时间间隔(单位秒),取值范围5-86400 |
15 |
| 13 |
type |
String |
设备设置固定值"setting" |
setting |
| 14 |
t_compensate |
float |
温度补偿(单位:摄氏度)[范围-20至+20] |
0 |
| 15 |
version |
String |
当前固件版本号 |
1.0.0 |
自定义MQTT
setting-mqtt
指令简介
设备支持自定义MQTT,注意:在通过MQTT自定义MQTT信息后,需要将设备断电重启或者向设备发送重启命令才可生效。
向设备发送指令
服务端向设备订阅topic发送消息
{
"clientId" : "custom",
"messageId" : "20260520",
"password" : "password",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/qos0",
"server" : "192.168.0.66",
"subscribe" : "/topic/qos1",
"type" : "custom",
"username" : "username"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
clientId |
String |
自定义MQTT客户端ID注意:不可重复 |
custom |
| 2 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 3 |
password |
String |
密码 |
password |
| 4 |
port |
String |
端口号 |
1883 |
| 5 |
protocol |
String |
协议类型,MQTT协议固定传"mqtt" |
mqtt |
| 6 |
publish |
String |
自定义MQTT发布主题 注意:不可重复 |
/topic/qos0 |
| 7 |
server |
String |
自定义MQTT服务器地址 |
192.168.0.66 |
| 8 |
subscribe |
String |
自定义设备MQTT订阅主题 注意:不可与发布主题重复 |
/topic/qos1 |
| 9 |
type |
String |
设备自定义固定传"custom" |
custom |
| 10 |
username |
String |
自定义MQTT服务器用户名 |
username |
{
"clientId" : "custom",
"commandName" : "setting-mqtt",
"mac" : "28562f8c9e3c",
"messageId" : "20260520",
"password" : "password",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/qos0",
"server" : "192.168.0.66",
"source" : "command",
"subscribe" : "/topic/qos1",
"username" : "username"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
clientId |
String |
自定义MQTT客户端ID注意:不可重复 |
custom |
| 2 |
commandName |
String |
指令名称 |
setting-mqtt |
| 3 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
28562f8c9e3c |
| 4 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 5 |
password |
String |
密码 |
password |
| 6 |
port |
String |
端口号 |
1883 |
| 7 |
protocol |
String |
协议类型 |
mqtt |
| 8 |
publish |
String |
自定义发布主题 注意:不可重复 |
/topic/qos0 |
| 9 |
server |
String |
自定义服务器地址 |
192.168.0.66 |
| 10 |
source |
String |
指令回复“command" |
command |
| 11 |
subscribe |
String |
自定义设备MQTT订阅主题 注意:不可与发布主题重复 |
/topic/qos1 |
| 12 |
username |
String |
自定义服务器用户名 |
username |
自定义TCP
setting-tcp
指令简介
设备支持通过MQTT方式自定义TCP信息,注意:通过MQTT自定义TCP信息后,需要将设备断电重启或者向设备发送重启命令才可生效。
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "20260520",
"port" : "8080",
"protocol" : "tcp",
"server" : "192.168.0.66",
"type" : "custom"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 2 |
port |
String |
端口号 |
8080 |
| 3 |
protocol |
String |
协议类型 |
tcp |
| 4 |
server |
String |
自定义服务器地址 |
192.168.0.66 |
| 5 |
type |
String |
设备自定义固定传"custom" |
custom |
{
"commandName" : "setting-tcp",
"mac" : "28562f8c9e3c",
"messageId" : "20260520",
"port" : "8080",
"protocol" : "tcp",
"server" : "192.168.0.66",
"source" : "command"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
setting-tcp |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
28562f8c9e3c |
| 3 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 |
20260520 |
| 4 |
port |
String |
端口号 |
8080 |
| 5 |
protocol |
String |
协议类型 |
tcp |
| 6 |
server |
String |
自定义服务器地址 |
192.168.0.66 |
| 7 |
source |
String |
指令回复“command" |
command |