I use deCONZ with a variety of brands, mostly Xiaomi.
There’s something I’ve been using which works fine for some switches but not for the others, even though they are exacly the same (QBKG11LM).
I have 2 switches configured decoupled (Xiaomi disconnect 1 set to 0xfe), one of them work well (first one is a switch on, second is a switch off):
2019-11-05 17:29:00 DEBUG (MainThread) [pydeconz.websocket] Websocket data: {"e":"changed","id":"59","r":"sensors","state":{"buttonevent":1002,"lastupdated":"2019-11-05T17:29:00"},"t":"event","uniqueid":"00:15:8d:00:03:11:ac:c1-05-0012"}
2019-11-05 17:29:00 DEBUG (MainThread) [pydeconz.utils] Sending {'data': '{"on": true}'} to http://192.168.2.165:8091/api/B942B00E68/lights/13/state
2019-11-05 17:29:00 DEBUG (MainThread) [pydeconz.utils] HTTP request response: [{'success': {'/lights/13/state/on': True}}]
2019-11-05 17:29:00 DEBUG (MainThread) [pydeconz.websocket] Websocket data: {"e":"changed","id":"13","r":"lights","state":{"alert":null,"bri":254,"colormode":"ct","ct":370,"on":true,"reachable":true},"t":"event","uniqueid":"00:15:8d:00:01:ca:f8:c7-01"}
2019-11-05 17:29:01 DEBUG (MainThread) [pydeconz.websocket] Websocket data: {"e":"changed","id":"60","r":"sensors","state":{"lastupdated":"2019-11-05T17:29:01","power":9},"t":"event","uniqueid":"00:15:8d:00:03:11:ac:c1-02-000c"}
2019-11-05 17:29:03 DEBUG (MainThread) [pydeconz.websocket] Websocket data: {"e":"changed","id":"59","r":"sensors","state":{"buttonevent":1002,"lastupdated":"2019-11-05T17:29:03"},"t":"event","uniqueid":"00:15:8d:00:03:11:ac:c1-05-0012"}
2019-11-05 17:29:03 DEBUG (MainThread) [pydeconz.utils] Sending {'data': '{"on": false}'} to http://192.168.2.165:8091/api/B942B00E68/lights/13/state
2019-11-05 17:29:03 DEBUG (MainThread) [pydeconz.utils] HTTP request response: [{'success': {'/lights/13/state/on': False}}]
2019-11-05 17:29:03 DEBUG (MainThread) [pydeconz.websocket] Websocket data: {"e":"changed","id":"13","r":"lights","state":{"alert":null,"bri":254,"colormode":"ct","ct":370,"on":false,"reachable":true},"t":"event","uniqueid":"00:15:8d:00:01:ca:f8:c7-01"}
On the other switch, if I switch it on or off, I see the following:
2019-11-05 17:28:57 DEBUG (MainThread) [pydeconz.websocket] Websocket data: {"e":"changed","id":"66","r":"sensors","state":{"buttonevent":1002,"lastupdated":"2019-11-05T17:28:57"},"t":"event","uniqueid":"00:15:8d:00:02:e2:7e:48-05-0012"}
I am struggling to find why the other switch doesn’t do anything apart from the first pydeconz.websocket.
Am I being thick and missing something ridiculous here or there’s something else going on?
Many thanks!
Edit: I was being thick After months, I stopped today again to have a good look at it and I just had to disconnect it from the relay and use a deconz_event (as any other switch) to track the clicks and it’s now working as expected.