Skip to content
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

Cant get WXKG02LM OR WXKG03LM to pair #811

Closed
fillwe opened this issue Sep 27, 2018 · 106 comments
Closed

Cant get WXKG02LM OR WXKG03LM to pair #811

fillwe opened this issue Sep 27, 2018 · 106 comments

Comments

@fillwe
Copy link

fillwe commented Sep 27, 2018

Been trying for 8 hours now to get these into my Conbee. Have tried following the advice on how to reset and pair from other threads here but with no luck. Have also tried to reset them via Touchlink but they are not showing up there either. Have also tried changing batteries. I'm able to pair other Xiaomi devices. Running 2.05.39 via Hass.io on a Raspberry Pi, any ideas?

@fillwe
Copy link
Author

fillwe commented Sep 27, 2018

So apperently there has been a new version of this released in August but with the same product name and id. All old listings on Gearbest, Aliexpress and Banggood are getting sold out and new ones are coming up instead with new info and product pictures. New one support long click, double etc as well. Could I be of any help to get this one supported?

New: (the one I bought) https://www.banggood.com/Original-Xiaomi-Aqara-Wireless-Smart-Remote-Control-Switch-International-Version-Smart-Home-p-1341453.html?rmmds=search&ID=521034&cur_warehouse=CN

Old:
https://m.banggood.com/Orignal-Xiaomi-WXKG02LM-Aqara-Smart-Light-Switch-Wireless-Version-Smart-Home-Controller-p-1153554.html

News article:
https://www.xiaomitoday.com/aqara-wireless-switch-enchanced-version/

@ErnstEeldert
Copy link

ErnstEeldert commented Nov 1, 2018

Looks like a different model identifier than described here. I just received these switches today, so assuming it's the new model.

WXKG02LM
xiaomi_wxkg02lm_nodeinfo
xiaomi_wxkg02lm_clusters
xiaomi_wxkg02lm_basic_cluster

WXKG03LM
xiaomi_wxkg03lm_clusters
xiaomi_wxkg03lm_basic_cluster
xiaomi_wxkg03lm_nodeinfo

@fillwe
Copy link
Author

fillwe commented Nov 9, 2018

Does not seem like we are getting any response, @ErnstEeldert could you post this in a new thread with device integration tag? We can close this one since it isn't the correct tag or headline for a device integration.

@manup
Copy link
Member

manup commented Nov 9, 2018

The issue is fine, to track the development of WXKG02LM OR WXKG03LM. It just takes time due all the other ongoing topics.

@manup
Copy link
Member

manup commented Nov 9, 2018

Added pages to separate the WXKG02LM 2016 and 2018 versions.

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

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

and WXKG03LM

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

Can anybody please provide logs for WXKG02LM 2018 version when pressing buttons?

deCONZ --dbg-aps=2 --dbg-zcl=1 --dbg-info=1

@goermezer
Copy link

Here is an output of:

  • Press left button
  • Press right button
  • Press both buttons
  • Double press left button
  • Double press right button

Sensor which reports: 0x00158D00027C277E

Attached file:

0x00158D00027C277E.txt

Hope, it helps. I have 43 Nodes, which make a lot of noise...

@o0shojo0o
Copy link

I tried to match goermezer:

  • Press left button
  • Press right button
  • Press both buttons
  • Double press left button
  • Double press right button

Sensor which reports: 0x84182600000c787d

0x84182600000c787d.txt

@ebaauw
Copy link
Collaborator

ebaauw commented Nov 10, 2018

Sensor which reports: 0x84182600000c787d

That’s an OSRAM device, not a Xioami.

@goermezer
Copy link

