-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xiaomi switch WXKG01LM pulsation detection failure #3445
Comments
Ok, thanks. I check this in the next hours and if it is the problem i will close the issue. Thanks very much. Best regards |
Dear @Koenkk , I have added in the configuration.yaml file
If the command is correctly added heare doesn't works. the problem persist. Some minuts i am upgraded to 1.13 version, i will test the problem in the new version. i will inform you. Best regards |
Hello dear @Koenkk, I have confirmed now again that adding the line you mentioned in configuration.yalml the problem persists. I try to make a long press and the long and short press occurs, I try to make 3 clicks and it produces a single click + double press, the problem persists. Any solution? I already told you that all the buttons until update 1.11 have always worked well for me, I think I started to notice the problem in update 1.12, but since I use betas versions I cannot assure you that dev branch started giving problems, in a raspberry pi 4 only with domoticz working, the system should not be overloaded. Thanks in advance. a cordial greeting |
With |
Thanks for your answer @Koenkk , But the problem is not only in the long click or single click. Thank you very much. |
Detection of double/triple clicks is done by the button itself so I dont think downgrading will fix anything. |
Hi dear friend @Koenkk , Hello, I understand that the detection is done by the switch itself but since I installed zigbee2mqtt more than a year ago in my 3 switches, the clicks and the detection have never failed, there must be some other problem. I should not press 3 clicks and other actions occur such as the blinds being lowered or a message being heard through the speakers at night or lights are turned on. It is dangerous. each press should do its job as always, I do not know what has changed in the last month. Thank you very much in advance |
After testing the problem for two days, it seems that adding the 2 lines that @Koenkk has commented, the problem has not occurred again only once, it seems that it has improved a lot. thank you |
Dear friend @Koenkk, I apologize for bothering with the same thing but my xiaomi switches do not work well. I have been using them for a year and I have never had any problem, now for example I cannot deactivate the alarm with 3 presses. After making the 3 clicks zigbe2mqtt has detected the following:
I have been turning the alarm on and off for a year and have never had these problems. I don't know what is happening but something happens. As you said I added the line to configuration.yaml but I don't get improvements.-
Every day the problem occurs, i can not use this switches, alarms fails, message in the speakers fails, Blinds go up when they shouldn't, lamp on/off fails. A disaster but if I restart the zigbe2mqtt service it works fine, works perfectly for for a time . please ,see all the log:
all detected clicks correspond to the number of pulses emitted, none has failed. and they are fast pulsations in less than a second Can you investigate please? seems something no works correctly in zigbe2mqtt service. thanks in advance. Best regards |
I think this is a network issue.
|
Dear @Koenkk, I have an big antenna in the cordinator, anyway, I have several xiaomi samrt plug distributed around tmy home that are signal repeaters. In the zigbee2mqtt device map I have an excellent signal in my 4 xiaomi switches., In my network I have a whole of 28 zigbee devices. It is not a signal problem, as I have already told you if I restart the zigbe2mqtt service using "systemctl restart zigbee2mqtt" my devices work perfectly for a few hours. a cordial greeting and thanks again |
|
But let's see, why do you say it is a problem with the device? I have 4 devices and all 4 fail. Did all 4 break down? And what do you tell me about restarting the zigbe2mqtt service to solve the problem |
That would indicate that the problem is in the adapter (restarting zigbee2mqtt restarts the adapter). If the adapter is not strong enough to keep up with all the messages problems like this can arise. Upgrading to a more powerful adapter would make sure this is not the problem (https://www.zigbee2mqtt.io/information/supported_adapters.html#texas-instruments-cc26x2r1) |
Hello dear @Koenkk , I will buy a CC26X2R1. Does it currently work as well as the cc2531 or is it having problems? the xiaomi smart plugs continue working as repeaters with the new coordinator? |
Yes it will work much better. Keep an eye on the stock of https://www.tindie.com/products/electrolama/zzh-cc2652r-multiprotocol-rf-stick/ it's the best option atm. |
But cc26x2r1 and cc2652r are differents or are the same? Is the cc2652r another model? What is the difference? cc2652r is like to cc2531 |
Its the same |
Ok. I will buy you adapter. But now is sold out. Do i need a debugger for windows? The debugger is an purchase option but i don't found the link. Thanks. |
You don't need the debugger (can be flashed without) |
Nice device. I will test. Thanks koenkk. Best regards |
A last question , the zzh cc2652r works correctly with domoticz? |
If using it via zigbee2mqtt, there is no difference of using CC2531 or CC2652R |
Hello dear @Koenkk, sorry for continuing to insist on the same problem, but I am quite angry, the neighbors have called my attention for trusting zigbe2mqtt. Yesterday at 4 am when trying to turn off (1 click) the light with a short press, a script was fired (quadruple click) that opened all the blinds at home and the news was set at a quite high volume in all speakers of my home. Does everyone with these switches have this problem? or is it just me? can someone comment something else? I understand that the easiest solution is to comment that it is necessary to expand my cc2531 to a zzh cc2652 . I have always had 28 zigbee devices and they have all worked properly for a year, my four WXKG01LM has always worked well since zigbee's inception, something has happened, and it may be due to a dev version update (that was when I start having the problem). As I have already mentioned in the lastt updates I only use a 4gb raspberry 4 with domoticz. My system is not saturated I only use it for domoticz, I think it has a lot of power to do this function. It has always been commented in zigbe2mqtt.io and the github forum that the cc2531 supported many devices using repeaters, many more than 28. with all my respect i think you have not paid much attention to this problem and i do not know the reason why you are not investigating what the problem is. You have not requested to sniff. I do not understand why it is based on the devices problem or cc2531 problem . The truth is that I notice that the cc2531 is not very powerful , but to use a xiaomi switch it should work without problems as it has worked the last year. I will not buy the new zzh 2652 because in the future the same will happen again if you do not give me support now for my problem (I do not understand why), If I buy the new zzh it will be because I want to improve my system but not because a switch fails, it is not logical, have always worked well I will continue investigating what happens. burn the firmware again and I will start from 0 and I will return to old versions of dev brach, if I find out something I will comment it here. Could you check the latest dev branch to see if there have been any changes? thanks for your help. Best regards |
We could indeed do a final check to make sure where the issue comes from. If you could provide the debug logging at the moment the issue happens I can check this. Also please annotate the amount of clicks you would expect. To enable debug logging set in advanced:
log_level: debug |
Hi guys, I just took my button WXKG01LM from xiaomi gate and paired it to the zigbee2mqtt to do some test. Started with fresh battery in the switch and coming in the range of coordinator. Yep, it acts crazy. All those are supposed to be 'click':
|
Some of my switches starting acting like @nug321 just today. I believe that this started to happen since I have switched the firmware from Here are logs when pressing the 'bad' switch:
|
@ArkadiuszNiemiec great! Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html) |
Dear @Koenkk , This fix works also for the cc2531? I wait news from you. Thanks |
@kitopopo yes, fix is available in the dev branch now. |
Ok @Koenkk . I will update at the new dev branch this night. As I told you more than 1 month ago there was a problem between the buttons and zigbee2mqtt. thank you very much for solving it. Best regards. |
Dear @Koenkk , I am sorry to tell you this but the problem persists, zigbee2mqtt continues to detect double clicks if I make single clicks, I am already tired of the blinds being pulled up late at night, I think that if you do not solve the problem my next device will not be zzh cc2652r. I'm going to try ConBee II, I find it horrible that a button fails for so long with a raspberry pi 4 and an ssd. Thank you for your collaboration during all this time. You have been very kind |
If you get double click instead of single click then it's a problem with button itself. Xiaomi switches reports presses down, up, double, triple, quadruple and many click, if it reports a wrong number of click than its not a CC2531 or z2m problem. The issue that was solved here was that the button was reporting multiple clicks instead of just one. Edit: this should not happen now: #3445 (comment) I have 6 switches around the house and none is reporting wrong number of clicks (not counting when my finger slips). And I have used them with ConBee, cc2531 and zzh, no difference. |
Hello, thanks for your answer, I have 4 xiaomi switch buttons and all 4 fail with the same problem, it cannot be a button problem. There has come a time when not a single pulse worked. I have been more than 1 year with zigbe2mqtt and these buttons and they have never failed until I opened this issue approximately. I will not insist any more, thank you. Some time ago, restarting the zigbe2mqtt service solved the problem for a few hours, now it has gotten worse. Best regards. |
@kitopopo these switches are terrible, I had a problem with one today, it was not responding for a minute and then it sent multiple long, triple and single messages (I was just single clicking it). I will never buy xiaomi switches again, next buy is Konke switch: https://www.zigbee2mqtt.io/devices/2AJZ4KPKEY.html |
Dear friend, Thanks for the suggestion. But during 1 year aproximately my xiaomi switches have worked correctly. Maybe an wrong update of dev branch , i don't know the reasson exactly but they worked correctly during a year. If my switches don't have worked correctly during so long i would understand a hardware switch problem Best Regards |
These damned switches... I had the problem that switch reported the click up before click down. Again. I was able to log it:
It would only break one click but the logic is that @Koenkk I believe that to solve this issue we have to ignore the |
A timeout should be fine I think, so if no click up is received (e.g.) 5 seconds after the click down is received publish it. Can you make a PR? |
@Koenkk This should be it: Koenkk/zigbee-herdsman-converters#1418 |
Good evening mr @Koenkk , @ArkadiuszNiemiec , First of all I would like to apologize for believing that the xiaomi switch WXKG01LM pulsation failure was due to a dev branch update. I also take this opportunity to comment that my next device when the store has stock in stock will be the zzh 2652r and not the conve ii. I choose the zzh device mainly because of the great support it is giving and that Mr. @Koenkk has given all this time. Surely the zzh will be a great device. Thank you very much for your support. I am very grateful Receive a warm greeting |
Dear @Koenkk , After two weeks working correctly today my switchs fails again, i can see in the zigbee2mqtt log that every pulsation is detected two times in the log, i attach the log file:
I test with the xiaomi door sensor but this sensor is detected only one time, the problem appear only in all xiaomi switchs WXKG01LM how i can solve the problem? |
Here are my logs on newest stable version:
The switch reports click once but it's published twice on MQTT: once as BTW. I am currently testing one Konke button from www.aliexpress.com/item/Konke-ZigBee-3-0-Open-Protocol-Remote-Button-Smart-Home-Wireless-Switch-Intelligent-Application/33015636907.html?spm=a2g0s.9042311.0.0.30605c0fIEqe9B |
My switchs are working correctly during 2 or 3 weeks, no fails, no problem, no errors. Always zigbee2mqtt has detected one click, now two mqtt messages are sended. Maybe they are a problem in the last deb branch. I don't know. I will test with an old deb branch. I have made too proofs with this switches an always zigbe2mqtt has detected one click. |
@kitopopo I am trying to help here. It IS intended: #3998
It's in the |
@ArkadiuszNiemiec thanks for you help, I try to add legacy: false in the configuration.yaml. This solve the problem, only one mqtt message is sended but the xiaomi switch doesn't works in domoticz. Domoticz log detects de single pulsation but any action happens. My script is not triggered. Domoticz doesn't detects correctly the action or device detection. Thanks |
Dear @Koenkk , I test with the 1.14.0 dev branch version and only a mqtt message is sended. In the 1.14.3 dev branch version two mqtt messages are sended. Thanks in advanced |
As @ArkadiuszNiemiec mentioned this is indeed expected behaviour. You probably have to adjust your script to respond to |
Dear @Koenkk , Thanks for you reply. It is difficult to explain in english, When I put "legacy: on" , domoticz stops refreshing the device. Maybe i need report to @stas-demydiuk for modify zigbee2mqtt plugin? the plugin works now with the state "click" , "double click" and adding "legacy:false" the state is "single" , "double" .... Maybe this new state must be added to the plugin due to we have two states with legacy true and legacy false. Will the old state disappear in the future without add legacy:false? thanks in advanced |
Will be removed in Zigbee2mqtt 2.0.0 (not soon) |
Dear @Koenkk , Mr @stas-demydiuk has already updated the zigbee2mqtt plugin to be able to use "legacy: on" on the xiaomi switches. After update the plugin, now it is necessary to always use "legacy:on" in all switches. If I don't add "legacy:on" , now domoticz receives the two mqtt messages and double command is executed, but with legacy: on enabled everything seems to be fine due to only one mqtt message is received. Whenever you want and if you see fit, you can delete the old mqqtt message in future updates for the switch to work fine with domoticz without using legacy: on Receive a warm greeting |
@kitopopo yes, this will be done in zigbee2mqtt 2.0.0 |
Dear @Koenkk , I ask @stas-demydiuk to modify the "Long Click" and "Long Click Release" values in the zigbee2mqtt plugin for domoticz so that they work with the f legacy:false enabled in configuration.yaml. Sometimes domoticz gets an error called "undefined", and it doesn't detect the long click release correctly and the switch stays in that state. Attached two pictures. In the second picture the switch works correctly. When domoticz detects correctly long click realease , two "onCommand" and "Command" call occurs in the domoticz log. Thus Handling events is executed with the value long click realease
When domoticz doesn't detect correctly the long click realease and after appears "undefined error"
why don't the "onCommand" and "command" calls occur? Can you reopen the issue please? I wait news from you Thanks in advance Best regards |
Looking at your logs Zigbee2mqtt is not the issue here so it cannot be fixed by Zigbee2mqtt, it should be fixed in the plugin. |
Ok @Koenkk , I will report to @stas-demydiuk. Thanks for your help. Best regards |
Hm, this issue should be fixed? I just switched from ZHA to Z2M and I'm experiencing the same (I think) issue with my WXKG01LM buttons:
I has no problems with these buttons in ZHA. I'm pretty sure1 this is the code that handles the buttons in ZHA, and interestingly they seem to just read an attribute 32768? General question: If the device would send such an attribute, would I definitely see it in the log if I set it to log level Footnotes
|
I reinstalled Z2M and re-paired the button a couple of times for unrelated reasons and now I cannot reproduce my issue from above anymore. Single pushes are now correctly detected:
Multiple pushes are also correctly detected using attribute 0x8000 (32768):
Just as they are sent: |
Hi dear @Koenkk , I hope you are well with this epidemic. I send him a lot of strength,
I will explain my problem with three xiamo switchs (WXKG01LM)
What happened
I have problems with the xiaomi switch WXKG01LM (pulsation detection failure).
The switch has always worked correctly but since the last update I noticed that it does not correctly detect the pulsations, single, double, triple, quadruple,long..etc .
Doing a double click detects quadruple or triple or single. Making a triple click zigbe detects long click... it is random but and hardly ever matches .The problem is solved by stopping the zigbee2mqtt service and starting it again.
In the debug info i leave you a sample of the log, in this example ,In the last press was an individual click but zigbee2mqtt detects t other clicks. I wanted to turn on the light and the home theater came on and repeating a message through the speakers 3 times in a row. horrible. Single click should have turned on the light and double-clicking should have played the message through the speakers
but not all at once. the light went out and the message was played many times.
I have 2 xiaomi switch more and all fail with this problem. I have tryied delete the three switches and pairing again but the problem persist.
Thanks in advanced and best regards.
What did you expect to happen
the number of pulses emitted must coincide with the number of pulsations received
How to reproduce it (minimal and precise)
testing single click, double click or triple click after some hours of start zigbee2mqtt service.
Debug Info
Zigbee2mqtt version:1.12.2-dev
Adapter hardware: CC2531
Adapter firmware version: DEFAULT_20190608
The text was updated successfully, but these errors were encountered: