homeassistant_zigate icon indicating copy to clipboard operation
homeassistant_zigate copied to clipboard

Aqara Smart Light Control

Open RiRomain opened this issue 7 years ago • 7 comments

To help development, here are the log from the Aqara Smart Light Control (wall switch)

The log are watch is received when I press the key. My switch are the one with the integrated relay, so when I press the button, the light are also turned ON or OFF.

Turn left switch OFF Turn left switch ON Turn right switch Off.txt Turn right switch On.txt

RiRomain avatar Jan 12 '18 08:01 RiRomain

That wall switch has lots of endpoints. All my devices only have 1. This is interesting. It seems that both buttons have two endpoints: one providing button state and other to tell that button is pressed.

Could you provide more data? I copied address from logs, so if commands are not working make sure device still has same address.

z.send_data('0042', '3BCF') Node Descriptor (lots of device info) z.send_data('0043', '3BCF01') Cluster List from endpoint 01 (Common) z.send_data('0043', '3BCF02') Cluster List from endpoint 02 (Left button: State) z.send_data('0043', '3BCF03') Cluster List from endpoint 03 (Right button: State) z.send_data('0043', '3BCF04') Cluster List from endpoint 04 (Left button: Press) z.send_data('0043', '3BCF05') Cluster List from endpoint 05 (Right button: Press) z.send_data('0044', '3BCF') Power info z.send_data('0045', '3BCF') Endpoint listing

ISO-B avatar Jan 12 '18 09:01 ISO-B

Does these commands do same as pressing left button? With these you should be able to set state to desired. Left button on: z.send_data('0092', '023BCF010201') Left button off: z.send_data('0092', '023BCF010200')

Try this if command above didn't do the trick. Running both of these should simulate button press. Left button pressed down: z.send_data('0092', '023BCF010400') Left button released: z.send_data('0092', '023BCF010401')

ISO-B avatar Jan 12 '18 11:01 ISO-B

Yes, working perfectly with the first command, here are the log of the left switch being turned on and turned off:

Turn_Off_Left_Light.txt Turn_On_Left_Light.txt

RiRomain avatar Jan 12 '18 12:01 RiRomain

Only thing that I am not sure about is attribute id f000 in cluster 0006 in endpoints 02 and 03. It might tell if switch happened by using button or from network. When attribute data is 03030303 it was triggered by button and 07070707 it is triggered by network. Should be easy to confirm by switching it couple times with hand and command and see if attribute id is consistently same.

ISO-B avatar Jan 12 '18 12:01 ISO-B

I tested your theory several time and I can confirm that it is correct.

03030303 when the button is used. 07070707 when ZigBee is used

RiRomain avatar Jan 12 '18 13:01 RiRomain

Is there someone to give me a hint how to replicate the state value in home assistant when I manually turn ON / OFF the switch ? First I do not have the same endpoint as RiRomain, on my double key wall switch with fireline to turn on / off lights from HA I use endpoint 01 and 02. I attach logs turning ON / OFF the light using both methods: HA and the switch. turn_on_ha.log turn_off_ha.log turn_on_wall.log turn_off_wall.log

My config is

switch:
  - platform: zigate
    name: 'Cuisine central'
    address: "84c301"
  - platform: zigate
    name: 'Cuisine table'
    address: "84c302" 

biau avatar May 10 '18 16:05 biau