Thanks @ebaauw, you are right. It wasn`t the right id. I will test again...

@goermezer
Copy link

Ok, here is another test. The reporting sensor is 0x00158D00027C277E20.
0x00158D00027C277E20.zip

@o0shojo0o
Copy link

Sensor which reports: 0x84182600000c787d

That’s an OSRAM device, not a Xioami.

Oh sorry, I caught the wrong device.
Am still quite new in the matter, and therefore have problems in the log to find the right entries.

@samsonovss
Copy link

samsonovss commented Nov 15, 2018

Version - 2.05.47 WXKG02LM not work , Phoscon APP (add new switch - not Ready)
2018-11-15 22 53 21
2018-11-15 22 53 33

@manup
Copy link
Member

manup commented Nov 15, 2018

They are not party of .47, I'm expecting the switches and some other Xiaomi to arrive next week and hopefully to complete, test and support for them in the API and Phoscon App quickly.

@o0shojo0o
Copy link

Hi manup,
have you already received your Xiaomi delivery?
And if so, is there something new?
Here are a few WXKG02LM waiting for their use ;)

@manup
Copy link
Member

manup commented Dec 2, 2018

The switches are still not here :/ but I've started work on it based on the data provided here.

manup added a commit that referenced this issue Dec 2, 2018
* WXKG11LM (lumi.sensor_switch.aq2)
* WXKG11LM (lumi.remote.b1acn01)
* WXKG12LM (lumi.sensor_switch.aq3)
* WXKG03LM (lumi.sensor_86sw1)
* WXKG03LM (lumi.remote.b186acn01)
* WXKG02LM (lumi.sensor_86sw2)
* WXKG02LM (lumi.remote.b286acn01)


#811
@carloscae
Copy link

@manup the unsung hero. thanks a lot.
do you plan on supporting the double and long presses as well? even if not initial release?

@manup
Copy link
Member

manup commented Dec 3, 2018

If the switches support these yes, the above logs didn't indicate that. If you can provide this data the related events can be added quickly.

@carloscae
Copy link

The new switches do support single, double and long press. They are accessible via Aqara official hub.

I unfortunately have no windows machine to try the Deconz interface, but I'll get a virtual machine up and running to get those logs. I have both single and double rocker remotes.

@greencharlie100
Copy link

I am running deconz 2.05.49 on hassio. Is this the version with the updates to support the WXKG03LM wireless switches?
If so - how do I pair the switch with Phoscon?

@carloscae
Copy link

No. It isn't. Probably on 2.05.50

@greencharlie100
Copy link

How to i get this version in hassio?

@carloscae
Copy link

carloscae commented Dec 4, 2018

@manup only sent the commit for the update, but the new version was not yet released. once it is, we need to ask or wait for marthoc to update his Hassio plugin. Might be necessary to also update the firmware of your Conbee/Raspbee.

@greencharlie100
Copy link

Sorry, I did not realise that. I will wait patiently for the Hassio plugin update. Thanks for the info.

@carloscae
Copy link

So did my remote switches. Check the behaviour of your lights before dismissing the advice. ;)

@greencharlie100
Copy link

Just got it working - very strange behaviour.

In HA Configuration/Integrations I removed deconz.
Then added it again
And all my wireless switches AND wired switches are there.

They were not there before, nor were they in the API.

Thanks anyway @carloscae

@ReindDooyeweerd
Copy link

A small kick, i just received 2 of these switches today and after adding them and seeing events on the websocket port i tried adding them in Hass.IO

Strange thing however is that after an reboot of the server everything is running on the switches are still there but for one or another reason they aren't woking / sending events anymore.

When i check the deconz addon inside home assistant i see this message,

20:02:43:168 APS-DATA.indication from unknown node 0x00158D0002C93786 20:02:43:168 no button map for: lumi.remote.b286acn01 ep: 0x01 cl: 0x0012 cmd: 0x0A pl[0]: 055 20:02:43:168 ZCL attribute report 0x00158D0002C93786 for cluster 0x0012, ep 0x01

So i still receives the data but for one or another reason it isn't mapped to the switches anymore. The single ones i added a week ago are still working fine.

@greencharlie100
Copy link

Try manually toggling the switches by hand and THEN try sending/controlling them from HA or deconz API.

@ErnstEeldert
Copy link

@manup I have the WXKG02LM 2018 model, and while it pairs fine, shows up in Phoscon just fine, only the following events are showing up (checking via dc_eventlog):

  • 1002 -> single press
  • 1001 -> hold
  • 1004 -> double press

So what seems to be missing is the 1003 release hold event, which should be supported according to the wiki?

This is what the switch looks like over REST:

{
  "config": {
    "battery": 100,
    "on": true,
    "reachable": true,
    "temperature": 2700
  },
  "ep": 1,
  "etag": "7c9b6dae04b8ec0630b6f5396c812392",
  "manufacturername": "LUMI",
  "mode": 1,
  "modelid": "lumi.remote.b186acn01",
  "name": "Enkele Schakelaar",
  "state": {
    "buttonevent": 1001,
    "lastupdated": "2019-01-09T20:29:25"
  },
  "swversion": "20180525",
  "type": "ZHASwitch",
  "uniqueid": "00:15:8d:00:02:8f:80:26-01-0012"
}

@PortalFreak
Copy link

Hi,
im also not able to pair the switches WXKG02LM into the Phoscon-GW. I think i got model 2018, because you need for reset press 10 seconds the button, not 5 seconds like the 2017 model.
I have several other sensors like temperature / door sensor by aqara, they are working fine. My Conbee is up to Date, the latest firmware is installed.
Could anyone provide me some steps, to figure out how i got it connected?

thanks a lot

@greencharlie100
Copy link

What version of deCONZ you running?

@PortalFreak
Copy link

PortalFreak commented Jan 16, 2019

hi, im running phoscon-gw:
Version 2.05.40 / 8.10.2018
Firmware 26240500

deconz itself? i dont know im using homeassistant with a docker image.. https://hub.docker.com/r/marthoc/deconz/

@greencharlie100
Copy link

Thats your issue. 2018 switches (wireless aren't supported until later release). Update deCONZ and restart. Add switch as 'switch' in Phoscon app with normal procedure and they will add no problem.

@PortalFreak
Copy link

hi, i got some trouble during the flashing process.

`docker run -it --rm --entrypoint "/firmware-update.sh" --privileged --cap-add=ALL -v /dev:/dev -v /lib/modules:/lib/modules -v /sys:/sys marthoc/deconz

   marthoc/deconz Conbee/RaspBee Firmware Flashing Script

                   Version: 0.3

