[RELEASE] Aqara Double Rocker Wall Switch DTH and Discussion (Updated May 26, 2020)

.
Got my Aqara double rocker and it’s installed. My first impressions are that it is a good device, but doesn’t feel as firm and solid as the GE or Zooz switches I have, especially when pressing buttons. That could be because it’s almost all plastic. It’s also smaller than my Zooz and GE devices. Buttons are very touchy, and not too firm like the other switches where someone who accidentally leans up on one won’t turn it on.

While it is a white switch, it’s matte white, and not gloss like my other switches. I can live with that. It also fits within a traditional decora wall plate instead of using the one that came with it. See the image further down.

The blue LED’s come on when the switch is on vs. the other way around like all my other switches work. I can probably live with that without it driving me too crazy… I don’t know if that can be changed or not, but I’ll try to investigate.

When first trying to join (I used the Classic app), I started Add a Thing, and turned on power to the device. Nothing happened by just providing power, so I tried the usual button presses until long pressing either button and then tapping on either got it to join right away using the “ZigBee Switch Power” device handler. I suspect the other Aqara wall switches will perform the same way and use the same ST stock DTH (which is local).

Cool, it joined and I can control the light in my light/fan combo, but as expected I can’t control the fan because it needs a different DTH (see below). Device control from the app is lightning fast, and reporting from the device to ST is just as fast. Better than my Zooz Zen30.

Both the parent and child switch displays power consumption of the WHOLE switch. That means the parent switch or the child switch can be off, but still show power usage for the other switch that may be on. Accumulated energy (kWh) is reported for the whole device via the main switch.

Overall I’m happy so far, but I wish it was a glossy white vs matte white, and really wish that the blue LED’s would be ON when the switch is OFF.

This is a Zigbee router device in your Zigbee mesh, but I don’t know how well that works right now. It hasn’t gone offline or gone through any rejoins since it was included, so that’s a good thing.

Changes:

  • May 2, 2020 - Added child switch tile so that both switches are controllable in this DTH. This only works for the Classic app, but not in the new app yet. The child switch still shows up as a separete device in both apps.
  • May 26, 2020 - Added accumulated energy (kWh). That value is accumulated from when the device first joined the hub. There is no device reset, so I used state attributes to reflect a reset. IDE still shows the overall total, and total since last reset (which is what the mobile app shows).

DTH for the switch WITH NEUTRAL:
https://raw.githubusercontent.com/jsconstantelos/SmartThings/master/devicetypes/jsconstantelos/my-aqara-double-rocker-switch.src/my-aqara-double-rocker-switch.groovy

