微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI Zigbee设计交流 > ZHA二键情景遥控器如何实现灯全开、灯全关?

ZHA二键情景遥控器如何实现灯全开、灯全关?

时间:10-02 整理:3721RD 点击:

Hi,大神们,请教一下情景遥控器的实现。

我现在有一个2键的遥控器想做成情景控制,一个键控制灯全开,另一个键控制灯全关。灯已经是HA的灯,用Z-stack Linux gateway测试过,可以实现全开全关。

我应该在SampleSwicth例程中添加什么代码?

谢谢。

If you want to control device that are already commissioned by the gateway device, you must:

1.a.- Know the GroupID of these lights. If you do not know it, you can send a zclGeneral_SendGroupGetMembershipRequest with GroupCount=0 (ZCL 3.6.2.3.4) to get the groups that these lights have.

1.b.- Switch device must have in each button a zclGeneral_SendSceneRecall with the 2 different scenes (SCENE1 and SCENE2), you need to set the message as indirect and the short address set to the Group ID from 'a'.

明白,谢谢。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top