dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.89k stars 498 forks source link

Pairing Aqara Smart Wireless Switch WXKG11LM #917

Closed saxn-paule closed 4 years ago

saxn-paule commented 5 years ago

Hello,

your list of supported devices contains the Aqara Smart Wireless Switch WXKG11LM.

Unfortunately I'm no able to pair it in the Phoscon App.

In the switches category there is no matching manufacturer. Trying to pair it via "Sensors --> Other" it isn't recognized.

Produkt ConBee Version 2.05.23 / 24.4.2018 Firmware 261F0500

Phoscon says that no updates are available.

Some advices?

manup commented 5 years ago

This might be WXKG11LM Rev.2 which identifies itself with model identifier lumi.remote.b1acn01 can you confirm that?

I don't have the switch yet which makes testing a bit cumbersome, there is already code for it active but it seems not to work properly.

saxn-paule commented 5 years ago

Where can I see this information? I have a Conbee connected to a RasPi3 and installed deconz in headless mode.

Buttons have manufacturing date 05/2018

manup commented 5 years ago

You may try a recent version (make sure to create a backup first), the switch might be visible in the REST-API, but not yet the Phoscon App switch editor.

https://github.com/dresden-elektronik/deconz-rest-plugin#precompiled-deconz-packages

saxn-paule commented 5 years ago

Thank you very much.

With Version 2.05.45 / 2.11.2018 and Firmware 262E0500 the switch could be found as sensor and is available via the API as lumi.remote.b1acn01

Will there be a frontend representation in Phoscon App in the near future too?

saxn-paule commented 5 years ago