DTH for the switch with NO NEUTRAL: (please note that this device does not report power or energy, so some of the screenshots in the posts below may not be applicable for this model)
(https://raw.githubusercontent.com/jsconstantelos/SmartThings/master/devicetypes/jsconstantelos/my-aqara-double-rocker-switch-no-neutral.src/my-aqara-double-rocker-switch-no-neutral.groovy

2 Likes

This one may get you close?

1 Like

Yup, that’s the one I posted in the other discussion. I’ve already modified it and have it working! Got the main switch and child switch to show up and work perfectly. I’m now trying to get power values to show up in the child device. Right now the parent switch reports power for both.

Stay tuned cause this is working and I’ll post a working DTH very, very soon!

1 Like

sweet!..

1 Like

If this was only being developed for the Classic app, building a DTH to include the two switch tiles and one power tile would be very easy, but the new app throws a kink in that plan since composite devices aren’t supported yet. I’m playing around with cluster reporting and endpoints right now to see if the device will report power per endpoint vs the whole device.

Having documentation from Aqara on how these things work would be great, but that won’t happen…

EDIT: found the cluster I was looking for. Yay…

EDIT: Nope…this one is stumping me…

2 Likes

Here’s a DTH for the Aqara Double Rocker switch: (derived from ST’s ZigBee Multi Switch Power DTH)

https://raw.githubusercontent.com/jsconstantelos/SmartThings/master/devicetypes/jsconstantelos/my-aqara-double-rocker-switch.src/my-aqara-double-rocker-switch.groovy

This will create a parent switch, and then a child switch during device inclusion, or when you switch from another DTH to this one.

Power reporting works like this:

  • Both the parent and child switch displays power consumption of the WHOLE switch. That means the parent switch or the child switch can be off, but still show power usage for the other switch that may be on.

This DTH works in BOTH the new app and Classic mobile apps.

If you get one of these devices, feel free to use this DTH, and let me know if you have any problems with the DTH.

@johnconstantelo did you happen to also get the single switch? also, did anything work with the standard DTH?

Hi @Automated_House, I didn’t get the single switch, but it should work with the standard DTH called “Zigbee Switch Power” since that one also works for the double rocker to control load 1.

That stock handler should get picked by doing a generic device discovery in the new app, which is technically how I added it via the Classic app. It will also properly report power. The one I modified for the double rocker needed to have the code modified to report power correctly compared to the device it was originally written for. I’ll tweak my DTH again today to clean up code a bit.

So far everything looks and works great. No rejoins overnight, nothing offline in my Zigbee mesh, and everything is still super fast. Both the parent and child devices work in Alexa (old skill), and all my SmartApps.

2 Likes

Updated May 2, 2020.

Changes:

  • Added child switch tile so that both switches are controllable in this DTH. This only works for the Classic app, but not in the new app yet. The child switch still shows up as a separete device in both apps.

1 Like

Updated May 26, 2020

Changes:

  • Added accumulated energy (kWh). That value is accumulated from when the device first joined the hub. There is no device reset, so I used state attributes to reflect a reset. IDE still shows the overall total, and total since last reset (which is what the mobile app shows).

image

So i got the double rocker from aqara and i can get 1 of the lights to work, but the DTH keeps getting these errors

Must specify a non-null value for the ‘to’ index in a Range @lines 180 and 210

Can you let me know what I’m doing wrong?

Interesting, it seems as though it’s not picking up the model correctly when the device joined, or it may not have created the child device. What does the IDE have for model? It should look like this:

image

Did it create the child device? In my case, the IDE looks like this after it created it:

image

When you joined the device, did you happen to have Live Logging going, and if so, did you see any errors?

If it didn’t create a child device, then change the device type to something like Zigbee Switch and click on Save. Shortly afterwards, change back to this DTH and watch live logging to see what other errors you get, if any.

First of all, thanks for replying,

In the first pic the application is 16 (not 19 like yours) and the zigbee node type is SLEEPY_END_DEVICE

not sure where that events and child devices is, so no i don’t see that.

Basically all i’ve done is paired the device (came back as thing) and then pasted your device handler into the online portal to make it drive the switch. Am i missing a step or anything.

Thanks in advance.

1 Like

No worries, makes sense now.

You’re definitely going to want to remove the device and rejoin it for everything to work properly.

If you notice in the DTH code, there’s a line called “fingerprint”. When the device joins it looks at all your custom DTH’s for any that have that fingerprint in there, and it uses that DTH if it finds it. Since you joined the device and then added my code, it didn’t run through a proper configuration process.

First, make sure that the code has been Saved, as well as then clicking on Publish -> For Me

Next using the mobile app, delete the device from there. If I remember right, you should see the led’s blink (blue/red) afterwards and then blink blue waiting to rejoin. Holding down any button until it turns red also forces a reset if I remember right.

Now add the switch back to ST the way you did before by just scanning for devices. After several seconds you will see 1 and then 2 devices pop in. It can take several seconds, so hang in there. I believe they should join with the following names:

  • My Aqara Double Rocker Switch
  • My Aqara Double Rocker Switch Child Device2 (I honestly can’t remember if that’s exactly it!)

From there you’ll be able to move them to a Room and eventually change their name to something more meaningful. Changing the name in the new app also takes several seconds for everything to sync up, but it will change, trust me!

So I did it like you said, but i edited the finger print to match mine
// Raw Description : 01 0104 0100 01 07 0000 0002 0003 0004 0005 0006 0009 02 000A 0019
fingerprint profileId: “0104”, inClusters: “0000,0002,0003,0004,0005,0006,0009,0702,0B04”, outClusters: “000A,0019”, manufacturer: “LUMI”, model: “lumi.switch.b2laus01”, deviceJoinName: “Aqara Double Rocker Switch”
}

i changed the raw and the model to match mine, its did make it join as the “Aqara Double Rocker Switch” but with no child and only one switch functionality and similar errors in the code simulator.

1 Like

Edit, I see the model. Hang on a sec… I’ve got to finish up something real quick and I’ll have an update for ya!

@Mac_McMeans, it’s interesting that your Raw Description is missing the 0702 and 0B04 clusters, which are used in the DTH to report Metering (0702) and Electrical Measurement (0B04). I wonder which one you got? Do you have a link to Amazon, or to a website where you purchased this? Also, is this the one without the neutral wire?

https://www.amazon.com/gp/product/B081ZQZJ8J/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1

that’s the one right there. maybe mine is different.

1 Like

Ah yeah, the no neutral switch doesn’t do energy and power reporting. I can tweak mine so that it will work with your model, but the new app will show power and energy tiles that are blank. That’s not really optimal for you, so if you give me just a little time, I can have a DTH put together for you shortly. I’ll put a link to that code here shortly. Stay tuned!

Hi @Mac_McMeans,

Here you go:

https://raw.githubusercontent.com/jsconstantelos/SmartThings/master/devicetypes/jsconstantelos/my-aqara-double-rocker-switch-no-neutral.src/my-aqara-double-rocker-switch-no-neutral.groovy

Create a new DTH with this code, and then change your device to use this. It should initiate configuration and set up your child device. Open Live Logging before changing so you can capture any errors. The child device should also show up in the new mobile app.

Once you change to this DTH you can delete the other one you created.

Since I don’t have one of these, I can’t test the DTH to be sure 100% it works, but it should. You may need to remove and rejoin the switch if changing the DTH doesn’t add the child device.