Other Parts Discussed in Thread: Z-STACK
Hi,大神们,请教一下情景遥控器的实现。
我现在有一个2键的遥控器想做成情景控制,一个键控制灯全开,另一个键控制灯全关。灯已经是HA的灯,用Z-stack Linux gateway测试过,可以实现全开全关。
我应该在SampleSwicth例程中添加什么代码??
谢谢。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
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'.