重置设备
controller-reset
指令简介
恢复出厂设置后配网信息和自定义信息都会清空,请谨慎操作!
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "202201241610366046",
"system" : "reset",
"type" : "setting"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 2 |
system |
String |
重置/恢复出厂设置默认填"reset" |
reset |
| 3 |
type |
String |
固定传"setting" |
setting |
{
"commandName" : "controller-reset",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-reset |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
ok |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
重启设备
controller-restart
指令简介
软重启后,通过指令设置的参数将生效,同时设备将重新连接Wifi/4G网络,注意设备IP地址可能发生变化
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "202201241610366046",
"system" : "restart",
"type" : "setting"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 2 |
system |
String |
重启设备默认填"restart" |
restart |
| 3 |
type |
String |
固定填"setting" |
setting |
{
"commandName" : "controller-restart",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-restart |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
ok |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
获取设备通讯信息
info-protocol
指令简介
获取当前设备与服务端交互的通信协议及协议配置参数,目前支持MQTT、TCP Client,设备出厂时默认接入GemeOpen厂家MQTT测试服务器,免费提供客户调试使用,如需接入自己的服务器或使用其他协议,请自行搭建服务器。
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "202201241610366046",
"type" : "protocol"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 2 |
type |
String |
获取设备通讯信息固定传"protocol" |
protocol |
{
"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"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
clientId |
String |
自定义MQTT客户端ID注意:不可重复
|
admin |
| 2 |
commandName |
String |
指令名称 |
info-protocol |
| 3 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 4 |
port |
String |
端口号 |
1883 |
| 5 |
protocol |
String |
协议类型 |
mqtt |
| 6 |
publish |
String |
自定义发布主题 注意:不可重复 |
/topic/qos0 |
| 7 |
server |
String |
自定义服务器地址 |
192.168.0.66 |
| 8 |
source |
String |
指令回复“command" |
command |
| 9 |
subcribe |
String |
自定义订阅主题,注意:不可重复 |
/topic/qos1 |
| 10 |
username |
String |
自定义服务器用户名 |
username |
设置设备通电延时
setting-delayPowerOn
指令简介
设置点动控制后,门磁再次通电的时间,如设置5秒,按下面板或触发点动控制后,门磁5秒后才会通电,这时合上门磁才会吸合。
向设备发送指令
服务端向设备订阅topic发送消息
{
"delayPowerOn" : 0,
"messageId" : "202201241610366046",
"type" : "setting"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
delayPowerOn |
int |
通电延时时间,0-30秒 |
0 |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
type |
String |
固定传"setting" |
setting |
{
"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
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
setting-delayPowerOn |
| 2 |
delayPowerOn |
int |
通电延时时间,0-30秒 |
8 |
| 3 |
dhcpEnable |
int |
自动寻址1:开启, 0:关闭,默认开启 |
1 |
| 4 |
doorMode |
int |
0 :常开 、1常闭 2 :自动 ,默认模式为:自动 |
0 |
| 5 |
ip |
String |
设备连接WIFI后获取的IP |
192.168.122.119
|
| 6 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 7 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 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 |
type |
String |
设备类型 |
GSAM1B |
| 12 |
version |
String |
当前固件版本号 |
1.2.3 |
| 13 |
wifiLock |
int |
配网锁,0:关闭,1:开启 |
0 |
设置设备常开/常闭/自动模式
setting-doorMode
指令简介
设置模式为0及常开模式,门磁一直不吸合;设置模式为1及常闭模式,门磁一直吸合;设置模式为2及自动模式,门磁默认吸合状态,通过按动面板或点动控制触发门磁不吸合。
向设备发送指令
服务端向设备订阅topic发送消息
{
"doorMode" :2,
"messageId" : "202201241610366046",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
doorMode |
int |
0 :常开 、1常闭 2 :自动 ,默认模式为:自动 |
0 |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
type |
String |
设备控制传"event" |
event |
{
"commandName" : "setting-doorMode",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
setting-doorMode |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
ok |
| 4 |
source |
String |
指令回复“command" |
command |
| 5 |
success |
boolean |
执行结果 |
true |
自定义MQTT
setting-mqtt
指令简介
设备支持自定义MQTT,注意:在通过MQTT自定义MQTT信息后,需要将设备断电重启或者向设备发送重启命令才可生效。
向设备发送指令
服务端向设备订阅topic发送消息
{
"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"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
clientId |
String |
自定义MQTT客户端ID注意:不可重复
|
admin |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
password |
String |
密码 |
123456 |
| 4 |
port |
String |
端口号 |
1883 |
| 5 |
protocol |
String |
协议类型 |
mqtt |
| 6 |
publish |
String |
自定义发布主题 注意:不可重复 |
/topic/qos0 |
| 7 |
server |
String |
自定义服务器地址 |
192.168.0.66 |
| 8 |
subcribe |
String |
自定义订阅主题,注意:不可重复 |
/topic/qos1 |
| 9 |
type |
String |
固定传"custom" |
custom |
| 10 |
username |
String |
自定义服务器用户名 |
username |
{
"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"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
clientId |
String |
自定义MQTT客户端ID注意:不可重复
|
admin |
| 2 |
commandName |
String |
指令名称 |
setting-mqtt |
| 3 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
password |
String |
密码 |
123456 |
| 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 |
subcribe |
String |
自定义订阅主题,注意:不可重复 |
/topic/qos1 |
| 12 |
username |
String |
自定义服务器用户名 |
username |
自定义TCP
setting-tcp
指令简介
设备支持通过MQTT方式自定义TCP信息,注意:通过MQTT自定义TCP信息后,需要将设备断电重启或者向设备发送重启命令才可生效。
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "202201241610366046",
"port" : "1883",
"protocol" : "mqtt",
"server" : "192.168.0.66",
"type" : "custom"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 2 |
port |
String |
端口号 |
1883 |
| 3 |
protocol |
String |
协议类型 |
mqtt |
| 4 |
server |
String |
自定义服务器地址 |
192.168.0.66 |
| 5 |
type |
String |
固定传"custom" |
custom |
{
"commandName" : "setting-tcp ",
"messageId" : "202201241610366046",
"port" : "1883",
"protocol" : "mqtt",
"server" : "192.168.0.66",
"source" : "command"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
setting-tcp |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
port |
String |
端口号 |
1883 |
| 4 |
protocol |
String |
协议类型 |
mqtt |
| 5 |
server |
String |
自定义服务器地址 |
192.168.0.66 |
| 6 |
source |
String |
指令回复“command" |
command |
设置WiFi账号
setting-wifi-config
指令简介
修改设备的 WiFi 连接信息(网络名称与密码),使设备连接至指定的 WiFi 网络。设备仅支持 2.4G WiFi(不支持 5G 频段),请确认目标网络为 2.4G。
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "202201241610366046",
"password" : "123456",
"ssid" : "GemeOpen",
"type" : "setting"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 2 |
password |
String |
密码 |
123456 |
| 3 |
ssid |
String |
设备当前连接的WIFI名称 |
GemeOpen |
| 4 |
type |
String |
固定传"setting" |
setting |
{
"commandName" : "setting-wifi-config",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
setting-wifi-config |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
ok |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
设置IP获取方式
setting-wifi-dhcpEnable
指令简介
配置设备的 IP 获取方式,设备出厂时IP获取方式默认为DHCP,静态 IP 需位于路由器网段内且未被占用,否则可能无法联网或冲突。
向设备发送指令
服务端向设备订阅topic发送消息
{
"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"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
dhcpEnable |
int |
自动寻址1:开启, 0:关闭,默认开启 |
1 |
| 2 |
dns |
String |
DNS服务器地址 |
192.168.0.1 |
| 3 |
gateway |
String |
默认网关 |
192.168.0.1 |
| 4 |
local_ip |
String |
IP地址 |
192.168.0.118 |
| 5 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 6 |
subnet |
String |
子网掩码 |
255.255.255.0 |
| 7 |
type |
String |
设备设置固定传"setting" |
setting |
{
"commandName" : "setting-wifi-dhcpEnable",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
setting-wifi-dhcpEnable |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
ok |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
设置WiFi配网锁
setting-wifi-lock
指令简介
wifi配网锁定后,设备无法通过长按配网按钮进入配网操作,仅能通过MQTT/TCP协议解锁配网功能
向设备发送指令
服务端向设备订阅topic发送消息
{
"type" : "setting",
"wifiLock" : 0
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
type |
String |
设备设置固定传"setting" |
setting |
| 2 |
wifiLock |
int |
配网锁,0:关闭,1:开启 |
0 |
{
"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
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
setting-wifi-lock |
| 2 |
delayPowerOn |
int |
通电延时时间,0-30秒 |
8 |
| 3 |
dhcpEnable |
int |
自动寻址1:开启, 0:关闭,默认开启 |
1 |
| 4 |
doorMode |
int |
0 :常开 、1常闭 2 :自动 ,默认模式为:自动 |
0 |
| 5 |
ip |
String |
设备连接WIFI后获取的IP |
192.168.122.119
|
| 6 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 7 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 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 |
type |
String |
设备类型 |
GSAM1B |
| 12 |
version |
String |
当前固件版本号 |
1.2.3 |
| 13 |
wifiLock |
int |
配网锁,0:关闭,1:开启 |
0 |