使用 CC2531 将 Zigbee 指令写入 Aqara/小米墙壁开关以打开/关闭

问题描述

问题:

如何确定使用 Zigbee 发送的规范或指令有效载荷以控制 Aqara D1 wall switch

上下文:

我一直在构建一个轻量级的 homebridge 插件,让我可以轻松控制我的新家庭自动化墙壁开关。我这样做是因为现有插件已损坏、不受支持(即不再工作)并且很难修复。

我一直在 this repo on Github 中构建我的插件并完成了项目的所有部分,除了我需要通过 Zigbee 向交换机发送开/关指令的部分。

我尝试过对现有库 (zigbee-nt) 进行逆向工程,但发现它太难/太复杂而无法得到这个答案。

这是我需要弄清楚的代码片段:

// https://github.com/Koenkk/zigbee-herdsman/blob/master/src/controller/model/device.ts#L53
const device = this.platform.zigbeeController.controller.getDeviceByIeeeAddr(this.accessory.context.device.ieeeAddr);

const endpoint = device.endpoints[0];

// Todo: this part needs to be figured out
const clusterKey = '????';
const payload = { ... ???? ...};
await endpoint.write(clusterKey,payload); // This supposing writes to the network

关于如何进行调试/逆向工程/解决这个问题的任何想法?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)