智能红外控制器-WiFi版 (型号:GSCU1B) - 开发者指令

产品基本描述

一款支持学习的红外遥控器,采用MQTT/TCP协议控制,上行使用WiFi网络连接,开发者使用任意开发语言,实现对遥控器的控制,5V USB-C供电,发射有效距离6米。
常用于空调遥控、电视遥控、电扇遥控,接入开发者私有物联网平台,实现远程控制以及智能联动。

产品主要特点

WiFi网络,远程控制
支持学习248种红外信号
5V 1A供电

产品电气参数


参数名参数值
品牌GemeOpen
上市日期2025年
产品类型智能红外控制器-WiFi版
产品型号GSCU1B
外观尺寸65mm65mm29mm
输入电压5V
工作电压1A
遥控信号38KHz 红外
待机功率<1W
通信方式2.4GHz WIFI
通讯模块乐鑫ESP32
电源插口USB Type-C
载波频率38KHz 红外
遥控距离6米(此为控制器正对设备无遮挡时,直线有效距离,因不同设备而异。注意: 本控制器遥控距离无法达到原装遥控器水平。)
红外学习支持学习248种红外信号

控制采集

发送学习过的红外指令

controller-infrared-emit

向设备发送指令(服务端向设备订阅topic发送消息)

{
  "action" : "emit",
  "data" :
  {
    "no" : 110
  },
  "type" : "infrared"
}
字段属性

字段名称字段类型字段说明示例值
actionString发射红外码,固定为"emit"emit
dataObject数据
noint红外码编号,编号范围1~248110
typeString红外相关指令默认填"infrared"infrared

设备返回信息(设备向服务端订阅topic上报消息)

{
  "action" : "emit",
  "mac" : "10b41d1a2f40",
  "messageId" : "2026092201",
  "no" : 110,
  "success" : true,
  "type" : "infrared"
}
字段属性

字段名称字段类型字段说明示例值
actionString学习红外码指令默认填"learn"emit
macStringwifi设备MAC地址或4G设备的IMEI号,唯一标识10b41d1a2f40
messageIdString业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。2026092201
noint红外码编号,编号范围1~248110
successboolean执行结果,执行成功:true;执行失败:falsetrue
typeString固定值"infrared"infrared

擦除红外指令

controller-infrared-erase

向设备发送指令(服务端向设备订阅topic发送消息)

{
  "action" : "erase",
  "type" : "infrared"
}
字段属性

字段名称字段类型字段说明示例值
actionString擦除红外码,固定为"erase"erase
typeString红外相关指令默认填"infrared"infrared

设备返回信息(设备向服务端订阅topic上报消息)

{
  "action" : "erase",
  "mac" : "10b41d1a2f40",
  "messageId" : "2026092201",
  "success" : true,
  "type" : "infrared"
}
字段属性

字段名称字段类型字段说明示例值
actionString学习红外码指令默认填"learn"erase
macStringwifi设备MAC地址或4G设备的IMEI号,唯一标识10b41d1a2f40
messageIdString业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。2026092201
successboolean执行结果,执行成功:true;执行失败:falsetrue
typeString固定值"infrared"infrared

学习红外代码

controller-infrared-learn

向设备发送指令(服务端向设备订阅topic发送消息)

{
  "action" : "learn",
  "data" :
  {
    "no" : 110
  },
  "type" : "infrared"
}
字段属性

字段名称字段类型字段说明示例值
actionString学习红外码指令默认填"learn"learn
dataObject数据
noint红外码编号,编号范围1~248110
typeString红外相关指令默认填"infrared"infrared

设备返回信息(设备向服务端订阅topic上报消息)

{
  "action" : "learn",
  "mac" : "10b41d1a2f40",
  "messageId" : " 2026092201",
  "no" : 110,
  "success" : true,
  "type" : "infrared"
}
字段属性

字段名称字段类型字段说明示例值
actionString学习红外码指令默认填"learn"learn
macStringwifi设备MAC地址或4G设备的IMEI号,唯一标识10b41d1a2f40
messageIdString业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。2026092201
noint红外码编号,编号范围1~248110
successboolean执行结果,执行成功:true;执行失败:falsetrue
typeString固定值"infrared"infrared

获取设备基础信息

info-all

向设备发送指令(服务端向设备订阅topic发送消息)

{
  "messageId" : "2026092201",
  "type" : "info"
}
字段属性

字段名称字段类型字段说明示例值
messageIdString业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。2026092201
typeString固定值"info"info

设备返回信息(设备向服务端订阅topic上报消息)

{
  "code" : "Infrared-Controller-wifi",
  "ip" : "192.168.0.223",
  "mac" : "10b41d1a2f40",
  "messageId" : "2026092201",
  "signal" : -45,
  "ssid" : "gemeopen",
  "type" : "info",
  "version" : "1.1.6",
  "wifiLock" : 0
}
字段属性

字段名称字段类型字段说明示例值
codeString设备型号代码Infrared-Controller-wifi
ipString设备连接WIFI后获取的IP192.168.0.223
macStringwifi设备MAC地址或4G设备的IMEI号,唯一标识10b41d1a2f40
messageIdString业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。2026092201
signalint信号强度,显示规则为: signal<= 0 && signal>= -50 //信号最好 signal< -50 && signal>= -70 //信号较好 signal< -70 && signal>= -80 //信号一般 signal<-80 && signal>= -100 //信号较差 signal没有在0~(-100)之间,表示无信号-45
ssidString设备当前连接的WIFI名称gemeopen
typeString固定值"info"info
versionString当前固件版本号1.1.6
wifiLockint配网锁,0:关闭,1:开启0

设备维护

恢复出厂

controller-reset

向设备发送指令(服务端向设备订阅topic发送消息)

{
  "system" : "reset",
  "type" : "setting"
}
字段属性

字段名称字段类型字段说明示例值
systemString重置/恢复出厂设置默认填"reset"reset
typeString设备设置固定传"setting"setting

设备返回信息(设备向服务端订阅topic上报消息)

{
  "commandName" : "controller-reset",
  "mac" : "4CEBD60BFD62",
  "message" : "ok",
  "messageId" : "20260520",
  "source" : "command",
  "success" : true
}
字段属性

字段名称字段类型字段说明示例值
commandNameString指令名称controller-reset
macStringwifi设备MAC地址或4G设备的IMEI号,唯一标识4CEBD60BFD62
messageString执行结果描述:对命令执行结果的文本说明。执行完成且无异常:ok ;如果出现异常,返回异常结果描述。ok
messageIdString业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。20260520
sourceString指令回复“command"command
successboolean执行结果,执行成功:true;执行失败:falsetrue

设备软重启

controller-restart

向设备发送指令(服务端向设备订阅topic发送消息)

{
"system" : "restart",
"type" : "setting"
}
字段属性

字段名称字段类型字段说明示例值
systemString设备软重启固定传"restart"restart
typeString设备设置固定传"setting"setting

设备返回信息(设备向服务端订阅topic上报消息)

{
"commandName" : "controller-restart",
"mac" : "4CEBD60BFD62",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
字段属性

字段名称字段类型字段说明示例值
commandNameString指令名称controller-restart
macStringwifi设备MAC地址或4G设备的IMEI号,唯一标识4CEBD60BFD62
messageString执行结果描述:对命令执行结果的文本说明。执行完成且无异常:ok ;如果出现异常,返回异常结果描述。ok
messageIdString业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。20260520
sourceString指令回复“command"command
successboolean执行结果,执行成功:true;执行失败:falsetrue

ir_read

向设备发送指令(服务端向设备订阅topic发送消息)

{
  "action" : "ir_read",
  "data" :
  {
    "no" : 100
  },
  "messageId" : "API-xxx",
  "type" : "infrared"
}
字段属性

字段名称字段类型字段说明示例值
actionString读取红外码指令,默认填"read"ir_read
dataObject数据
messageIdString消息ID字段API-xxx
noint红外码编号,编号范围1~248100
typeString消息类型infrared

设备返回信息(设备向服务端订阅topic上报消息)

{
  "commandName" : "controller-infrared-read",
  "ir_data" : "00495D2D0606060506060606060506060606060605110611051106110511061006110610060606060606060506060606061006060610061106100611061006110606061006FFFFFFFF",
  "mac" : "4CEBD60BFD62",
  "message" : "ok",
  "messageId" : "API-xxx",
  "no" : 100,
  "source" : "command",
  "success" : true
}
字段属性

字段名称字段类型字段说明示例值
commandNameString指令名称controller-infrared-read
ir_dataString红外码数据,包含 2字节长度头 + 红外数据 + 4字节结尾FF00495D2D0606060506060606060506060606060605110611051106110511061006110610060606060606060506060606061006060610061106100611061006110606061006FFFFFFFF
macStringwifi设备MAC地址或4G设备的IMEI号,唯一标识4CEBD60BFD62
messageString执行返回结果ok
messageIdString消息ID字段API-xxx
noint红外码编号,编号范围1~248100
sourceString指令回复“command"command
successboolean执行结果true

ir_write

向设备发送指令(服务端向设备订阅topic发送消息)

{
  "action" : "ir_write",
  "ir_data" : "00495D2D0606060506060606060506060606060605110611051106110511061006110610060606060606060506060606061006060610061106100611061006110606061006FFFFFFFF",
  "messageId" : "API-xxx",
  "no" : 110,
  "type" : "infrared"
}
字段属性

字段名称字段类型字段说明示例值
actionString写入红外码指令,固定填 “ir_write”ir_write
ir_dataString红外码数据(HEX字符串,包含长度头和结尾FF)00495D2D0606060506060606060506060606060605110611051106110511061006110610060606060606060506060606061006060610061106100611061006110606061006FFFFFFFF
messageIdString消息ID字段API-xxx
noint红外码编号,编号范围1~248110
typeString消息类型infrared

设备返回信息(设备向服务端订阅topic上报消息)

{
  "commandName" : "controller-infrared-write",
  "mac" : "4CEBD60BFD62",
  "message" : "ok",
  "messageId" : "API-xxx",
  "no" : 110,
  "source" : "command",
  "success" : true
}
字段属性

字段名称字段类型字段说明示例值
commandNameString指令名称controller-infrared-write
macStringwifi设备MAC地址或4G设备的IMEI号,唯一标识4CEBD60BFD62
messageString执行返回结果ok
messageIdString消息ID字段API-xxx
noint红外码编号,编号范围1~248110
sourceString指令回复“command"command
successboolean执行结果true

自定义MQTT

setting-mqtt

向设备发送指令(服务端向设备订阅topic发送消息)

{
"clientId" : "admin",
"password" : "password",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/qos0",
"server" : "192.168.0.66",
"subcribe" : "/topic/qos1",
"type" : "custom",
"username" : "username"
}
字段属性

字段名称字段类型字段说明示例值
clientIdString自定义MQTT客户端ID注意:不可重复admin
passwordString密码password
portString端口号1883
protocolString协议类型mqtt
publishString自定义发布主题 注意:不可重复/topic/qos0
serverString自定义服务器地址192.168.0.66
subcribeString自定义订阅主题,注意:不可重复/topic/qos1
typeString自定义MQTT配置默认填"custom"custom
usernameString自定义服务器用户名username

设备返回信息(设备向服务端订阅topic上报消息)

{
"clientId" : "admin",
"commandName" : "setting-mqtt",
"mac" : "4CEBD60BFD62",
"messageId" : "202201241610366046",
"password" : "123456",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/rqlMqR/GYofdXmMpHQa/8cce4e51e2c7/subscribe",
"server" : "broker.emqx.io",
"source" : "command",
"subcribe" : "/topic/qos1 ",
"username" : "admin"
}
字段属性

字段名称字段类型字段说明示例值
clientIdString自定义MQTT客户端ID注意:不可重复admin
commandNameString指令名称setting-mqtt
macStringwifi设备MAC地址或4G设备的IMEI号,唯一标识4CEBD60BFD62
messageIdString业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。202201241610366046
passwordString密码123456
portString端口号1883
protocolString协议类型mqtt
publishString自定义发布主题 注意:不可重复/rqlMqR/GYofdXmMpHQa/8cce4e51e2c7/subscribe
serverString自定义服务器地址broker.emqx.io
sourceString指令回复“command"command
subcribeString自定义订阅主题,注意:不可重复/topic/qos1
usernameString自定义服务器用户名admin

自定义TCP

setting-tcp

向设备发送指令(服务端向设备订阅topic发送消息)

{
"port" : "1883",
"protocol" : "tcp",
"server" : "192.168.0.66",
"type" : "custom"
}
字段属性

字段名称字段类型字段说明示例值
portString端口号1883
protocolString协议类型tcp
serverString自定义服务器地址192.168.0.66
typeString默认填"custom"custom

设备返回信息(设备向服务端订阅topic上报消息)

{
"commandName" : "setting-tcp",
"mac" : "4CEBD60BFD62",
"messageId" : "202201241610366046",
"port" : "8080",
"protocol" : "tcp",
"server" : "192.168.0.66",
"source" : "command"
}
字段属性

字段名称字段类型字段说明示例值
commandNameString指令名称setting-tcp
macStringwifi设备MAC地址或4G设备的IMEI号,唯一标识4CEBD60BFD62
messageIdString业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。202201241610366046
portString端口号8080
protocolString协议类型tcp
serverString自定义服务器地址192.168.0.66
sourceString指令回复“command"command

更多推荐