Device Handler for Aqara 2 Gang Wired Wall Switch no Neutral

Can you tell me exactly what model of switch you are using? There are some subtle differences between models.

Thanks for getting back to me. It’s the Lumi Ws-usc02.
Thanks again!

Hi Aonghuusmor,

Thank you and appreciate your work and help to all of us!
I would like to seek your advice on why I am only able to see 1 main switch in the app after pairing the physical switch.
It is a D1, 3 Gang with Neutral Switch. The 3 gang switch are wired and all connected to 3 different lighting points
I have published and execute update for the Aqara Wall Stich and Aqara Wall Switch Child, but am able to see/control 1 out of the 3 switches in the app only. (it seems to be only the left switch can be see/controlled in the app - I have 3 gang x 3)

My Switch Device details:

Not sure if you are able to assist with this, thanks!

*I have a couple of 1 Gang Switch and 2 Gang Switch, they all work great.

Can you let me see the log of what happens when you try to do a refresh in the app ? Make sure you set both the debuigging preferences to true.

Is the switch in decoupled mode or normal mode?
I sit set to wired or unwired?
Can you let me see what appears in the logs when you switch it on or off from the app? Make sure both debugging preferences are set to true.

So I went ahead and removed the switch then readded it. It seems to be working fine now. It’s done this in the past where it works for 24 hours then stops responding. Here are the logs. It’s set to wired and not Decoupled. Thanks for your time!

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:33 AM: debug Half Bath Light Parse returned: [[name:lastCheckin, value:09:57:32 Sun 30 Jan (PST), descriptionText:Check-In, displayed:true, linkText:Half Bath Light, isStateChange:false]]

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:32 AM: debug Half Bath Light {Child 1 [name:switch, value:off, isStateChange:true, linkText:Restroom Sign, descriptionText:Restroom Sign switch is off, displayed:true, description:]

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:32 AM: debug Half Bath Light SmartShield(text: null, manufacturerId: 0x0000, direction: 0x01, data: [0x00, 0x00], number: null, isManufacturerSpecific: false, messageType: 0x00, senderShortId: 0x5b20, isClusterSpecific: false, sourceEndpoint: 0x02, profileId: 0x0104, command: 0x0b, clusterId: 0x0006, destinationEndpoint: 0x01, options: 0x0000)

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:32 AM: debug Half Bath Light Parsing ‘catchall: 0104 0006 02 01 0000 00 5B20 00 00 0000 0B 01 0000’

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:32 AM: debug Half Bath Light ChildOff 5B20-1 1 [st cmd 0x5B20 0x02 0x0006 0x00 {}, delay 2000]

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:32 AM: debug Half Bath Light Parse returned: [[name:switch, value:off, isStateChange:true, linkText:Half Bath Light, descriptionText:Half Bath Light switch is off, displayed:true], [name:lastCheckin, value:09:57:32 Sun 30 Jan (PST), descriptionText:Check-In, displayed:true, linkText:Half Bath Light, isStateChange:true]]

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:32 AM: debug Half Bath Light SmartShield(text: null, manufacturerId: 0x0000, direction: 0x01, data: [0x00, 0x00], number: null, isManufacturerSpecific: false, messageType: 0x00, senderShortId: 0x5b20, isClusterSpecific: false, sourceEndpoint: 0x01, profileId: 0x0104, command: 0x0b, clusterId: 0x0006, destinationEndpoint: 0x01, options: 0x0000)

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:32 AM: debug Half Bath Light Parsing ‘catchall: 0104 0006 01 01 0000 00 5B20 00 00 0000 0B 01 0000’

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:31 AM: debug Half Bath Light [st cmd 0x5B20 0x01 0x0006 0x00 {}, delay 2000]

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:31 AM: debug Half Bath Light [name:button, value:pushed, data:[buttonNumber:1], isStateChange:true, linkText:Half Bath Light, descriptionText:Half Bath Light button is pushed, displayed:true, description:]

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:31 AM: debug Half Bath Light Switch 1 pressed off

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:21 AM: debug Half Bath Light Parse returned: [[name:lastCheckin, value:09:57:21 Sun 30 Jan (PST), descriptionText:Check-In, displayed:true, linkText:Half Bath Light, isStateChange:true]]

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:21 AM: debug Half Bath Light {Child 1 [name:switch, value:on, isStateChange:true, linkText:Restroom Sign, descriptionText:Restroom Sign switch is on, displayed:true, description:]

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:21 AM: debug Half Bath Light SmartShield(text: null, manufacturerId: 0x0000, direction: 0x01, data: [0x01, 0x00], number: null, isManufacturerSpecific: false, messageType: 0x00, senderShortId: 0x5b20, isClusterSpecific: false, sourceEndpoint: 0x02, profileId: 0x0104, command: 0x0b, clusterId: 0x0006, destinationEndpoint: 0x01, options: 0x0000)

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:21 AM: debug Half Bath Light Parsing ‘catchall: 0104 0006 02 01 0000 00 5B20 00 00 0000 0B 01 0100’

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:20 AM: debug Half Bath Light ChildOn 5B20-1 1 [st cmd 0x5B20 0x02 0x0006 0x01 {}, delay 2000]

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:19 AM: debug Half Bath Light Parse returned: [[name:switch, value:on, isStateChange:true, linkText:Half Bath Light, descriptionText:Half Bath Light switch is on, displayed:true], [name:lastCheckin, value:09:57:19 Sun 30 Jan (PST), descriptionText:Check-In, displayed:true, linkText:Half Bath Light, isStateChange:true]]

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:19 AM: debug Half Bath Light SmartShield(text: null, manufacturerId: 0x0000, direction: 0x01, data: [0x01, 0x00], number: null, isManufacturerSpecific: false, messageType: 0x00, senderShortId: 0x5b20, isClusterSpecific: false, sourceEndpoint: 0x01, profileId: 0x0104, command: 0x0b, clusterId: 0x0006, destinationEndpoint: 0x01, options: 0x0000)

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:19 AM: debug Half Bath Light Parsing ‘catchall: 0104 0006 01 01 0000 00 5B20 00 00 0000 0B 01 0100’

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:19 AM: debug Half Bath Light Parsing ‘catchall: 0104 0006 01 01 0000 00 5B20 00 00 0000 0B 01 0100’

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:17 AM: debug Half Bath Light [st cmd 0x5B20 0x01 0x0006 0x01 {}, delay 2000]

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:17 AM: debug Half Bath Light [name:button, value:pushed, data:[buttonNumber:1], isStateChange:true, linkText:Half Bath Light, descriptionText:Half Bath Light button is pushed, displayed:true, description:]

c885b00c-b723-4146-abe7-9ab508b365eb 9:57:17 AM: debug Half Bath Light Switch 1 pressed on

That looks as I would expect when each switch is switched on and then off.
If it is dropping off after 24 hours it may be because the link to the hub is too weak.
When you look at the details, as in the example from @Alvintham above, the last Hop RSSI number is an indication of the signal strength. It shouldn’t be too much below -60. Also the Route may tell you how the signal is being relayed to the hub.

I’ve placed a ZigBee plug near by to see if that solves the problem. Thanks again!

Hi aonghusmor,

Is this correct? (For setting the Debugging preference to ‘True’:

Here is my log:
ba167926-c106-4069-a7cd-0cc7e77f87df 12:03:12 AM: debug [raw:6B4801FCC080F700413C0328270521010008215A01092100070F23000090000C20006410006510006610019539B2AC9C3B963922AE15459739CCB193439839CFD31F429A2000, dni:6B48, endpoint:01, cluster:FCC0, size:128, attrId:00f7, result:success, encoding:41, value:00209a421fd3cf39984393b1cc39974515ae2239963b9cacb2399501106600106500106400200c00900000230f07002109015a2108000121052728033c, isValidForDataType:true, clusterInt:64704, attrInt:247]

ba167926-c106-4069-a7cd-0cc7e77f87df 12:03:12 AM: warn Unhandled variable length attribute, assuming a single attribute.

[ba167926-c106-4069-a7cd-0cc7e77f87df] 12:03:12 AM: warn DID NOT PARSE MESSAGE for description : read attr - raw: 6B4801FCC080F700413C0328270521010008215A01092100070F23000090000C20006410006510006610019539B2AC9C3B963922AE15459739CCB193439839CFD31F429A2000, dni: 6B48, endpoint: 01, cluster: FCC0, size: 128, attrId: 00f7, result: success, encoding: 41, value: 00209a421fd3cf39984393b1cc39974515ae2239963b9cacb2399501106600106500106400200c00900000230f07002109015a2108000121052728033c

[ba167926-c106-4069-a7cd-0cc7e77f87df] 12:03:12 AM: warn Unhandled variable length attribute, assuming a single attribute.

[ba167926-c106-4069-a7cd-0cc7e77f87df] 12:03:12 AM: debug description is read attr - raw: 6B4801FCC080F700413C0328270521010008215A01092100070F23000090000C20006410006510006610019539B2AC9C3B963922AE15459739CCB193439839CFD31F429A2000, dni: 6B48, endpoint: 01, cluster: FCC0, size: 128, attrId: 00f7, result: success, encoding: 41, value: 00209a421fd3cf39984393b1cc39974515ae2239963b9cacb2399501106600106500106400200c00900000230f07002109015a2108000121052728033c

You should have changed the setting within the app. Click the 3 dots at the top right and then “Setings”. Set the last 2 preferences to ‘True’.

The log you posted doesn’t look like it came from my device handler. That may be a side effect of what you changed in the code, but I think that is unlikely.

I deleted the device handler and re-publish + Execute update for Aqara Wall Switch.

But for the changing of setting within the app, ‘Settings’ is not available after clicking on the 3 dots. Anyway, you are able to assist with this? (notice my 1 gang and 2 gang switch have the ‘setting’ option)

Thanks again aonghusmor!

This looks like it has somehow picked up another device handler, not mine.
In the IDE under the ‘device details’, please click ‘edit’ at the bottom and then look at the entry labelled ‘Type’. If that doesn’t say ‘Aqara Wall Switch’, then try changing it from the drop-down menu and then click ‘update’ at the bottom.

Hi Aonghusmor,

You solved the issue! Thanks, all my 3 gang switches are working fine!
Thanks again Aonghusmor!

Good day

I have Aqura switch QBKG25LM 3 gung without nutral…
I contacted it to the HUB V. 3 successfully and then added your device habdler from github.

The problem is that I got only one gung in my app working fine with left phisical gong, while I should have 3 gung in the app… Would you please advise as I couldn’t find the answer in tge community…

Hi @hezqeel

QBKG25LM should work. Try doing a ‘refresh’ by opening the switch device putting your finger near the top and sliding down. It should create 2 other devices, which are for the other 2 switches.

Smartthings is about to move to a new setup, where everything works on the hub rather than in the Cloud. I suggest you have a look at the work of @veonua.

1 Like

Thanks for your reply… It works for me as I expected…

Is there any way that I can change any of my connected devices to local execution insted of cloud execution?

The new system is called Smartthings Edge. It uses the lua language rather than groovy. At the moment it doesn’t work through the IDE. See here, for example.

@veonua has developed a driver which works with many, but not yet all Xiaomi switches. In particular it doesn’t yet handle the 3-gang switches. However, I have a copy of his code, which I’ve been experimenting with and which I could update so that you could try it, if you are interested.

1 Like

Of course I’m interested to try…

The issue is that till know I don’t no how to convert to SmartThings edge yet, couldn’t find clear directions on how to use the SmartThings edge. Specifically for installing the CLI in MAC OS…

I haven’t tried it on a Mac, but I suggest you look at this documentation and this github page.

1 Like

I’ve amended my version of @veonua’s driver to work with QBKG25LM. However, I have had to guess a couple of aspects and may not have it completely correct. Try going to my edge drivers, and log in using your own login information, as for the IDE. From there you should be able to install the driver on your hub. You should then remove the device from your system and reinstall it. It should pick up the new ‘edge’ driver. Let me know how you get on. I may have to ask you to do a couple of experiments to make sure it is correct.
The driver looks completely different, so you should be able to tell easily whether you have correctly installed the edge driver. Sometimes this fails and you get the older groovy driver again. Get back to me if this happens.
This should work whether you’ve installed the CLI or not.

1 Like