ebaauw / homebridge-hue

Homebridge plugin for Philips Hue
Apache License 2.0
901 stars 91 forks source link

WXKG01LM not registering presses #1045

Closed ispiropoulos closed 2 years ago

ispiropoulos commented 2 years ago

Issue

I paired a Xiaomi Mi Wireless Switch (WXKG01LM) using deConz with a Conbee II stick. Although the switch is paired successfully and it does appear on the Homebridge accessories list and on the Home app, it does not register button presses. No single press, no double press no long press. I press the switch and nothing comes in the logs, and of course no automation set on the Home app is triggered either.

I had been using this particular switch again using deConz with Home Assistant, and I restored a Phoscon backup I had taken before I made the switch to Homebridge.

All the other sensors (door/window, motion, h & t) work properly and are available successfully on the Home App.

Things I have tried:

PS: As you’ll see the switch is initialised (named “Xiaomi Switch” on the very bottom of the logs)

Log Messages

[09/11/2021, 21:16:14] [Hue] Phoscon-GW: 14 accessories
[09/11/2021, 21:16:15] [Hue] masked debug info dumped to /var/lib/homebridge/homebridge-hue.json.gz
[09/11/2021, 21:16:15] Initializing platform accessory 'Phoscon-GW'...
[09/11/2021, 21:16:15] [Hue] Phoscon-GW: 2 services
[09/11/2021, 21:16:15] Initializing platform accessory 'Living Room HT'...
[09/11/2021, 21:16:15] Initializing platform accessory 'Kitchen Window'...
[09/11/2021, 21:16:15] Initializing platform accessory 'Living Room Balcony HT'...
[09/11/2021, 21:16:15] Initializing platform accessory 'Living Room Motion'...
[09/11/2021, 21:16:15] Initializing platform accessory 'Kid Bedroom HT'...
[09/11/2021, 21:16:15] Initializing platform accessory 'Kid Bedroom Balcony Door'...
[09/11/2021, 21:16:15] Initializing platform accessory 'Guest Bedroom Balcony Door'...
[09/11/2021, 21:16:15] Initializing platform accessory 'Master Bedroom Balcony Door'...
[09/11/2021, 21:16:15] Initializing platform accessory 'Master Bedroom HT'...
[09/11/2021, 21:16:15] Initializing platform accessory 'Entrance Door'...
[09/11/2021, 21:16:15] Initializing platform accessory 'Living Room Balcony'...
[09/11/2021, 21:16:15] Initializing platform accessory 'Kitchen Balcony Door'...
[09/11/2021, 21:16:15] Initializing platform accessory 'Xiaomi Switch'...
Preparing Advertiser for 'Homebridge 456A 279A' using bonjour-hap backend!

Debug Files

homebridge-hue.json.gz

homebridge.log

ebaauw commented 2 years ago

The dump file shows the last button event for the switch was a double click at 2021-11-09T17:52:02.159 (UTC); the dump file was created on 2021-11-09T20:34:31 UTC. So deCONZ hasn't registered a button event for over 2.5 hours. I think this is between the switch and deCONZ, not related to Homebridge Hue.

You have 22 end devices in your Zigbee network, and no routers (besides the coordinator). I think you might be hitting the maximum number of end devices that can be connected directly to the ConBee II. Adding one or two Zigbee routers (lights, plugs, or other mains-powered devices) would help you out here. You might need to re-pair some of the devices, as Xioami tends to stick to its parent once it has joined the network.

ispiropoulos commented 2 years ago

The dump file shows the last button event for the switch was a double click at 2021-11-09T17:52:02.159 (UTC); the dump file was created on 2021-11-09T20:34:31 UTC. So deCONZ hasn't registered a button event for over 2.5 hours. I think this is between the switch and deCONZ, not related to Homebridge Hue.

You have 22 end devices in your Zigbee network, and no routers (besides the coordinator). I think you might be hitting the maximum number of end devices that can be connected directly to the ConBee II. Adding one or two Zigbee routers (lights, plugs, or other mains-powered devices) would help you out here. You might need to re-pair some of the devices, as Xioami tends to stick to its parent once it has joined the network.

Thanks @ebaauw . I understand your point and I was planning to get a couple of plugs to mainly give the Zigbee mesh some oxygen, but I’ve been working with exactly the same setup using deConz with home assistant and never had such issues.

I am wondering wether something is wrong in my homebridge-hue configuration:

{
   "name":"Hue",
   "anyOn":true,
   "resource":true,
   "platform":"Hue",
   "users":{
      "00212EFFFF0427A4":"235159C37F"
   },
   "excludeSensorTypes":[
      "Daylight"
   ],
   "sensors":true
}

by the way @ebaauw you have my respect for the amount of effort you’ve put into implementing, maintaining this plugin as well as supporting users. As a software engineer I deeply appreciate it.

ebaauw commented 2 years ago

understand your point and I was planning to get a couple of plugs to mainly give the Zigbee mesh some oxygen, but I’ve been working with exactly the same setup using deConz with home assistant and never had such issues.

Could also be the battery in the switch. Don't believe what deCONZ reports, anything under 100% could indicate an issue. I prefer to use IKEA PLATTBOJ since I'm Dutch and they're damn cheap (EUR 1.29 for eight). They do drop voltage below 80% (on my battery meter), so I replace them as soon as my devices start acting up. Otherwise my Xiaomi Aqara sensors are very reliable.

I am wondering wether something is wrong in my homebridge-hue configuration:

No, that's looking fine.

you have my respect for the amount of effort you’ve put into implementing, maintaining this plugin as well as supporting users. As a software engineer I deeply appreciate it

Thanks!

ispiropoulos commented 2 years ago

understand your point and I was planning to get a couple of plugs to mainly give the Zigbee mesh some oxygen, but I’ve been working with exactly the same setup using deConz with home assistant and never had such issues.

Could also be the battery in the switch. Don't believe what deCONZ reports, anything under 100% could indicate an issue. I prefer to use IKEA PLATTBOJ since I'm Dutch and they're damn cheap (EUR 1.29 for eight). They do drop voltage below 80% (on my battery meter), so I replace them as soon as my devices start acting up. Otherwise my Xiaomi Aqara sensors are very reliable.

I am wondering wether something is wrong in my homebridge-hue configuration:

No, that's looking fine.

you have my respect for the amount of effort you’ve put into implementing, maintaining this plugin as well as supporting users. As a software engineer I deeply appreciate it

Thanks!

Thank you for your recommendations.

Truth is I also tried new batteries on both switches. Could other sensors with low battery cause malfunctions to this switch accessory?

ebaauw commented 2 years ago

No, they couldn’t.

ispiropoulos commented 2 years ago

Thank you @ebaauw Closing this as it is clearly not a homebridge-hue issue