M5-T10: add paho MQTT client with lifespan connect/reconnect and mqtt/test endpoint
This commit is contained in:
@@ -416,7 +416,7 @@ Phase C(MQTT / Discovery,依赖 B 的设备数据与 provider 接口)
|
||||
- **Reviewer checklist**: `key` 稳定(用设备 `uuid` + 量 key,不用自增 id,避免重建漂移);component 支持多类型;目录由 provider 计算、元数据源自 profile 而非写死。
|
||||
|
||||
### M5-T10 — MQTT 客户端(paho,lifespan 连接 + 重连)
|
||||
- **Status**: `todo` · **Depends**: M5-T08
|
||||
- **Status**: `done` · **Depends**: M5-T08
|
||||
- **Context**: 长连接 MQTT 客户端,配置变更可重连;含连接测试端点。
|
||||
- **Files**: `create app/integrations/mqtt.py`;`modify app/main.py`(lifespan 起/停)、`app/api/routes/api/config.py`(`POST /api/config/mqtt/test`);`modify requirements.in`/`requirements.txt`(加 `paho-mqtt` 重新锁定);`create tests/test_mqtt_client.py`
|
||||
- **Steps**:
|
||||
|
||||
Reference in New Issue
Block a user