Enter C for Conbee, R for RaspBee, or press Enter now to exit: C

Listing attached devices...

rmmod: ERROR: Module ftdi_sio is in use
rmmod: ERROR: Module usbserial is in use by: ftdi_sio
GCFFlasher V2_11 (c) dresden elektronik ingenieurtechnik gmbh 2017/12/10
RaspBee: /dev/ttyS0 (default)

   1  FTDI device found
device vendor product serial description
failed to open FTDI device (0) status = 3

Enter the Conbee device number, or press Enter now to exit.

Device Number : 1


Firmware available for flashing:

deCONZ_Rpi_0x261f0500.bin.GCF
deCONZ_Rpi_0x262e0500.bin.GCF
deCONZ_Rpi_0x262f0500.bin.GCF

Enter the firmware file name from above, including extension,
or press Enter now to exit.

File Name : deCONZ_Rpi_0x262f0500.bin.GCF


Conbee Device Number: 1

Firmware File: deCONZ_Rpi_0x262f0500.bin.GCF

Are the above device and firmware values correct?
Enter Y to proceed, any other entry to exit: Y

Flashing...

rmmod: ERROR: Module ftdi_sio is in use
rmmod: ERROR: Module usbserial is in use by: ftdi_sio
GCFFlasher V2_11 (c) dresden elektronik ingenieurtechnik gmbh 2017/12/10
using firmware file: /usr/share/deCONZ/firmware/deCONZ_Rpi_0x262f0500.bin.GCF
reset via FTDI
FTDI can't open device 1, status = 2
`

what is the ftdi_sio module?

@manup
Copy link
Member

manup commented Jan 16, 2019

Version 2.05.40 / 8.10.2018

Note the WXKG02LM and WXKG03LM switches were added in later versions, current version is 2.05.55.

@greencharlie100
Copy link

I am not using docker so I cant help with the update. It may be easier to uninstall and reinstall the latest deCONZ version.

@PortalFreak
Copy link

PortalFreak commented Jan 17, 2019

Version 2.05.40 / 8.10.2018

Note the WXKG02LM and WXKG03LM switches were added in later versions, current version is 2.05.55.

thanks for your help,

so, is the switch now supported? i bought them, because in your wiki it is a supported device.
You mean, i need Version 2.05.55, yes?
I am a bit confused

@manup
Copy link
Member

manup commented Jan 17, 2019

Yes, these switches are supported since version 2.05.50

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

You mean, i need Version 2.05.55, yes?

Yes that's the current and recommended version.

@greencharlie100
Copy link

@PortalFreak, I told you nearly 24 hours ago to update deCONZ (meaning dowload latest version) and your switches will add to Phoscon.

@PortalFreak
Copy link

yes. thanks. you did. but i didnt know whats the target version. The UI told me its up to date. anyway..
i found that "Firmware updates from the web UI will fail silently" through phoscon, so i needed to resolve that issue first.
After fixed it, the logsfiles looks good.

[marthoc/deconz] Websockets port: 443, 21:09:28:807 dev /dev/ttyAMA0,� 20:53:00:582 �$[marthoc/deconz] Starting deCONZ..., [marthoc/deconz] Current deCONZ version: 2.05.55, [marthoc/deconz] Web UI port: 80, [marthoc/deconz] Starting without VNC GUI

but i have no luck, the switch will not pair by 10 seconds reset and press 5 times quickly the left button.

@greencharlie100
Copy link

greencharlie100 commented Jan 18, 2019

These are the details which I have recorded for my own personal use after a lot of trial and error:

You must have deCONZ version 2.05.50 or greater.
/////
Add a wireless switch:*
Phoscon APP -> settings/devices/switches
-> Add new switch (deconz will listen for connection)
Press wireless switch for 5-10 seconds until both blue LEDs come on together
Release switch
The wireless switch should be added to ‘Switches’ in Phoscon.
/////

This procedure has worked for me and pairs to Phoscon on the first attempt. On many occasions, the procedure will only work if you haven't tried to pair the switch before (to a deconz version which cant accept the connection) with many combinations of button presses etc..

Try the following:
Remove the battery from the wireless switch for 20 minutes
Restart deconz ( or rather your whole system if you can)
Replace the battery
Try pairing the switch as per my instructions above

If this does not work you need to download the following image on an SD card and try to add the wireless switch.
https://www.dresden-elektronik.de/funktechnik/solutions/wireless-light-control/raspbee-gw-sd-card-image/?L=1

Doing this will rule out any possible issues you have with your current system configuration. If the wireless switch does not add to your current system but does add to this new system (image) - then I would uninstall and reinstall deconz (on you current system) and hope that the switch will add after that.

Let me know how things go.

@manup
Copy link
Member

manup commented Jan 18, 2019

On many occasions, the procedure will only work if you haven't tried to pair the switch before (to a deconz version which cant accept the connection) with many combinations of button presses etc..

This particular issue with former data being reused was addressed in 2.05.55. Integration should work a lot smoother now since no old data will be reused.

@PortalFreak
Copy link

hi, after setup and reinstall my pi and the deconz docker image, the switches are paired with phoscon.
Thanks to anyone for your help, i cant retrace why the switched are not paired before that.
In phoscon now is see the switch as "WXKG02LM Rev.2" but there is no event visible when i hit a button.

@manup
Copy link
Member

manup commented Jan 27, 2019

In phoscon now is see the switch as "WXKG02LM Rev.2" but there is no event visible when i hit a button.

Checkout the switch editor:

https://doc.phoscon.de/app/doc.html#group-edit-switches-en

@wlatic
Copy link

wlatic commented Mar 11, 2019

Just gone through this. Had all sorts of issues trying to pair until I selected the Light section and put it to search.

Then held down the right button for 5 seconds until it reset and it then found it.

I'm seeing some strange issues of the switch toggling off / on, but it is paired.

@reprz
Copy link

reprz commented Mar 29, 2019

Just got two of these in RPI3+Hassio+Conbee setup and had no problems pairing them using Deconz 2.05.59 version. Only issue I had is that sometimes using toggle the switch makes fast on/off switching.

@stale
Copy link

stale bot commented Jul 27, 2019

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.

@stale stale bot added the stale label Jul 27, 2019
@stale stale bot closed this as completed Aug 3, 2019
@VivantSenior
Copy link
Contributor

VivantSenior commented Dec 24, 2019

Hi,

for a few hours, I'm trying to pair my WXKG02LM to the Conbee 2 but without success.

My config is:

  • Conbee 2,
  • RPi 3B+,
  • Hass.io 0.103.3,
  • deCONZ add-on 4.1.

It was working ok with zigbee2mqtt addon but now I moved to Phoscon it doesn't work. The weird part is that different switch WXKG02LM (2-gang) and two WXKG03LM (1-gang) paired without any issues.

What I have done so far:

  1. I have to tear it from the wall and move it closer to Conbee 2.
  2. Changed battery in the wall switch.
  3. Reset hass.io and deCONZ add-on.

How to do a full factory reset of the WXKG02LM switch?

@mhin76
Copy link

mhin76 commented May 13, 2020

Hi all. I recently also bought such a two button switch but the newest version WXCJKG11LM seem not supported. I got it paired and it appears in deconz and I also see data on the log when I push the button but it does not appear on Phoscon. In deconz it gets identified my mistake as Switch Dimmer. Funny enough sometimes after pairing all my light do go on when I click on the button.
Can I provide any data log file so this switch can be included? Would be really great!

@Smanar
Copy link
Collaborator

Smanar commented May 13, 2020

hello, you have the last opple device.
It's not the same than this issue, yours is here #2061

But to resume, you will need the future deconz version for full support using the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests