GemeOpen 屏显智能温湿度传感器-WiFi版 (型号:GSTMD1B) - 开发者指令
# 屏显智能温湿度传感器-WiFi版 (型号:GSTMD1B) - 开发者指令
## 产品基本描述
一款支持二次开发的温湿度传感器,内置锂电池,可超长待机90天离线采集存储20万条数据,WiFi网络连接,MQTT/TCP通讯协议,TypeC供电长支持通讯长连接,可自由调整采集频率与上报规则
## 产品主要特点
WiFi通信,双供电模式
超清断码屏显示,
支持离线存储数据20W条
超清断码屏显示,
支持离线存储数据20W条
## 官网产品资料
### 产品详细信息
https://www.smart-bird.cn/GSTMD1B.html
### 淘宝购买网址
http://vi.smart-bird.cn/zP2Cm
### 京东购买网址
http://vi.smart-bird.cn/9ateb
### 开发者文档
https://www.smart-bird.cn/doc/product/GSTMB/device/GSTMD1B/command
## 产品电气参数
---
| 参数名 | 参数值 |
|------|------|
|
品牌
| GemeOpen
|
|
上市日期
| 2026-07
|
|
产品类型
| 屏显智能温湿度传感器-WiFi版
|
|
产品型号
| GSTMD1B
|
|
外观尺寸
| 80mm*80mm*30mm
|
|
传感器类型
| 内置瑞士 Sensirion SHT30 传感器
|
|
供电电源
| EVE 18650锂电池*1
|
|
供电方式
| 锂电池/5V 1A USB Type-C电源线
|
|
待机功率
| -
|
|
通讯模块
| ESP32
|
|
通讯方式
| 2.4GHz WiFi
|
|
屏幕类型
| FSTN断码屏
|
|
内存Flash
| 4MB
|
|
温度测量范围
| -40℃~+125℃
|
|
湿度测量范围
| 0~100%RH
|
|
温度测量精度
| ±0.2℃
|
|
湿度测量精度
| ±2%RH
|
|
适用工作温湿度范围
| -20℃~+60℃,5~95%RH(无凝结)
|
|
安装方式
| 桌面放置/悬挂/磁吸
|
|
外壳材质
| PC阻燃 V2级
|
|
外壳防护等级
| -
|
|
备注说明
| 测量数据由瑞士Sensirion厂商资料提供,数据仅供参考。本产品不防水,请勿浸没在水中使用。不适于在高湿度的恶劣环境使用。
|
---
## 数据采集
### 自动上报温湿度
*info-data-sync*
设备会持续将温湿度采集结果写入设备本地存储区(本地大约可存储30万条数据)。<br/>设备缓存阈值达到上限时自动向平台分批同步数据(单批最多发送 200 条)。<br/>已经上报成功的记录仍然保留在设备本地,本地存储区写满后,设备按时间顺序覆盖最早记录。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"batchIndex" : 0,
"batchTotal" : 1,
"commandName" : "info-data-sync",
"count" : 4,
"data" : [[1787992225,28.8,55.4]],
"fields" : ["timestamp","temperature","humidity"],
"mac" : "2026bb16aa14",
"source" : "auto"
}
"batchIndex" : 0,
"batchTotal" : 1,
"commandName" : "info-data-sync",
"count" : 4,
"data" : [[1787992225,28.8,55.4]],
"fields" : ["timestamp","temperature","humidity"],
"mac" : "2026bb16aa14",
"source" : "auto"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
batchIndex
| int
| 当前批次索引(从 0 开始)
| 0
|
|
batchTotal
| int
| 总批次数量
| 1
|
|
commandName
| String
| 指令名称
| info-data-sync
|
|
count
| int
| 当前批次包含的记录数
| 4
|
|
data
| Object
| 数据
| [[1787992225,28.8,55.4]]
|
|
fields
| Object
| 数据字段名称数组
| ["timestamp","temperature","humidity"]
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb16aa14
|
|
source
| String
| 指令回复“auto"
| auto
|
---
### 查询实时温湿度
*info-statistic*
获取设备采集的温度、湿度和当前电池电量信息。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"messageId" : "202201241610366046",
"type" : "statistic"
}
"messageId" : "202201241610366046",
"type" : "statistic"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
messageId
| String
| 消息ID字段
| 202201241610366046
|
|
type
| String
| 获取设备温湿度信息固定传"statistic"
| statistic
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"batteryLevel" : 98,
"commandName" : "info-statistic",
"humidity" : 54.45,
"mac" : "2026bb16aa14",
"messageId" : "20260520",
"source" : "command",
"temperature" : 28,
"timestamp" : 1711262254
}
"batteryLevel" : 98,
"commandName" : "info-statistic",
"humidity" : 54.45,
"mac" : "2026bb16aa14",
"messageId" : "20260520",
"source" : "command",
"temperature" : 28,
"timestamp" : 1711262254
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
batteryLevel
| int
| 当前电量百分比
| 98
|
|
commandName
| String
| 指令名称
| info-statistic
|
|
humidity
| float
| 湿度 (单位:%)
| 54.45
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb16aa14
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
source
| String
| 指令回复“command"
| command
|
|
temperature
| float
| 温度 (单位:摄氏度)
| 28
|
|
timestamp
| int
| 时间戳
| 1711262254
|
---
### 设置采集规则
*setting-sampling-interval*
设置设备温湿度数据采集的时间间隔和数据同步给平台的规则。<br/>设备按此间隔将传感器数据写入本地存储,保障断网期间数据不丢失;联网后会自动同步尚未同步的数据。<br/>设备首先自动发送 1 条设备统计信息,见“info-statistic”,然后开始同步离线数据,离线数据同步格式为:见“ info-data-sync”。 <br/><br/>●数据采集及上报默认规则如下:<br/>温湿度采集频率:1分钟。<br/>Type-C供电下,数据缓存条数:1条(达到后触发上报,即1分钟上报一次);<br/>电池供电下,数据缓存条数:15条(达到后触发上报,即15 分钟上报一次)。<br/><br/>验证阶段:<br/>1.在业务开发/调试验证阶段,推荐使用Type-C 外部供电(USB-A to Type-C、 PD 快充协议都支持),Type-c供电时设备会退出低功耗模式,进入常联网状态。<br/>2.如若正式场景仅使用电池供电,上报频率支持自定义调节,续航随上报频率变化,频率越高续航越短。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"batteryCacheCount" : 15,
"messageId" : "20260520",
"samplingInterval" : 60,
"type" : "setting",
"typecCacheCount" : 1
}
"batteryCacheCount" : 15,
"messageId" : "20260520",
"samplingInterval" : 60,
"type" : "setting",
"typecCacheCount" : 1
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
batteryCacheCount
| int
| 电池供电模式下,本地缓存达到该条数触发上报,仅电池供电生效。最大值为17280条
| 15
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
samplingInterval
| int
| 采集间隔(单位秒),最小值 5,范围 5-86400
| 60
|
|
type
| String
| 设备设置固定值"setting"
| setting
|
|
typecCacheCount
| int
| Type-C供电模式下,本地缓存达到该条数触发上报,仅Type‑C供电生效。最大值为17280条
| 1
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"batteryCacheCount" : 15,
"commandName" : "setting-sampling-interval",
"mac" : "2026bb16aa14",
"message" : "ok",
"messageId" : "20260520",
"samplingInterval" : 60,
"source" : "command",
"success" : true,
"typecCacheCount" : 1
}
"batteryCacheCount" : 15,
"commandName" : "setting-sampling-interval",
"mac" : "2026bb16aa14",
"message" : "ok",
"messageId" : "20260520",
"samplingInterval" : 60,
"source" : "command",
"success" : true,
"typecCacheCount" : 1
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
batteryCacheCount
| int
| 电池供电模式下,本地缓存达到该条数触发上报,仅电池供电生效。最大值为17280条
| 15
|
|
commandName
| String
| 指令名称
| setting-sampling-interval
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb16aa14
|
|
message
| String
| 执行返回结果
| ok
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
samplingInterval
| int
| 采集间隔(单位秒),最小值 5,范围 5-86400
| 60
|
|
source
| String
| 指令回复“command"
| command
|
|
success
| boolean
| 执行结果
| true
|
|
typecCacheCount
| int
| Type-C供电模式下,本地缓存达到该条数触发上报,仅Type‑C供电生效。最大值为17280条
| 1
|
---
## 设备维护
### 重置恢复出厂
*controller-reset*
恢复出厂设置后配网信息和自定义信息都会清空,请谨慎操作!
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"messageId" : "20260520",
"system" : "reset",
"type" : "setting"
}
"messageId" : "20260520",
"system" : "reset",
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
system
| String
| 重置/恢复出厂设置默认填"reset"
| reset
|
|
type
| String
| 设备设置固定传"setting"
| setting
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"commandName" : "controller-reset",
"mac" : "2026bb1cc514",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
"commandName" : "controller-reset",
"mac" : "2026bb1cc514",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| controller-reset
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb1cc514
|
|
message
| String
| 执行返回结果
| ok
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
source
| String
| 指令回复“command"
| command
|
|
success
| boolean
| 执行结果
| true
|
---
### 设备软重启
*controller-restart*
软重启后,通过指令设置的参数将生效,同时设备将重新连接Wifi网络,注意设备IP地址可能发生变化。特殊操作:长按按钮12s执行软重启。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"messageId" : "20260520",
"system" : "restart",
"type" : "setting"
}
"messageId" : "20260520",
"system" : "restart",
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
system
| String
| 设备软重启默认填"restart"
| restart
|
|
type
| String
| 设备设置固定传"setting"
| setting
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"commandName" : "controller-restart",
"mac" : "2026bb1cc514",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
"commandName" : "controller-restart",
"mac" : "2026bb1cc514",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| controller-restart
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb1cc514
|
|
message
| String
| 执行返回结果
| ok
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
source
| String
| 指令回复“command"
| command
|
|
success
| boolean
| 执行结果
| true
|
---
### 获取设备信息
*info-all*
获取设备信息一般会包含:设备通断电状态、MAC/IMEI、固件版本、设备内网IP地址、设备WIFI网络名称等信息,不同的产品返回的信息有所差异
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"messageId" : "202201241610366046",
"type" : "info"
}
"messageId" : "202201241610366046",
"type" : "info"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
messageId
| String
| 消息ID字段
| 202201241610366046
|
|
type
| String
| 设备设置固定传"info"
| info
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"batteryCacheCount" : 15,
"batteryLevel" : 98,
"bssid" : "742ad779046",
"code" : "GSTMD1B",
"commandName" : "info-all",
"dhcpEnable" : 1,
"humidityOffset" : -2.5,
"ip" : "192.168.122.119
",
"mac" : "2026bb16aa14",
"messageId" : "20260520",
"powerSource" : "Battery",
"samplingInterval" : 60,
"signal" : -75,
"source" : "command",
"ssid" : "gemeopen",
"tempOffset" : 0,
"typecCacheCount" : 1,
"version" : "1.0.0"
}
"batteryCacheCount" : 15,
"batteryLevel" : 98,
"bssid" : "742ad779046",
"code" : "GSTMD1B",
"commandName" : "info-all",
"dhcpEnable" : 1,
"humidityOffset" : -2.5,
"ip" : "192.168.122.119
",
"mac" : "2026bb16aa14",
"messageId" : "20260520",
"powerSource" : "Battery",
"samplingInterval" : 60,
"signal" : -75,
"source" : "command",
"ssid" : "gemeopen",
"tempOffset" : 0,
"typecCacheCount" : 1,
"version" : "1.0.0"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
batteryCacheCount
| int
| 电池供电模式下,本地缓存达到该条数触发上报,仅电池供电生效。最大值为17280条
| 15
|
|
batteryLevel
| int
| 当前电量百分比
| 98
|
|
bssid
| String
| 路由器 MAC 地址
| 742ad779046
|
|
code
| String
| 设备型号代码
| GSTMD1B
|
|
commandName
| String
| 指令名称
| info-all
|
|
dhcpEnable
| int
| 自动寻址1:开启, 0:关闭,默认开启
| 1
|
|
humidityOffset
| float
| 湿度补偿偏移值,单位:%RH,范围:-20~+20。
计算公式:校准后数据=实际读取的数据+humidityOffset
| -2.5
|
|
ip
| String
| 设备连接WIFI后获取的IP
| 192.168.122.119
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb16aa14
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
powerSource
| String
| 设备当前供电方式Type-C/Battery
| Battery
|
|
samplingInterval
| int
| 采集间隔(单位秒),最小值 5,范围 5-86400
| 60
|
|
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
|
|
tempOffset
| float
| 温度补偿偏移值,单位:℃,取值范围:+20~-20;
计算公式:校准后数据=实际读取的数据+tempOffset
| 0
|
|
typecCacheCount
| int
| Type-C供电模式下,本地缓存达到该条数触发上报,仅Type‑C供电生效。最大值为17280条
| 1
|
|
version
| String
| 当前固件版本号
| 1.0.0
|
---
### 获取设备工作模式信息
*info-protocol*
查询设备当前使用的通信协议配置信息,设备支持MQTT或TCP工作模式,不同的工作模式,返回的字段信息不同
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"messageId" : "20260520",
"type" : "protocol"
}
"messageId" : "20260520",
"type" : "protocol"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
type
| String
| 获取设备通讯协议固定传protocol
| protocol
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"clientId" : "1C6920F083C4",
"commandName" : "info-protocol",
"mac" : "2026bb1cc514",
"messageId" : "202201241610366046",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/KIduUf/mSEiZxMFxOLD/1C6920F083C4/subscribe",
"server" : "mqtt.smart-bird.cn",
"source" : "command",
"subcribe" : "/KIduUf/mSEiZxMFxOLD/1C6920F083C4/publish",
"username" : "mSEiZxMFxOLD"
}
"clientId" : "1C6920F083C4",
"commandName" : "info-protocol",
"mac" : "2026bb1cc514",
"messageId" : "202201241610366046",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/KIduUf/mSEiZxMFxOLD/1C6920F083C4/subscribe",
"server" : "mqtt.smart-bird.cn",
"source" : "command",
"subcribe" : "/KIduUf/mSEiZxMFxOLD/1C6920F083C4/publish",
"username" : "mSEiZxMFxOLD"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
clientId
| String
| 自定义MQTT客户端ID注意:不可重复
| 1C6920F083C4
|
|
commandName
| String
| 指令名称
| info-protocol
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb1cc514
|
|
messageId
| String
| 消息ID字段
| 202201241610366046
|
|
port
| String
| 端口号
| 1883
|
|
protocol
| String
| 工作模式,协议类型,MQTT协议固定传"mqtt"
| mqtt
|
|
publish
| String
| 自定义MQTT发布主题 注意:不可重复
| /KIduUf/mSEiZxMFxOLD/1C6920F083C4/subscribe
|
|
server
| String
| 自定义MQTT服务器地址
| mqtt.smart-bird.cn
|
|
source
| String
| 指令回复“command"
| command
|
|
subcribe
| String
| 自定义MQTT订阅主题注意:不可重复
| /KIduUf/mSEiZxMFxOLD/1C6920F083C4/publish
|
|
username
| String
| 自定义MQTT服务器用户名
| mSEiZxMFxOLD
|
---
### 自定义HTTP
*setting-http*
配置http回调地址,作为设备事件推送地址,注意不支持https,仅常供电支持
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"messageId" : "202201241610366046",
"protocol" : "http",
"type" : "custom",
"url" : "http://192.168.0.66:8080/api/iot/upload"
}
"messageId" : "202201241610366046",
"protocol" : "http",
"type" : "custom",
"url" : "http://192.168.0.66:8080/api/iot/upload"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 202201241610366046
|
|
protocol
| String
| 协议类型
| http
|
|
type
| String
| 设备自定义固定传"custom"
| custom
|
|
url
| String
| 自定义服务器地址
| http://192.168.0.66:8080/api/iot/upload
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"commandName" : "setting-http",
"mac" : "2026bb1cc514",
"messageId" : "20260520",
"protocol" : "http",
"source" : "command",
"url" : "http://192.168.0.66:8080/api/iot/upload"
}
"commandName" : "setting-http",
"mac" : "2026bb1cc514",
"messageId" : "20260520",
"protocol" : "http",
"source" : "command",
"url" : "http://192.168.0.66:8080/api/iot/upload"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| setting-http
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb1cc514
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
protocol
| String
| 协议类型
| http
|
|
source
| String
| 指令回复“command"
| command
|
|
url
| String
| 自定义服务器地址
| http://192.168.0.66:8080/api/iot/upload
|
---
### 设置温湿度补偿
*setting-humidity-compensate*
设置温度和湿度的补偿值,用于校准传感器采集数据的偏差。补偿公式:校准后数据=实际读取的数据+补偿偏移值
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"humidityOffset" : -2.5,
"tempOffset" : 0,
"type" : "setting"
}
"humidityOffset" : -2.5,
"tempOffset" : 0,
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
humidityOffset
| float
| 湿度补偿偏移值,单位:%RH,范围:-20~+20。
计算公式:校准后数据=实际读取的数据+humidityOffset
| -2.5
|
|
tempOffset
| float
| 温度补偿偏移值,单位:℃,取值范围:+20~-20;
计算公式:校准后数据=实际读取的数据+tempOffset
| 0
|
|
type
| String
| 设备设置固定值"setting"
| setting
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"commandName" : "",
"humidityOffset" : -2.5,
"mac" : "2026bb16aa14",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true,
"tempOffset" : 0
}
"commandName" : "",
"humidityOffset" : -2.5,
"mac" : "2026bb16aa14",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true,
"tempOffset" : 0
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| |
|
humidityOffset
| float
| 湿度补偿偏移值,单位:%RH,范围:-20~+20。
计算公式:校准后数据=实际读取的数据+humidityOffset
| -2.5
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb16aa14
|
|
message
| String
| 执行返回结果
| ok
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
source
| String
| 指令回复“command"
| command
|
|
success
| boolean
| 执行结果
| true
|
|
tempOffset
| float
| 温度补偿偏移值,单位:℃,取值范围:+20~-20;
计算公式:校准后数据=实际读取的数据+tempOffset
| 0
|
---
### 自定义MQTT
*setting-mqtt*
设备支持自定义 MQTT,注意:该配置重启后生效。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"clientId" : "custom",
"messageId" : "20260520",
"password" : "password",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/qos0",
"server" : "192.168.0.66",
"subcribe" : "/topic/qos1",
"type" : "custom",
"username" : "username"
}
"clientId" : "custom",
"messageId" : "20260520",
"password" : "password",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/qos0",
"server" : "192.168.0.66",
"subcribe" : "/topic/qos1",
"type" : "custom",
"username" : "username"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
clientId
| String
| 自定义MQTT客户端ID注意:不可重复
| custom
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
password
| String
| 密码
| password
|
|
port
| String
| 端口号
| 1883
|
|
protocol
| String
| 协议类型,MQTT协议固定传"mqtt"
| mqtt
|
|
publish
| String
| 自定义MQTT发布主题 注意:不可重复
| /topic/qos0
|
|
server
| String
| 自定义MQTT服务器地址
| 192.168.0.66
|
|
subcribe
| String
| 自定义订阅主题,注意:不可重复
| /topic/qos1
|
|
type
| String
| 设备自定义固定传"custom"
| custom
|
|
username
| String
| 自定义MQTT服务器用户名
| username
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"clientId" : "custom",
"commandName" : "setting-mqtt",
"mac" : "2026bb1cc514",
"messageId" : "20260520",
"password" : "password",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/qos0",
"server" : "192.168.0.66",
"source" : "command",
"subcribe" : "/topic/qos1",
"username" : "username"
}
"clientId" : "custom",
"commandName" : "setting-mqtt",
"mac" : "2026bb1cc514",
"messageId" : "20260520",
"password" : "password",
"port" : "1883",
"protocol" : "mqtt",
"publish" : "/topic/qos0",
"server" : "192.168.0.66",
"source" : "command",
"subcribe" : "/topic/qos1",
"username" : "username"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
clientId
| String
| 自定义MQTT客户端ID注意:不可重复
| custom
|
|
commandName
| String
| 指令名称
| setting-mqtt
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb1cc514
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
password
| String
| 密码
| password
|
|
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
|
---
### 自定义TCP
*setting-tcp*
备支持通过 MQTT 方式自定义 TCP 信息,注意:该配置重新后生效。
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"messageId" : "20260520",
"port" : "8080",
"protocol" : "tcp",
"server" : "192.168.0.66",
"type" : "custom"
}
"messageId" : "20260520",
"port" : "8080",
"protocol" : "tcp",
"server" : "192.168.0.66",
"type" : "custom"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
port
| String
| 端口号
| 8080
|
|
protocol
| String
| 协议类型
| tcp
|
|
server
| String
| 自定义服务器地址
| 192.168.0.66
|
|
type
| String
| 设备自定义固定传"custom"
| custom
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"commandName" : "setting-tcp",
"mac" : "2026bb1cc514",
"messageId" : "20260520",
"port" : "8080",
"protocol" : "tcp",
"server" : "192.168.0.66
",
"source" : "command"
}
"commandName" : "setting-tcp",
"mac" : "2026bb1cc514",
"messageId" : "20260520",
"port" : "8080",
"protocol" : "tcp",
"server" : "192.168.0.66
",
"source" : "command"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| setting-tcp
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb1cc514
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
port
| String
| 端口号
| 8080
|
|
protocol
| String
| 协议类型
| tcp
|
|
server
| String
| 自定义服务器地址
| 192.168.0.66
|
|
source
| String
| 指令回复“command"
| command
|
---
### 设置静态IP
*setting-wifi-dhcpEnable*
设备默认为动态获取ip,通过该接口开启静态IP,需重启生效<br/>配置的静态IP需和路由器处于同一网段下<br/>
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"dhcpEnable" : 1,
"dns" : "192.168.0.1",
"gateway" : "192.168.0.1",
"local_ip" : "192.168.0.118",
"messageId" : "20260520",
"subnet" : "255.255.255.0",
"type" : "setting"
}
"dhcpEnable" : 1,
"dns" : "192.168.0.1",
"gateway" : "192.168.0.1",
"local_ip" : "192.168.0.118",
"messageId" : "20260520",
"subnet" : "255.255.255.0",
"type" : "setting"
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
dhcpEnable
| int
| 自动寻址1:开启, 0:关闭,默认开启
| 1
|
|
dns
| String
| DNS服务器地址
| 192.168.0.1
|
|
gateway
| String
| 默认网关
| 192.168.0.1
|
|
local_ip
| String
| IP地址
| 192.168.0.118
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
subnet
| String
| 子网掩码
| 255.255.255.0
|
|
type
| String
| 设备设置固定值"setting"
| setting
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"commandName" : "setting-wifi-dhcpEnable",
"mac" : "2026bb16aa14",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
"commandName" : "setting-wifi-dhcpEnable",
"mac" : "2026bb16aa14",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| setting-wifi-dhcpEnable
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb16aa14
|
|
message
| String
| 执行返回结果
| ok
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
source
| String
| 指令回复“command"
| command
|
|
success
| boolean
| 执行结果
| true
|
---
### 设置配网按键锁
*setting-wifi-lock*
wifi配网锁定后,设备无法通过长按配网按钮进入配网操作。<br/>
**向设备发送指令(服务端向设备订阅topic发送消息)**
```json
{
"messageId" : "20260520",
"type" : "setting",
"wifiLock" : 0
}
"messageId" : "20260520",
"type" : "setting",
"wifiLock" : 0
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
type
| String
| 设备设置固定值"setting"
| setting
|
|
wifiLock
| int
| 配网锁,0:关闭,1:开启
| 0
|
---
**设备返回信息(设备向服务端订阅topic上报消息)**
```json
{
"commandName" : "setting-wifi-lock",
"mac" : "2026bb16aa14",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true,
"wifiLock" : 0
}
"commandName" : "setting-wifi-lock",
"mac" : "2026bb16aa14",
"message" : "ok",
"messageId" : "20260520",
"source" : "command",
"success" : true,
"wifiLock" : 0
}
```
#### 字段属性
---
| 字段名称 | 字段类型 | 字段说明 | 示例值 |
|------|------|------|------|
|
commandName
| String
| 指令名称
| setting-wifi-lock
|
|
mac
| String
| wifi设备MAC地址或4G设备的IMEI号,唯一标识
| 2026bb16aa14
|
|
message
| String
| 执行返回结果
| ok
|
|
messageId
| String
| 业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
| 20260520
|
|
source
| String
| 指令回复“command"
| command
|
|
success
| boolean
| 执行结果
| true
|
|
wifiLock
| int
| 配网锁,0:关闭,1:开启
| 0
|
---





