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

IT WORKED!!! You’re my hero thanks so much!!!

1 Like

Awesome! Glad that worked for you, and always glad to help out where I can.

So it did install the 2 switches, but they’ve been disconnecting and i have to re add them like once a day. Any tips on this?

That definitely shouldn’t happen, but it sounds like you may have a Zigbee range issue, or interference with your WiFi channel and what the hub has for your Zigbee channel (they both operate on the same frequency, but different channels).

Let’s work through a few debugging steps…

Where is the double rocker with respect to your hub, and do you have any other routing capable Zigbee devices in your mesh?

If you look in the IDE for the parent device, do you see route data like this:

image

That’s my double rocker, and it’s joined directly to my hub, which is literally on the other side of the wall. If yours looks like that, but it’s far away from the hub with several obstacles in the way, you’re probably having a range issue unless there’s another Zigbee router in there. Here’s what that would look like:

In that image, the outlet (33E1) routes through the double rocker (AF69) and then to the hub.

If you don’t have any other Zigbee routing capable devices in your mesh, you may want to add a wall plug to help out.

If you have Zigbee routers in your mesh, it may be that all you need to do is heal the mesh. To do that with ST, completely power down your hub for at least 15 minutes (remove batteries if you have a v2 hub), but I recommend longer just in case. I usually wait 30 minutes. Do that during a time where you’re not impacted if automations don’t run, or members of your household are dependent on ST to turn on/off lights, etc.

This usually does the trick, especially with more Zigbee router capable devices in your mesh. I have over 250 Zigbee devices in my mesh, and this almost always resolves things for me, and/or identifies faulty Zigbee routers in my mesh (very rare so far).

The other possibility is interference with Wifi, especially if your ST hub is close to your WiFi router. If these are close to each other, try separating them by several feet.

If there’s reasonable distance between the two, check the channel on your hub that Zigbee is using. You’ll find that in the IDE when looking at your hub. It looks like this:

image

Now check your router’s WiFi channel. It should be as far away from your ST’s channel as possible. Here’s mine:

image

You can’t change ST’s channel, but you can change your router’s channel. If you need to change channels, you can randomly try different channels, or use a WiFI analyzer app on your phone. I use WiFi Analyzer (free version) and look at the Channel Rating chart to find a better channel far away from my ST hub. Once you change channels, things should improve for Zigbee devices and not impact your other WiFi devices.

Sorry for the long answer, but in almost every scenario like yours it’s either a range or a channel issue. Very rarely has it been a failed device, but it’s not an impossibility. Try what I mentioned above and let’s see if things improve.

Hi, maybe its possible to use this DTH with Aqara two way relay module too? Exists a discussion in this forum about the device but I got no answer and I don’t know where to find. Many thanks!

Hi @Cloon , it’s worth a try. If it doesn’t work, you may just need to play around with the Zigbee clusters.

Hello!
Thank you for the code! However I can´t find on how to configure the second switch in my Aqara Double Rocker switch.
I followed your instructions, but I think I´m doing something wrong:
[e534b535-6071-406f-9c91-61a31cc51fa3] 6:36:42 AM: error java.lang.NullPointerException: Cannot invoke method split() on null object @line 176 (getChildEndpoint)

[e534b535-6071-406f-9c91-61a31cc51fa3]6:36:39 AM: error java.lang.NullPointerException: Cannot invoke method split() on null object @line 176 (getChildEndpoint)

[e534b535-6071-406f-9c91-61a31cc51fa3] 6:36:22 AM: error java.lang.IllegalArgumentException: Must specify a non-null value for the ‘to’ index in a Range @line 138 (refresh)

[e534b535-6071-406f-9c91-61a31cc51fa3] 6:36:22 AM: debug Refreshing values…

After creating the device handler, deleting and readding the switch only one (the main) appears.
I think that my device does have neutral, so maybe the code is completely different.
Thanks!

Hi @bornesto,

That’s the right switch for this DTH:

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

Can you make sure you’re using that DTH please?

Also, I’ve moved over to using Edge drivers for this device provided by another developer. It works great but looks slightly different:

Hi @johnconstantelo

Indeed, I made sure to use it for my device.
I also tried again to re-add the device from scratch, but it does not appear on the Aqara devices list. It adds again with just one switch.
I’m new on Smartthings. Is there a blog where I can get more information? I’ve never used the Edge drivers.
Thanks!

Hi @bornesto , in my post above those two links take to to the same discussion about Edge drivers for some Aqara devices. The first show my reply to the developer on the device working, and the second is the developer’s original post with a link to his channel to get the drivers.

If you opt to try Edge, make sure to comment out all the fingerprints in the custom DTH you created for yourself, and then remove the device from ST. I honestly don’t know why the second switch isn’t showing up for you, my apologies.

If you want to try the DTH again, see what events and error are generated in the IDE when you add the device. I believe you have some of those events listed above, but I’d like to see if “Installed” is generated when adding the device to your hub.