Skip to content

获取 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_idMQTT 用户名(license_tb.mq_id
mq_passMQTT 密码(license_tb.mq_pass
api_versionAPI 版本(>1 时主题前缀用 mqtt{server_id}
server_idEMQX 节点 ID