From 60b10a865bf03700af477cd2e07c2529445bfc39 Mon Sep 17 00:00:00 2001 From: guoqiancheng Date: Thu, 20 Nov 2025 21:30:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 67666c2..880c42f 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ facility | string | 是 | 设施点位编码(固定2位) | "type": "1", "facility": "2", "address": "房间东侧", - "value": [ { "temp": "25.3", "humidity": "12.5" } ] + "value": { "temp": "25.3", "humidity": "12.5" } }, { "deviceuuid": "deviceuuid2", @@ -135,7 +135,29 @@ type | 传感器类型 | value 类型 | 示例值 } } } + ``` +# 3.3 首次执行采集任务之后上报状态 +```json +{ + "method": "metric_data", + "params": { + "metric": { + "args": { + "description": "Environmental detection system started successfully", + "timestamp": "1763644447", + "host_uuid": "pemsyszrkpntfgswaevodhluicqzxplkm", + "level": "system_start", + "device_count": 3, + "online_count": 3 + }, + "type": "event" + }, + "route_key": "/dthjjc/device/pemsyszrkpntfgswaevodhluicqzxplkm/event" + } +} +``` + event_data 通用字段说明 字段名 | 类型 | 必填 | 说明 ----------------------|--------|------|------------------------------------------- @@ -147,6 +169,8 @@ level | string | 是 | alarm / online 等 last_successful_time | string | 否 | 仅离线时填写 sensor_type | string | 否 | 传感器类型描述 recommendation | string | 否 | 处理建议 +device_count | string | 否 | 检测设备数量 +online_count | string | 否 | 当前在线数量 ### 4. 协议总览