Device Handler for Aqara Wired Wall Switch

The complete statement is

if ( getTemperatureScale() != “C” ) temp = celsiusToFahrenheit(temp)

It’s split over 2 lines, but that doesn’t matter.

So that suggests that ‘getTemperatureScale()’ is not returning “C”. It looks like your hub may be set for Fahrenheit.
The setting is well hidden in the smartthings classic app. If you go to the symbol with 3 horizontal lines (bottom right on the iOS app, but somewhere else on the Android one), then the wheel symbol, you come to a page where the temperature scale is set.

Hello @aonghusmor

I’ve updated the DHT with your latest release and first of all I noticed the new more friendly user interface which it’s great.After that I’ve noticed that there are some good improvement in terms of quickness of the unwired button.
The only problem that I’ve encountered was the fact that on some switches the right switch (always the wired one) sometimes enters in an ON-OFF loop. When I set it OFF it comes again ON and OFF and so on…After this problem I’ve decided to go back to the old DHT :smiley: It suits me better for now.

About the temperature, after setting the offset on each device, on some it’s showing the “real” temperature and on some devices it’s always showing the “wrong” temperature.

Thank you for your work,

Thanks for the feedback. Can you tell me whether the on-off looping happens when you use it as a hard or a soft switch, i.e. when the actual button is pressed or when it is done by software. If it’s intermittant it’s probably a timing issue. I’ll try to reproduce it.


It happens Both ways, it starts with hardware push then it does the same thing on soft push.


@aonghusmor Hi, I’m about to buy some Aqara wall switches. Thanks for your good dth for it with the holding and releasing functions.
But, I thought your DTH is for without-neutral version switches. Is it possible to apply this into the with-neutral version switches with just changing the model number in your dth? I just want to use releasing and holding button but it’s hard to find any DTH for the with-neutral aqara switch.

Hi! I see no reason why this shouldn’t work unless there is a significant difference between the firmware on the no neutral and with neutral versions. I have no way of testing this.

There are some differences.

See post number 45 in the thread above.

If that’s the only difference it shouldn’t be difficult to tweak my code to work for both. I’ll try to find time to look at it
Just to clarify: you say that the command that goes to endpoint 3 on the no neutral switch goes to endpoint 1 on the with neutral one. That means 1 and 2 refer to the right and left switches respectively? Is that correct?
I assume that also applies to the messages received from the switches, 1 and 2 refer to right and left (instead of 3 and 2).
What about the message received on endpoints 4 and 5?

I have no more info beyond that.

But my friend bought and installed the version with neutral wire required and I had to modify my code in that way to make it work for his installation.

I’m current don’t have any Aqara switches in my house to do verification tests either.

I never had looked at the returned messages as in prior versions of hub firmware, the catchall messages were filtered.

Unfortunately, this means that I haven’t, so far, been able to obtain the information needed to modify my DH for the with neutral switch. If you find it please let me know.

I haven’t been able to reproduce this condition, but I did find an error which affects the left hand switch only and might be the cause. I’ve now posted a corrected version.

Hi @aonghusmor

I will test it as soon as I can and I will return with a feedback.


© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.