GemeOpen
写几行代码,就可以控制的智能设备!
315/433MHz智能射频控制器开发者文档
产品型号:GSISMB
产品概要信息
基本描述
一款可学习的射频控制器,最大可学248个码值,控制距离≥100米,上行网络采用WiFi连接,支持MQTT/TCP协议二次开发
主要特点
WiFi网络,远程控制
支持学习248种射频信号
支持学习248种射频信号
产品图片
技术支持
企业微信扫一扫
武汉智鸟科技有限责任公司
企业官网:www.smart-bird.cn
服务热线:130-0715-9689
办公地址:湖北省武汉市高新大道光谷崇文中心B1栋1401、1409
射频控制
发射射频指令
controller-rf-emit
指令简介
将设备中已学习/写入的射频码通过射频模块发射,控制匹配的外部射频设备。 版本注意:指令格式自 v2.0.8 起变更(参数由嵌套结构改为扁平结构),使用前请先通过 info 指令确认固件版本,按版本号使用对应 JSON 格式。
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "emit",
"messageId" : "20260520",
"no" : 110,
"type" : "rf"
}
"action" : "emit",
"messageId" : "20260520",
"no" : 110,
"type" : "rf"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | action | String | 发射射频码指令默认填"emit" | emit |
| 2 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 3 | no | int | 红外码编号,编号范围1~248 | 110 |
| 4 | no | int | 射频码编号,编号范围1~248 | 110 |
| 5 | type | String | 射频相关指令默认填"rf" | rf |
设备返回信息
设备向服务端订阅topic上报消息
{
"commandName" : "controller-rf-emit",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
"commandName" : "controller-rf-emit",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | commandName | String | 指令名称 | controller-rf-emit |
| 2 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | 4CEBD60BFD62 |
| 3 | message | String | 执行结果描述:对命令执行结果的文本说明。执行完成且无异常:ok ;如果出现异常,返回异常结果描述。 | ok |
| 4 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 5 | source | String | 通过指令下发:command;通过按键操作:button;自动上报:auto。 | command |
| 6 | success | boolean | 执行结果,执行成功:true;执行失败:false | true |
擦除射频指令
controller-rf-erase
指令简介
删除设备中已存储的射频码(学习或写入的),擦除后该码不可恢复,需重新学习或写入。
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "erase",
"messageId" : "20260520",
"type" : "rf"
}
"action" : "erase",
"messageId" : "20260520",
"type" : "rf"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | action | String | 擦除码值指令默认为"erase" | erase |
| 2 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 3 | type | String | 射频相关指令默认填"rf" | rf |
设备返回信息
设备向服务端订阅topic上报消息
{
"commandName" : "controller-rf-erase",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
"commandName" : "controller-rf-erase",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | commandName | String | 指令名称 | controller-rf-erase |
| 2 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | 4CEBD60BFD62 |
| 3 | message | String | 命令执行结果的文本说明。ok 表示操作顺利完成,无异常;如果出现异常,会返回对应的异常说明文本。 | ok |
| 4 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 5 | source | String | 通过指令下发:command;通过按键操作:button;自动上报:auto。 | command |
| 6 | success | boolean | 执行结果,执行成功:true;执行失败:false | true |
学习射频指令
controller-rf-learn
指令简介
使设备进入学习模式,接收并存储现场遥控器发射的射频码,学习成功后可通过"发射射频码"指令控制对应设备。 版本注意:指令格式自 v2.0.8 起变更(参数由嵌套结构改为扁平结构),使用前请先通过 info 指令确认固件版本,按版本号使用对应 JSON 格式。
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "learn",
"messageId" : "20260520",
"no" : 110,
"type" : "rf"
}
"action" : "learn",
"messageId" : "20260520",
"no" : 110,
"type" : "rf"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | action | String | 学习射频码指令默认填"learn" | learn |
| 2 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 3 | no | int | 红外码编号,编号范围1~248 | 110 |
| 4 | no | int | 射频码编号,编号范围1~248 | 110 |
| 5 | type | String | 射频相关指令默认填"rf" | rf |
设备返回信息
设备向服务端订阅topic上报消息
{
"commandName" : "controller-rf-learn",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
"commandName" : "controller-rf-learn",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | commandName | String | 指令名称 | controller-rf-learn |
| 2 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | 4CEBD60BFD62 |
| 3 | message | String | 执行结果描述:对命令执行结果的文本说明。执行完成且无异常:ok ;如果出现异常,返回异常结果描述。 | ok |
| 4 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 5 | source | String | 通过指令下发:command;通过按键操作:button;自动上报:auto。 | command |
| 6 | success | boolean | 执行结果,执行成功:true;执行失败:false | true |
退出射频指令学习
controller-rf-learnCancel
指令简介
主动退出学习模式,中止射频码学习流程。下发"学习射频码"后 20 秒内不想继续学习时(误操作进入、遥控器不在现场等),发送本指令主动退出。
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "learnCancel",
"messageId" : "20260520",
"type" : "rf"
}
"action" : "learnCancel",
"messageId" : "20260520",
"type" : "rf"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | action | String | 取消学习射频码指令默认填"learnCancel" | learnCancel |
| 2 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 3 | type | String | 固定值"rf" | rf |
设备返回信息
设备向服务端订阅topic上报消息
{
"commandName" : "controller-rf-learnCancel",
"mac" : "D4059281D8E8",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
"commandName" : "controller-rf-learnCancel",
"mac" : "D4059281D8E8",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | commandName | String | 指令名称 | controller-rf-learnCancel |
| 2 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | D4059281D8E8 |
| 3 | message | String | 执行结果描述:对命令执行结果的文本说明。执行完成且无异常:ok ;如果出现异常,返回异常结果描述。 | ok |
| 4 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 5 | source | String | 通过指令下发:command;通过按键操作:button;自动上报:auto。 | command |
| 6 | success | boolean | 执行结果,执行成功:true;执行失败:false | true |
读取射频指令
controller-rf-read
指令简介
读取设备中当前工作频率下已存储的射频码信息。 版本注意:指令格式自 v2.0.8 起变更(参数由嵌套结构改为扁平结构),使用前请先通过 info 指令确认固件版本,按版本号使用对应 JSON 格式。
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "read",
"messageId" : "20260520",
"no" : 110,
"type" : "rf"
}
"action" : "read",
"messageId" : "20260520",
"no" : 110,
"type" : "rf"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | action | String | 查询码值指令默认“read” | read |
| 2 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 3 | no | int | 红外码编号,编号范围1~248 | 100 |
| 4 | no | int | 射频码编号,编号范围1~248 | 110 |
| 5 | type | String | 设备码值设置固定传"rf" | rf |
设备返回信息
设备向服务端订阅topic上报消息
{
"action" : "read",
"commandName" : "controller-rf-read",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "20260520",
"no" : 100,
"rfData" : "[231,15131],[514,1458],[517,1461],[520,1461],[528,1457],[1612,504],[526,1466],[519,1459],[1606,503],[1612,506],[1609,504],[523,1460],[521,1459],[512,1463],[517,1457],[517,1460],[1598,501],[522,1461],[1601,502],[1615,503],[522,1462],[1600,503],[522,1457],[521,1459],[1595,503]",
"source" : "command",
"success" : true
}
"action" : "read",
"commandName" : "controller-rf-read",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "20260520",
"no" : 100,
"rfData" : "[231,15131],[514,1458],[517,1461],[520,1461],[528,1457],[1612,504],[526,1466],[519,1459],[1606,503],[1612,506],[1609,504],[523,1460],[521,1459],[512,1463],[517,1457],[517,1460],[1598,501],[522,1461],[1601,502],[1615,503],[522,1462],[1600,503],[522,1457],[521,1459],[1595,503]",
"source" : "command",
"success" : true
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | action | String | 查询码值指令默认“read” | read |
| 2 | commandName | String | 指令名称 | controller-rf-read |
| 3 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | 4CEBD60BFD62 |
| 4 | message | String | 命令执行结果的文本说明。ok 表示操作顺利完成,无异常;如果出现异常,会返回对应的异常说明文本。 | ok |
| 5 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 6 | no | int | 射频码编号,编号范围1~248 | 100 |
| 7 | rfData | String | rf数据 | [231,15131],[514,1458],[517,1461],[520,1461],[528,1457],[1612,504],[526,1466],[519,1459],[1606,503],[1612,506],[1609,504],[523,1460],[521,1459],[512,1463],[517,1457],[517,1460],[1598,501],[522,1461],[1601,502],[1615,503],[522,1462],[1600,503],[522,1457],[521,1459],[1595,503] |
| 8 | rf_data | String | 通讯数据码 | 0x1 |
| 9 | rf_protol | String | 通讯协议 | 1527 |
| 10 | rf_type | String | 通讯介质:如315/433 | 315 |
| 11 | source | String | 通过指令下发:command;通过按键操作:button;自动上报:auto。 | command |
| 12 | success | boolean | 执行结果,执行成功:true;执行失败:false | true |
写入射频指令(复制/对拷)
controller-rf-write
指令简介
把通过读取指令获取的射频码写入设备,完成遥控器复制;写入后设备可响应与该射频码对应的遥控信号。
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "write",
"messageId" : "20260520",
"no" : 100,
"rfData" : "[231,15131],[514,1458],[517,1461],[520,1461],[528,1457],[1612,504],[526,1466],[519,1459],[1606,503],[1612,506],[1609,504],[523,1460],[521,1459],[512,1463],[517,1457],[517,1460],[1598,501],[522,1461],[1601,502],[1615,503],[522,1462],[1600,503],[522,1457],[521,1459],[1595,503]",
"type" : "rf"
}
"action" : "write",
"messageId" : "20260520",
"no" : 100,
"rfData" : "[231,15131],[514,1458],[517,1461],[520,1461],[528,1457],[1612,504],[526,1466],[519,1459],[1606,503],[1612,506],[1609,504],[523,1460],[521,1459],[512,1463],[517,1457],[517,1460],[1598,501],[522,1461],[1601,502],[1615,503],[522,1462],[1600,503],[522,1457],[521,1459],[1595,503]",
"type" : "rf"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | action | String | 学习射频码指令默认填"learn" | write |
| 2 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 3 | no | int | 射频码编号,编号范围1~248 | 100 |
| 4 | rfData | String | 射频数据 | [231,15131],[514,1458],[517,1461],[520,1461],[528,1457],[1612,504],[526,1466],[519,1459],[1606,503],[1612,506],[1609,504],[523,1460],[521,1459],[512,1463],[517,1457],[517,1460],[1598,501],[522,1461],[1601,502],[1615,503],[522,1462],[1600,503],[522,1457],[521,1459],[1595,503] |
| 5 | type | String | 固定值"rf" | rf |
设备返回信息
设备向服务端订阅topic上报消息
{
"commandName" : "controller-rf-write",
"mac" : "D4059281D8E8",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
"commandName" : "controller-rf-write",
"mac" : "D4059281D8E8",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | commandName | String | 指令名称 | controller-rf-write |
| 2 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | D4059281D8E8 |
| 3 | message | String | 命令执行结果的文本说明。ok 表示操作顺利完成,无异常;如果出现异常,会返回对应的异常说明文本。 | ok |
| 4 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 5 | source | String | 通过指令下发:command;通过按键操作:button;自动上报:auto。 | command |
| 6 | success | boolean | 执行结果,执行成功:true;执行失败:false | true |
切换射频工作频率
setting-decode-freq
指令简介
切换设备射频(RF)工作频率,使设备与现场射频设备(遥控器等)频率匹配,使用之前请确认以下几点:
1. 确认现场射频设备的工作频率(查看遥控器背标或说明书)
2. 现场设备为 315 MHz → 无需操作,默认频率已匹配
3. 现场设备为 433 MHz → 先执行本指令切换至 433 MHz,频率匹配后,方可执行射频相关操作(设备学习、遥控控制等)
4、 切换后,原频率下已学习的射频码仍然有效。
1. 确认现场射频设备的工作频率(查看遥控器背标或说明书)
2. 现场设备为 315 MHz → 无需操作,默认频率已匹配
3. 现场设备为 433 MHz → 先执行本指令切换至 433 MHz,频率匹配后,方可执行射频相关操作(设备学习、遥控控制等)
4、 切换后,原频率下已学习的射频码仍然有效。
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "set-decode-freq",
"freq" : "315",
"type" : "rf"
}
"action" : "set-decode-freq",
"freq" : "315",
"type" : "rf"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | action | String | 切换射频工作频率指令默认填"set-decode-freq" | set-decode-freq |
| 2 | freq | String | 工作频率,单位(Khz),出厂默认工作频率为315MHz | 315 |
| 3 | type | String | 固定值"rf" | rf |
设备返回信息
设备向服务端订阅topic上报消息
{
"commandName" : "rf-set-decode-freq",
"mac" : "D4059281D8E8",
"message" : "ok",
"source" : "command",
"success" : true
}
"commandName" : "rf-set-decode-freq",
"mac" : "D4059281D8E8",
"message" : "ok",
"source" : "command",
"success" : true
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | commandName | String | 统一指令名称 | rf-set-decode-freq |
| 2 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | D4059281D8E8 |
| 3 | message | String | 命令执行结果的文本说明。ok 表示操作顺利完成,无异常;如果出现异常,会返回对应的异常说明文本。 | ok |
| 4 | source | String | 通过指令下发:command;通过按键操作:button;自动上报:auto。 | command |
| 5 | success | boolean | 执行结果,执行成功:true;执行失败:false | true |
设备维护
重置设备
controller-reset
指令简介
将设备恢复至出厂状态,清除全部用户数据与配置,并自动重启。
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "20260520",
"system" : "reset",
"type" : "setting"
}
"messageId" : "20260520",
"system" : "reset",
"type" : "setting"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 2 | system | String | 重置/恢复出厂设置默认填"reset" | reset |
| 3 | type | String | 设备设置固定传"setting" | setting |
设备返回信息
设备向服务端订阅topic上报消息
{
"commandName" : "controller-reset",
"mac" : "9C139E5218FC",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
"commandName" : "controller-reset",
"mac" : "9C139E5218FC",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | commandName | String | 指令名称 | controller-reset |
| 2 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | 9C139E5218FC |
| 3 | message | String | 命令执行结果的文本说明。ok 表示操作顺利完成,无异常;如果出现异常,会返回对应的异常说明文本。 | ok |
| 4 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 5 | source | String | 通过指令下发:command;通过按键操作:button;自动上报:auto | command |
| 6 | success | boolean | 执行结果,执行成功:true;执行失败:false | true |
重启设备
controller-restart
指令简介
该指令主要用于使需重启生效的配置生效(如自定义MQTT/TCP/HTTP,设置静态IP,设置WiFi信息等),重启后设备自动恢复,重新联网,已保存配置和数据不丢失。
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "20260520",
"system" : "restart",
"type" : "setting"
}
"messageId" : "20260520",
"system" : "restart",
"type" : "setting"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 2 | system | String | 软重启默认填“restart” | restart |
| 3 | type | String | 设备设置固定传"setting" | setting |
设备返回信息
设备向服务端订阅topic上报消息
{
"commandName" : "controller-restart",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
"commandName" : "controller-restart",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | commandName | String | 指令名称 | controller-restart |
| 2 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | 4CEBD60BFD62 |
| 3 | message | String | 执行返回结果 | ok |
| 4 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 5 | source | String | 通过指令下发:command;通过按键操作:button;自动上报:auto。 | command |
| 6 | success | boolean | 执行结果 | true |
查询设备基础信息
info-all
指令简介
查询当前设备的基础信息,如设备MAC地址、设备型号、固件版本号、当前连接的WiFi名称(ssid)、当前设备被分配的IP地址、WiFi信号强度、及相关配置信息。
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "20260520",
"type" : "info"
}
"messageId" : "20260520",
"type" : "info"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 2 | type | String | 获取设备基本信息固定传"info" | info |
设备返回信息
设备向服务端订阅topic上报消息
{
"commandName" : "info-all",
"ip" : "192.168.122.119",
"mac" : "4CEBD60BFD62",
"messageId" : "20260520",
"signal" : -75,
"source" : "command",
"ssid" : "GemeOpen",
"type" : "GSISMB",
"version" : "1.2.3",
"wifiLock" : 0
}
"commandName" : "info-all",
"ip" : "192.168.122.119",
"mac" : "4CEBD60BFD62",
"messageId" : "20260520",
"signal" : -75,
"source" : "command",
"ssid" : "GemeOpen",
"type" : "GSISMB",
"version" : "1.2.3",
"wifiLock" : 0
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | commandName | String | 指令名称 | info-all |
| 2 | ip | String | 设备连接WIFI后获取的IP | 192.168.122.119 |
| 3 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | 4CEBD60BFD62 |
| 4 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 5 | signal | int | 信号强度,显示规则为: signal<= 0 && signal>= -50 //信号最好 signal< -50 && signal>= -70 //信号较好 signal< -70 && signal>= -80 //信号一般 signal<-80 && signal>= -100 //信号较差 signal没有在0~(-100)之间,表示无信号 | -75 |
| 6 | source | String | 通过指令下发:command;通过按键操作:button;自动上报:auto。 | command |
| 7 | ssid | String | 设备当前连接的WIFI名称 | GemeOpen |
| 8 | type | String | 设备类型 | GSISMB |
| 9 | version | String | 当前固件版本号 | 1.2.3 |
| 10 | wifiLock | int | 配网锁,0:关闭,1:开启,默认:0 | 0 |
获取设备通信协议
info-protocol
指令简介
获取当前设备与服务端交互的通信协议及协议配置参数,目前支持MQTT、TCP Client和HTTP Server,设备出厂时默认接入GemeOpen厂家MQTT测试服务器,免费提供客户调试使用,如需接入自己的服务器或使用其他协议,请自行搭建服务器。
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "20260520",
"type" : "protocol"
}
"messageId" : "20260520",
"type" : "protocol"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 2 | type | String | 获取设备通讯协议固定传protocol | protocol |
设备返回信息
设备向服务端订阅topic上报消息
{
"clientId" : "24587C2B98B0",
"commandName" : "info-protocol",
"mac" : "4CEBD60BFD62",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/xneyoF/qMKDkZMZsKIT/24587C2B98B0/subscribe",
"server" : "mqtt.smart-bird.cn
",
"source" : "command",
"subcribe" : "/xneyoF/qMKDkZMZsKIT/24587C2B98B0/publish",
"username" : "qMKDkZMZsKIT"
}
"clientId" : "24587C2B98B0",
"commandName" : "info-protocol",
"mac" : "4CEBD60BFD62",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/xneyoF/qMKDkZMZsKIT/24587C2B98B0/subscribe",
"server" : "mqtt.smart-bird.cn
",
"source" : "command",
"subcribe" : "/xneyoF/qMKDkZMZsKIT/24587C2B98B0/publish",
"username" : "qMKDkZMZsKIT"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | clientId | String | 自定义MQTT客户端ID注意:不可重复 | 24587C2B98B0 |
| 2 | commandName | String | 指令名称 | info-protocol |
| 3 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | 4CEBD60BFD62 |
| 4 | port | String | 端口号 | 1883 |
| 5 | protocol | String | 协议类型,MQTT协议固定传"mqtt" | mqtt |
| 6 | publish | String | 自定义MQTT发布主题 注意:不可重复 | /xneyoF/qMKDkZMZsKIT/24587C2B98B0/subscribe |
| 7 | server | String | 自定义MQTT服务器地址 | mqtt.smart-bird.cn |
| 8 | source | String | 通过指令下发:command;通过按键操作:button;自动上报:auto。 | command |
| 9 | subcribe | String | 自定义MQTT订阅主题注意:不可重复 | /xneyoF/qMKDkZMZsKIT/24587C2B98B0/publish |
| 10 | username | String | 自定义MQTT服务器用户名 | qMKDkZMZsKIT |
自定义MQTT参数
setting-mqtt-config
指令简介
修改设备的 MQTT 服务器连接参数,使设备接入客户指定的MQTT 服务器(自建服务器、第三方平台等)。
向设备发送指令
服务端向设备订阅topic发送消息
{
"clientId" : "sdhasgdas",
"password" : "1",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/duchaoqun0",
"server" : "broker.emqx.io",
"subcribe" : "/topic/duchaoqun1",
"type" : "custom",
"username" : "1"
}
"clientId" : "sdhasgdas",
"password" : "1",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/duchaoqun0",
"server" : "broker.emqx.io",
"subcribe" : "/topic/duchaoqun1",
"type" : "custom",
"username" : "1"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | clientId | String | 自定义MQTT客户端ID注意:不可重复 | sdhasgdas |
| 2 | password | String | 密码 | 1 |
| 3 | port | String | 端口号 | 1883 |
| 4 | protocol | String | 协议类型 | mqtt |
| 5 | publish | String | 自定义发布主题 注意:不可重复 | /topic/duchaoqun0 |
| 6 | server | String | 自定义服务器地址 | broker.emqx.io |
| 7 | subcribe | String | 自定义订阅主题,注意:不可重复 | /topic/duchaoqun1 |
| 8 | type | String | 固定值"xxx" | custom |
| 9 | username | String | 自定义服务器用户名 | 1 |
设备返回信息
设备向服务端订阅topic上报消息
{
"clientId" : "sdhasgdas",
"commandName" : "setting-mqtt",
"mac" : "4CEBD60BFD62",
"password" : "1",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/duchaoqun0",
"server" : "broker.emqx.io",
"source" : "command",
"subcribe" : "/topic/duchaoqun1",
"username" : "1"
}
"clientId" : "sdhasgdas",
"commandName" : "setting-mqtt",
"mac" : "4CEBD60BFD62",
"password" : "1",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/duchaoqun0",
"server" : "broker.emqx.io",
"source" : "command",
"subcribe" : "/topic/duchaoqun1",
"username" : "1"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | clientId | String | 自定义MQTT客户端ID注意:不可重复 | sdhasgdas |
| 2 | commandName | String | 指令名称 | setting-mqtt |
| 3 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | 4CEBD60BFD62 |
| 4 | password | String | 密码 | 1 |
| 5 | port | String | 端口号 | 1883 |
| 6 | protocol | String | 协议类型 | mqtt |
| 7 | publish | String | 自定义发布主题 注意:不可重复 | /topic/duchaoqun0 |
| 8 | server | String | 自定义服务器地址 | broker.emqx.io |
| 9 | source | String | 指令回复“command" | command |
| 10 | subcribe | String | 自定义订阅主题,注意:不可重复 | /topic/duchaoqun1 |
| 11 | username | String | 自定义服务器用户名 | 1 |
自定义TCP参数
setting-tcp-config
指令简介
设置/修改设备的 TCP 服务器连接参数。设备仅支持 TCP Client 模式,设备作为客户端主动连接客户指定的 TCP 服务器。
向设备发送指令
服务端向设备订阅topic发送消息
{
"port" : "1883",
"protocol" : "tcp",
"server" : "192.168.0.66",
"type" : "custom"
}
"port" : "1883",
"protocol" : "tcp",
"server" : "192.168.0.66",
"type" : "custom"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | port | String | 端口号 | 1883 |
| 2 | protocol | String | 协议类型 | tcp |
| 3 | server | String | 自定义服务器地址 | 192.168.0.66 |
| 4 | type | String | 固定值"xxx" | custom |
设备返回信息
设备向服务端订阅topic上报消息
{
"commandName" : "setting-tcp",
"mac" : "4CEBD60BFD62",
"port" : "1883",
"protocol" : "tcp",
"server" : "192.168.0.66",
"source" : "command"
}
"commandName" : "setting-tcp",
"mac" : "4CEBD60BFD62",
"port" : "1883",
"protocol" : "tcp",
"server" : "192.168.0.66",
"source" : "command"
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | commandName | String | 指令名称 | setting-tcp |
| 2 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | 4CEBD60BFD62 |
| 3 | port | String | 端口号 | 1883 |
| 4 | protocol | String | 协议类型 | tcp |
| 5 | server | String | 自定义服务器地址 | 192.168.0.66 |
| 6 | source | String | 指令回复“command" | command |
设置WiFi配网锁
setting-wifi-lock
指令简介
锁定/解锁设备的按键配网入口。锁定后,长按开关键6 秒将不再进入配网模式,防止误触或现场人员擅自重新配网。
向设备发送指令
服务端向设备订阅topic发送消息
{
"messageId" : "20260520",
"type" : "setting",
"wifiLock" : 0
}
"messageId" : "20260520",
"type" : "setting",
"wifiLock" : 0
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 2 | type | String | 设备设置固定传"setting" | setting |
| 3 | wifiLock | int | 配网锁,0:关闭,1:开启,默认值:0 | 0 |
设备返回信息
设备向服务端订阅topic上报消息
{
"commandName" : "setting-wifi-lock",
"ip" : "192.168.122.119",
"mac" : "4CEBD60BFD62",
"messageId" : "20260520",
"signal" : -75,
"source" : "command",
"ssid" : "GemeOpen",
"type" : "GSISMB",
"version" : "1.2.3",
"wifiLock" : 0
}
"commandName" : "setting-wifi-lock",
"ip" : "192.168.122.119",
"mac" : "4CEBD60BFD62",
"messageId" : "20260520",
"signal" : -75,
"source" : "command",
"ssid" : "GemeOpen",
"type" : "GSISMB",
"version" : "1.2.3",
"wifiLock" : 0
}
字段属性
| # | 字段名称 | 字段类型 | 字段说明 | 示例值 |
|---|---|---|---|---|
| 1 | commandName | String | 指令名称 | setting-wifi-lock |
| 2 | ip | String | 设备连接WIFI后获取的IP | 192.168.122.119 |
| 3 | mac | String | wifi设备MAC地址或4G设备的IMEI号,唯一标识 | 4CEBD60BFD62 |
| 4 | messageId | String | 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。 | 20260520 |
| 5 | signal | int | 信号强度,显示规则为: signal<= 0 && signal>= -50 //信号最好 signal< -50 && signal>= -70 //信号较好 signal< -70 && signal>= -80 //信号一般 signal<-80 && signal>= -100 //信号较差 signal没有在0~(-100)之间,表示无信号 | -75 |
| 6 | source | String | 通过指令下发:command;通过按键操作:button;自动上报:auto。 | command |
| 7 | ssid | String | 设备当前连接的WIFI名称 | GemeOpen |
| 8 | type | String | 设备类型 | GSISMB |
| 9 | version | String | 当前固件版本号 | 1.2.3 |
| 10 | wifiLock | int | 配网锁,0:关闭,1:开启 | 0 |









