本文档旨在演示开关通过matter协议来做到对灯亮灭的控制。视频不涉及前期环境的搭建。
环境搭建及使用命令参考:https://github.com/project-chip/connectedhomeip/tree/master/ex
amples/all-clusters-app/esp32
学习资料:https://zhuanlan.zhihu.com/p/459731857
source ./scripts/activate.sh 激活软件包
./out/debug/chip-tool pairing ble-wifi 12344321 WT 0987654321 20202021 3840 开关配网
./out/debug/chip-tool pairing ble-wifi 12344322 WT 0987654321 20202021 3840 灯配网
./out/debug/chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege":
5, "authMode": 2, "subjects": [ 112233, 12344321 ], "targets": null}]' 12344322 0 设置灯acl
./out/debug/chip-tool binding write binding '[{"fabricIndex": 1, "node":12344322, "endpoint":1, "cluster":6}]' 12344321 1 开关绑定灯
matter esp driver send_bind 0x0001 0x0006 0x0000 控制灯灭
matter esp driver send_bind 0x0001 0x0006 0x0001 控制灯亮
matter device factoryreset 重置设备
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。