iot/docs/zhongdian_mqtt.md
2024-06-22 10:56:53 +08:00

61 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 中电mqtt通讯规约
## 服务器地址
MQTT服务器IP172.30.6.161
MQTT服务器端口1883
MQTT服务器账号admin
MQTT服务器密码public
## topic
南向:
MQTT ClientID: CET/NX
发布Topic:CET/NX/upload
订阅Topic:CET/NX/downlod
中电:
MQTT ClientID:CET/NX
订阅Topic:CET/NX/upload
发布Topic:CET/NX/download
## 数据格式
```text
{
"version": "1.0",
"location_code": "string",
// 日期: 2024-06-20, <<新增字段>>
"dynamic_location_code": "string",
"ts ": 1688606685,
"properties": [
{
"type": "AI",
"key": "A相电流",
"value": 0.25,
"unit": "A",
"timestamp": 1688354258
},
{
"type": "AI",
"key": "A相电压",
"value": 220.5,
"unit": "V",
"timestamp": 1688354258
},
{
"type": "SOE",
"key": "电压越限",
"value": 1,
"unit": "V",
"timestamp": 1688354258
}
]
}
南向上送数据
CET应答
{
"location_code": string, //(点位编码信息),
"ts ":1688606685 ,
"result":1(int)
}
```