Files
qipai/docs/devlogs/2026-06-24-M06-E-智慧插座.md

28 lines
1.4 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.
# M06-E 智慧插座
- 日期:2026-06-24
- 起始 commit`4863860`
- 工程 commit`9144fa8`
- ENGINEERING_DELTA=YES
- 子阶段状态:PARTIAL/BLOCKED_EXTERNALMock 与后端控制闭环完成,缺插座实物
## 工程增量
- 新增智慧插座业务控制服务:`basicInfo/workInfo` 查询、`on/off` 开关、本地任务 `localtask``clearTask`
- 新增后台 API`/admin-api/device-control/socket/read``/socket/switch``/socket/task``/socket/task/clear`
- 插座命令复用设备命令状态机,先落库再发布 MQTT;返回 `PUBLISHED` 不伪造成设备执行成功。
- 插座控制复用租户、门店、房间和 `device.write` 范围校验;离线设备拒绝下发。
- 上行 `workInfo/special` 类事件可识别过载、过温、过流、过压/欠压、功率和温度阈值,并写入设备告警。
## 验证
- Windows `npm run build`:退出码 0。
- Windows `node tests/iot-protocol.test.mjs`:退出码 0。
- Windows `node tests/device-control.test.mjs`:退出码 0。
- Windows `npm test`:退出码 0,M01-A 至 M06-E 全量后端回归通过。
- 工程 commit 已 push`HEAD == origin/main == 9144fa8`
## 外部阻塞与后续
缺 4G 智慧插座实物、DeviceID、生产 MQTT 账号/ACL 和现场负载,真实计量与保护断电仍保留 `BLOCKED_EXTERNAL`。游标进入 M06-F 订单自动联动。