Device Handler for Aqara 2 Gang Wired Wall Switch no Neutral

It’s weird because it works almost by default with the default STH DTH name “Zigbee Multi Switch”, and only one function is missing for me, the decoupled function
Other than that, I can switch on or off from the app both of the circuits(buttons), and the status in the app syncs with the Switch states.

What’s worse I understood STH will switch to LUA and IDE will be decommissioned. This means all the DTHs must be re-written ?

yes, so far it seems like the Aqara H1 is more like a standard Zigbee Muti Switch than like older Aqara\Xiaomi devices.
And it could be that the decoupled function is not there. At least I have not seen it in the protocol so far.

What’s worse I understood STH will switch to LUA and IDE will be decommissioned. This means all the DTHs must be re-written ?

do not hurry about it, there will be a long transition period when both DTH work.

I’m back.
Can you tell me what appears in the logs when you press each of the switches?

I have tried and failed to reproduce the issue you, and others, have reported with adding the device in the new app. I have deleted one of my, admittedly older, double switches, reinstalled it and everything worked as expected. I can’t see anything in the code which would cause a different behaviour between older and newer switches in this regard.

I wonder whether it has something to do with the precise procedure used to add the device(s). If I go in the new app to the “room” labelled “No room assigned”, press the + at the top, then “add device”, then “Scan nearby” at the bottom. I then press one of the rockers for around 10 seconds. The scan reports that it can’t find the device, but when I go back to “No room assigned” , the devices are there, or appear fairly quickly. I see 2 devices with generic names in the app and the same 2 in the IDE. I then make the appropriate changes to the names, room, etc. either in the app or in the IDE.

I wonder whther there is some subtle difference in the way others do this, that might explain the behaviour they observe.

Hi @mariusry & @veonua,

I see from the similar, but US style, switches WS-USC01 & WS-USC02, that pressing the physical switches doesn’t seem to result in a zigbee message being sent to the hub. There may be a similar issue here. I don’t understand why anyone would design a switch that way. I wonder whether there is a setting we don’t know about, similar, for example, to the decoupled seetting in the other switches.

1 Like

there is a special magic command

def updated() { "updated..."
>>    updateDataValue("onOff", "catchall")

that fixes the zigbee message. As always it’s hard to find documentation for this. Anyway the groovy is outdated, and ST team have a new toy. Lua engine is even less stable.

1 Like

OK! I’ve posted a new version which should recognise hese 2 European style switches and which implements this “magic” command. I’d be grateful for any feedback.

1 Like

Sorry @aonghusmor, I was away this time. I will try again with the modified Handler, and get back to you. Thanks

1 Like

@aonghusmor First of all, thanks for all of these. I was able to seamless add my 1 and 2 gang no neutral switches and was able to operate them without no issues however I am facing issues with my 3 gang switches (QBKG25LM).

ST was able to detect the switch without zero issues and was able to accurate detect 3 child switches however I am unable to operate them. Turning on / off is failing with a generic network issues.

Any clues or are we looking at the switch issue. The switch is just next to my hub so i doubt its connectivity issue.

Are you able to log into the IDE? Can you tell me what appears in the logs when you press each switch.? You will have to set the debugging option on the main DH.

Hello @aonghusmor
I tested the updated Handler for EU Switches.
Now the switch is detected as a Thing, and if I manually switch to your DTH I get the following error:

    500: Internal Server Error
Reference Id
    Thu Sep 16 16:35:51 UTC 2021

I am able to test more, if you have any ideas.


Where are you seeing these messages?

If you look at the device information under “My Devices” in the IDE, can you tell me what appears under “Data” and under “Raw Description”?

It looks like it’s not being properly recognised.

Here are the debug logs from the main 3 gang switch - the switch always remains “ON” state and errors whenever I tried to change it. It also does not update its state when it is pressed physically.

Did further testing:

  1. If switch is on turned on state and I tried turning it off from the ST app, it turns off however the state in ST does not change. It remains turned ON in ST.
  2. If i attempt to press again, nothing happens.
  3. If i manually turn off the switch physically, the state does not change in ST

Thanks! I think I can see what is going wrong. I’m surprised it’s happening with this particular switch. Are you in Coupled or Decoupled mode? is the switch Wired or Unwired?

Apologies - not too clear of the meaning of coupled vs decoupled. All 3 switches are wired and each support unique light points.

No worry! In the Settings I would expect the 1st 2 settings both to be False, both in the main DH and in the children.