获取 MQTT 连接信息 (hapi)
POST https://hotel.chintiot.com/hotel/device/get_gateway_mqtt_info_sn
Content-Type: application/json
{ "sn": "网关SN", "ts": 1693700000 }响应:
json
{
"code": 0,
"data": {
"sn": "867975051726136",
"module_code": "6zcrzknc",
"mq_id": "e95d207c83bd8d73",
"mq_pass": "xxxxxxxx",
"api_version": 2,
"server_id": 1
}
}字段说明:
| 字段 | 说明 |
|---|---|
sn | 网关硬件序列号 |
module_code | 模块编码(旧版网关 MQTT 主题前缀) |
mq_id | MQTT 用户名(license_tb.mq_id) |
mq_pass | MQTT 密码(license_tb.mq_pass) |
api_version | API 版本(>1 时主题前缀用 mqtt{server_id}) |
server_id | EMQX 节点 ID |