On press the button provides the value "1002". On hold the status "1001" is send after some seconds. On release the status "1003" is send (only if "1001" was sent before.

Maybe this is helpful.

manup commented 5 years ago

Ok that means API works correctly.

Will there be a frontend representation in Phoscon App in the near future too?

Yes the plan is to support all Xiaomi switches as soon as possible, I hope to receive the missing ones in the next 2 weeks to complete integration.

saxn-paule commented 5 years ago

That are great news :D

I'm waiting for my wall switches too.

I think this issue could be closed.

Thanks for the support.

ACrazyConcept commented 5 years ago

I also have 2 WXKG12LM i believe the model is. They do not come up in Phoscon, but they do in deCONZ and they work. Except one does not send the long press events. But maybe that is the device and not deCONZ's fault.

manup commented 5 years ago

I also have 2 WXKG12LM i believe the model is. They do not come up in Phoscon, but they do in deCONZ and they work. Except one does not send the long press events. But maybe that is the device and not deCONZ's fault.

Can you please provide the REST-API output of the WXKG12LM switch?

I'm working on the documentation to get a clearer picture of which button events are supported by each model.

https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Xiaomi-WXKG11LM-2016

https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Xiaomi-WXKG11LM-2018

https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Xiaomi-WXKG12LM

saxn-paule commented 5 years ago

Cool, I didn't know about the doubleclick feature yet. Works for me (1004) . Thank you.

ACrazyConcept commented 5 years ago

@manup Sorry, I was wrong. It is also the WXKG11LM (b1acn01) I have. It has single double and hold/release like listed in that link.

Elliott32224 commented 5 years ago

It's been over a couple of weeks, so I thought I would check. Anything happening with the fix for this? As for others, I have Phoscon issues with WXKG11LM (b1acn01). Thanks. Elliott

manup commented 5 years ago

In the last days more details were collected and documented to be used as base to complete the implementation (see the linked pages in supported devices wiki) hopefully my switches arrive soon to simplify testing.

Elliott32224 commented 5 years ago

Thank you.

esseki commented 5 years ago

Hi manup,

while working on the Xiaomi switches, can you please make sure to also include the "WXKG01LM" corresponding to the "Original Xiaomi Mijia Smart Home Zigbee Wireless Smart Switch" aka "the round button" (https://xiaomi-mi.com/mi-smart-home/xiaomi-mi-wireless-switch/). I'm concerned that this button might be forgotten as I don't see any reference to it, in the "Supported devices" section of the wiki (https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Supported-Devices) while it works flawlessly with Deconz since a while (see https://github.com/dresden-elektronik/deconz-rest-plugin/issues/349).

I gathered all the information from Deconz Rest API running from the following setup :

in case it can help to create the corresponding wiki page :)

Xiaomi WXKG01LM

Original Xiaomi Mijia Smart Home Zigbee Wireless Smart Switch. Model: WXKG01LM (Round button)

Joining

  1. Start sensor search in Phoscon App
  2. With a needle, press and hold the small button in the hole located on the back of the button for around 5 seconds until LED blinks

REST-API

GET /sensors/

{ "config": { "battery": 100, "on": true, "reachable": true, "temperature": 0 }, "ep": 1, "etag": "844d46fa615f3ca23e7b99e4bcf92f3c", "manufacturername": "LUMI", "mode": 1, "modelid": "lumi.sensor_switch", "name": "Interrupteur", "state": { "buttonevent": 1002, "lastupdated": "2018-12-02T13:42:22" }, "type": "ZHASwitch", "uniqueid": "00:15:8d:00:01:64:48:bf-01-0006" }

Button events

simple press : 1000 simple press release : 1002 double press : 1004 treble press : 1005 quadruple press : 1006

manup commented 5 years ago

Good catch, yes I didn't have it on the radar, will be added too.

Still a bit confused about the 1000/1002 As I understand it the switch supports:

short press: 1000 short release: 1002

But the switch doesn't support hold (1001) hold release (1003)?

esseki commented 5 years ago

As I understand it the switch supports: short press: 1000 short release: 1002 But the switch doesn't support hold (1001) hold release (1003)

Exactly. That's a kind of weird behavior from this first version of the Xiaomi button. But it supports up to 4 clicks ;)

manup commented 5 years ago

Ok thanks for the details I've added it to supported devices and created a page for it, lloking forward to add it in Phoscon App Switch Editor soon

https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Xiaomi-WXKG01LM

manup commented 5 years ago

The WXKG11LM variants are now supported in deCONZ version 2.05.50.

https://github.com/dresden-elektronik/deconz-rest-plugin/releases/tag/V2_05_50

esseki commented 5 years ago

Hi @manup,

immediately after I saw the release of 2.05.50 I updated my setup. But I could not find the way how to use the switch editor with my Xiaomi round buttons. Here is what I tried :

capture d ecran 2018-12-10 a 20 21 19

What am I missing ?

manup commented 5 years ago

The round button – WXKG01LM is not supported yet, only the switches listed in the release notes. I've ordered two round buttons via Gearbest, hopefully they arrive soon to complete integration.

saxn-paule commented 5 years ago

Today my second charge of WXKG11LM arrived. If I could trust the prints on package and button, it is the 2018 version.

In phoscon it's detected as the old version (no Rev2.0 behind model).

The problem is, that I only get 1002 and 1004 events. No tripple, quad or long press events at all.

Manufacturing date is 10/2018

The upper one is a Rev 2.0 from my last order, the lower one is the new one from yesterday. As you could see, the glue pad is also much thinner.

The new package also doesn't include an extra glue pad for later reuse.

img_20181219_105023_resized_20181219_105145262

saxn-paule commented 5 years ago

Okay, forget about it. I pressed the button too short. Its a rev 1 and tripple/quad press works.

So it seems to be luck wich version you get.

manup commented 5 years ago

Interesting, which firmware version do they show?

So it seems to be luck wich version you get.

Sadly yes, it's hard to tell from the shop descriptions which version it is.

saxn-paule commented 5 years ago

Interesting, which firmware version do they show?

How could I see this? Running deconz (2.05.50 / 262F0500) in headless mode on a Raspi 3.

manup commented 5 years ago

In the Phoscon App > Menu > Switches > Switch Details

image

I guess the date code as version is only queried and shown in newer deCONZ versions. On older versions usually all Xiaomi devices report 3000-0001 as version which isn't helpful.

saxn-paule commented 5 years ago

There is no version shown on all my Aqara devices:

image

image

image

image

image

manup commented 5 years ago

Jep, this is only queried from the devices in newer versions 2.05.51 and 2.05.52. It may take up to one hour, until the version shows up.

saxn-paule commented 5 years ago

Well, then lets update to the .52 version ;)

