Smanar / Domoticz-deCONZ

deCONZ plugin for Domoticz (Zigbee application)
GNU General Public License v3.0
36 stars 26 forks source link

WXKG11LM doesn't trigger event on B1, B3, B4,B5 #43

Closed deennoo closed 4 years ago

deennoo commented 4 years ago

WXKG11LM is a square Xiaomi Switch without gyro.

Well reconize on deconz and Domoticz, he trigger B1, B3, B4,B5, and Off

Probleme is on running event :

commandArray = {}

if devicechanged['Inter Dressing']=='B1' then
switch('Dressing Parents') (switch a shortcut used with "modules" who is a variante of dzevent)

end

B1, B3, B4,B5 doesn't trigger then event, only Off do the job

Smanar commented 4 years ago

Can you make a try with this LUA script pls, and looking logs

commandArray = {}

if (devicechanged['Inter Dressing']) then
    print("Switch")
    local b = devicechanged['Inter Dressing']
    print(b)
    if b == 'B1' then
        print("ok")
    end
end

return commandArray

I can't understand why it works on domoticz but not on event, and your code is good for me.

Smanar commented 4 years ago

@deennoo do you have solved your problem ?

deennoo commented 4 years ago

@deennoo do you have solved your problem ?

still not, sorry to be long

here is the result :

2020-02-15 18:25:50.550 (PiZigate Wifi) UpdateGroup - (Dressing Parents) 0:65 2020-02-15 18:25:50.521 Status: LUA: Switch 2020-02-15 18:25:50.521 Status: LUA: Off 2020-02-15 18:25:50.532 Status: User: Admin initiated a switch command (17148/Dressing Parents/Toggle)

Smanar commented 4 years ago

@deennoo wrong github ^^ Here it's for deconz not zigate, or you are using both for tests ?

If you are using deconz, can you show me the websocket return, when you press the button ("debug info only" will be enought as log level) ?

deennoo commented 4 years ago

;-) i have and use both !

Switch on Deconz et bulb group on zigate.

Smanar commented 4 years ago

OK, so there is a problem. Can you show me the websocket return when you press the switch ("debug info only" will be be enought as debug)

BTW, I remember a thing, when you press the button, you have an event Bx, but 3/4s after the pluguin set the device to off itself.