manup commented 5 years ago

And backup first ;)

saxn-paule commented 5 years ago

Always :)

saxn-paule commented 5 years ago

My first order is version "20180525". The ones from yesterday "20161128"

So I definitely got version 1. :(

Xento commented 5 years ago

I try to pair a WXKG11LM but it doesn't work. I'm using this versions: 2.05.52 / 16.12.2018 262F0500

saxn-paule commented 5 years ago

You need to pair it as a sensor. Press the small button and hold it for some seconds. Then press the big button several times. Worked for me with all 8 buttons.

Xento commented 5 years ago

Oh, its my fault. I didn't noticed the small button ... I only pressed the big button for some seconds until it flashed ...

Mr-REM-Esq commented 5 years ago

I try to pair a WXKG11LM as a sensor but it doesn't work. I'm using this versions: Version 2.05.59 / 14.02.2019 Firmware 262F0500

manup commented 5 years ago

How do you pair the device?

Usually:

Mr-REM-Esq commented 5 years ago

Sure. I did it the way you described it. Start sensor search, then press the small button on the side until the led blinks. It blinked 7-10 times and went out. Connection did not happen. Before that, I successfully connected two Aqara temperature sensors. The same button successfully worked with an earlier version of deconz.

ademobile commented 5 years ago

With my issues with IKEA sensors stopping working (events being forwarded #1220), I thought in the meantime to help remove the grief I am getting over this, I ordered one of these switches. It pairs, can be seen by Phoscon and GUI, however I am not getting any events from it. Also if I assign it to a group, it does not switch it. I seems to be the same issues as above. Here is what I can see:

screenshot 2019-02-25 at 14 09 42 screenshot 2019-02-25 at 14 09 30 screenshot 2019-02-25 at 14 09 53 screenshot 2019-02-25 at 14 10 04

So I am still stuck, and I am using the same versions as above

ademobile commented 5 years ago

As I need to get this switch work, I spent all morning, removing and adding it again, as I felt that it must work to get as far as I did. After a few attempts it started to work! Don't ask what I did (the only thing different was I pressed the middle button over and over whilst waiting for it to be 'seen')

alinelena commented 5 years ago

I do not seem to see how can one configure hold/long release events in switch editor. I see the events in the log.

Mr-REM-Esq commented 5 years ago

Unable to pair WXKG11LM in version 2.05.60 too.

haakonstorm commented 5 years ago

WXKG11LM here. Latest version of everything. HASSIO, RaspBee, RPI3B+. Most of the Aqara devices I got are now more or less running OK, either directly or via REST. The devices I can't get to join are these simple buttons. Not sure about the following, did anyone get any 100% info:

  1. How to reset
  2. How to set in pairing mode
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Franco757 commented 2 years ago

Hi,

I am trying to pair an Aquara mini switch WXKG11LM with my ConBee II Phoscon (ver 2.13.04 12/18/2021, Firmware 26660700) attached to a RPI3B+ running home asssitant 2021.12.8 but not successful.

I am able to pair and use Aqara temperature/door/water/motion sensors without any issue but not the mini switch.

I tried to pair it as a sensor and a switch.

Any thoughts? Thanks

Mimiix commented 2 years ago

@Franco757 please search this git as it's a known issue.

Franco757 commented 2 years ago

I have and the suggestions do not work.

Mimiix commented 2 years ago

It's a known issue that it broke with the latest stable. Fix will be in next beta.

insalada commented 2 years ago

I have the same problem as some users above. All my aqara devices are perfectly recognized and working via Phoscon, except with aqara mini switch (WXKG11LM). I have tried everything, as a switch and as a sensor, all possible combinations, but no success so far. I am in the last version of Home Assistant and using conbee II. Any suggestion will be welcome. Thanks.

Franco757 commented 2 years ago

@Mimiix this case has been closed and merged with #5647.

5647 is listed as closed with a modificaton in the CPP file.

What are the users running Phoscon via HA running on a PI + ConBee II supposed to do with that modified CPP file? I doubt we have to recompile the software ourselves. Thanks