# \[OBSOLETE\] Four button Tuya Zigbee device DTH (DTH link in post #7) (Same device from multiple brands: Zemismart, Yagusmart, Losonho , DYHF, etc)

**URL:** <https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149>\
**Category:** Community Created Drivers\
**Tags:** dth\_remotes\
**Created:** [September 24, 2020, 12:03am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149 "2020-09-24T00:03:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcusVR](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@MarcusVR](https://community.smartthings.com/u/MarcusVR)\
**Post date:** [September 24, 2020, 12:03am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/1 "2020-09-24T00:03:49Z")

</div>

Hy everyone!

I just received a new device: a 4 Gang Scenario Switch ([https://www.aliexpress.com/item/1005001287093949.html?spm=2114.12010610.8148356.23.2cba43c2YjoePj&spm=a2g0o.store\_home.slider\_6000150411057.0](https://www.aliexpress.com/item/1005001287093949.html?spm=2114.12010610.8148356.23.2cba43c2YjoePj&spm=a2g0o.store_home.slider_6000150411057.0)). Basically, it’s a Tuya Zigbee device with four buttons that works separetely, each one supporting three values: single click, double click and press.

SmartThings hub recognized it as a thing, and the Zigbee Button DHT “sees” the four buttons correctly, but it don’t work. Is there a way to integrate it? Below are the infos exhibited on the device page.

Thanks in advance for any help or suggestion!

# Thing Device _Switch Lonsonho_

- Name: Thing

- Label: Switch Lonsonho

- Type: ZigBee Button

- Version: Published

- Zigbee Id: BC33ACFFFE28BA75

- Device Network Id: 2FAF

- Status: ONLINE

- Hub: [Hub SmartThings](https://graph-na04-useast2.api.smartthings.com/hub/show/xxxxxxxxxxxxxxxxxxxxx)

- Last Activity At: 2020-09-23 8:29 PM BRT

- Date Created: 2020-09-23 6:27 PM BRT

- Last Updated: 2020-09-23 8:46 PM BRT

- Route: [This Device (2FAF) ↔ Hub SmartThings

- Metrics: \* Last Hop LQI: **255**  
\* Last Hop RSSI: **-23**  
\* Received Messages From Device: **181**  
\* Received Messages From Device (Duplicates): **0**  
\* Messages Transmitted to Device: **153**  
\* Messages Transmitted to Device (Failures): **10**  
\* Updated Time: **2020-09-23 8:26 PM BRT**

- Data: \* application: **42**  
\* endpointId: **01**  
\* manufacturer: **\_TZ3000\_vp6clf9d**  
\* model: **TS0044**  
\* zigbeeNodeType: **SLEEPY\_END\_DEVICE**

- Raw Description: 01 0104 0000 01 04 0000 000A 0001 0006 01 0019

- Firmware: Check Now

- Current States \* [supportedButtonValues]:

- button: **pushed**

- numberOfButtons: **4**

- battery:

- button: **pushed**

- numberOfButtons: **4**

- healthStatus:

- DeviceWatch-Enroll:

- checkInterval: **60 s**

- DeviceWatch-DeviceStatus:

- Preferences (edit): Name Type Value  
holdTime number 2

- Execution Location: Local

- Events: List Events

- In Use By

---

<div class="post-metadata">

**Author:** ![Automated\_House](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/automated_house/32/99641_2.png) [@Automated\_House](https://community.smartthings.com/u/Automated_House)\
**Post date:** [September 24, 2020, 12:42am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/2 "2020-09-24T00:42:41Z")

</div>

I would start with the default zigbee multibutton DTH and modify it as needed.

---

<div class="post-metadata">

**Author:** ![MarcusVR](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@MarcusVR](https://community.smartthings.com/u/MarcusVR)\
**Post date:** [September 24, 2020, 12:48am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/3 "2020-09-24T00:48:38Z")

</div>

Thanks **prjct92eh2** , I’ll try this way. I’m just a noobie without coding skills, but I’m persistent! 😋

---

<div class="post-metadata">

**Author:** ![iridris](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@iridris](https://community.smartthings.com/u/iridris)\
**Post date:** [September 24, 2020, 12:55am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/4 "2020-09-24T00:55:34Z")

</div>

If you haven’t already looked through this thread, it might be worthwhile if you’re going to be digging in to custom code. It’s pretty buggy right now.

> [@Custom Capability and CLI Developer Preview](https://community.smartthings.com/t/custom-capability-and-cli-developer-preview/197296):
>
> Overview At SmartThings we want to provide tooling to allow developers to get their device integrations working in the SmartThings app. These changes will allow an integrator to move from using custom commands and attributes to custom capabilities. DTH Migration For Custom Capabilities In order to follow along with the example set forth in this guide, you will want to have the CLI set up, so make sure that you take this step first. You can download the CLI here from the [releases tab](https://github.com/SmartThingsCommunity/smartthings-cli/releases) and read more about it in the [README](https://github.com/SmartThingsCommunity/smartthings-cli/blob/master/packages/cli/README.md). It is also recommended that you familiarize yourself with the concepts: [Custom Capabilities](https://developer.smartthings.com/docs/devices/capabilities/custom-capabilities)[Capability Presentations](https://developer.smartthings.com/docs/devices/capabilities/capability-presentations)Walkthrough We are going to walk through a simple example of updating our Device Type Handler (DTH) so that devices installed with the DTH will be …

---

<div class="post-metadata">

**Author:** ![MarcusVR](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@MarcusVR](https://community.smartthings.com/u/MarcusVR)\
**Post date:** [September 24, 2020, 1:21am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/5 "2020-09-24T01:21:26Z")

</div>

Thanks a lot, **Steven**! Any help is very welcome, once I imagine that I’ll spend some nights without sleep in order to make this device work! I think that firstly I must found a way to make the device work, but in the sequence the adaptation to the new standarts will be necessary. 🙃

---

<div class="post-metadata">

**Author:** ![MarcusVR](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@MarcusVR](https://community.smartthings.com/u/MarcusVR)\
**Post date:** [September 24, 2020, 2:44am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/6 "2020-09-24T02:44:08Z")

</div>

Hy guys! The EcoSmart 4-button Remote DHT partially works with the device, once just the “pushed” value is recognized through this DHT, and the buttons 2,3 and 4 don’t answer to the commands assigned, but if I don’t assign a command to it they reproduce the command assigned to button 1.

I downloaded its code from SmartThings GitHub, and now I just need to find a way to activate the values “double” and “held”, and perhaps use some tweak to reduce the delay beetwen the command given by the button and the action desired, but it is secondary. The main objective now is to make all the buttons responsive and make they accept the other values.

Some tip to help a noobie without coding skills?

---

<div class="post-metadata">

**Author:** ![Emilio\_Barron\_Miffli](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/emilio_barron_miffli/32/96799_2.png) [@Emilio\_Barron\_Miffli](https://community.smartthings.com/u/Emilio_Barron_Miffli)\
**Post date:** [October 1, 2020, 3:25am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/7 "2020-10-01T03:25:57Z")

</div>

Hi. I was looking for this DTH and found the information on a youtube video:

[SMARTTHINGS - Instalando e Configurando o Interruptor sem fio Zigbee 4 botões](https://www.youtube.com/watch?v=Hf86De6qWyA&t=0s)

Here is the link to the Device handler. It works very well for the 3 states for the four buttons.

[Device Handler Zemismart 4 button](https://raw.githubusercontent.com/YooSangBeom/SangBoyST/master/devicetypes/sangboy/zemismart-button.src/zemismart-button.groovy)

---

<div class="post-metadata">

**Author:** ![MarcusVR](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@MarcusVR](https://community.smartthings.com/u/MarcusVR)\
**Post date:** [October 1, 2020, 9:50am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/8 "2020-10-01T09:50:14Z")

</div>

Hi Emilio!

Thanks a lot, it is working flawlessly!

Marcus

---

<div class="post-metadata">

**Author:** ![Jesper\_Danvad](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jesper_danvad/32/134371_2.png) [@Jesper\_Danvad](https://community.smartthings.com/u/Jesper_Danvad)\
**Post date:** [January 6, 2021, 5:07pm UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/9 "2021-01-06T17:07:24Z")

</div>

Some input on this, that you might find helpful:

First feedback: The device handler link above (=“Zemismart 4 button”) works perfectly with the Tuya Sceneswitch 4-button device. It detects the 4 buttons individually.

The more advanced functionality (double-press or hold) is however not supported by the dev. handler. But this is only a little drawback, as the 4 buttons basically work.

Now some tips/tricks:

If you need to trigger a routine in Alexa follow this procedure:  
a) Create a virtual switch in SmartThings (use the web interface and not the app) and use the device handler “Alexa Simulated Switch” (code is easily found on github).  
b) Alexa will discover/“see” the virtual switch instantly and you can now base a routine on that switch going on/open (or off/closed). (In this way you build a “bridge” between SmartThings and Alexa that otherwise is not there.)  
c) In SmartThings you assign this virtual switch to one of the 4 buttons, so this virtual switch changes from “closed” to “open” when the relevant button is pressed.  
d) In SmartThings you also create an automation that resets the virtual switch with a delay of 10 secs. Then the virtual switch will always be ready for another press on the button.

Repeat steps a) through d) for all 4 buttons, so you have 4 virtual switches each corresponding to a separate button. Voila!

---

<div class="post-metadata">

**Author:** ![Loui](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/loui/32/122788_2.png) [@Loui](https://community.smartthings.com/u/Loui)\
**Post date:** [March 3, 2021, 8:07pm UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/10 "2021-03-03T20:07:41Z")

</div>

Hello guys and thanks for providing the DH. Got an issue here: i can see the device in smartthings app and shows when a key is pressed but i dont get to assign the keys. When i open the device i just see a message that is connected.

---

<div class="post-metadata">

**Author:** ![Loui](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/loui/32/122788_2.png) [@Loui](https://community.smartthings.com/u/Loui)\
**Post date:** [March 3, 2021, 9:28pm UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/11 "2021-03-03T21:28:07Z")

</div>

Got it guys. I just removed and readded the devices and it works

---

<div class="post-metadata">

**Author:** ![QK\_noliver](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/qk_noliver/32/138632_2.png) [@QK\_noliver](https://community.smartthings.com/u/QK_noliver)\
**Post date:** [March 19, 2021, 10:07pm UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/12 "2021-03-19T22:07:25Z")

</div>

Has anyone tried to use 2 separate switches so you can use more buttons?

---

<div class="post-metadata">

**Author:** ![kets](https://avatars.discourse-cdn.com/v4/letter/k/e9c0ed/32.png) [@kets](https://community.smartthings.com/u/kets)\
**Post date:** [April 16, 2021, 11:08am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/13 "2021-04-16T11:08:00Z")

</div>

[4 Gang Tuya ZigBee Wireless 12 Scene Switch Push Button Controller By battery 2MQTT Setup Automation Scenario for Tuya Devices|Switches| - AliExpress](https://www.aliexpress.com/item/1005001490302120.html)

bought this and it just doesnt seem to want to pair up in the Smartthings app at all - isnt even found ? How did others get it to pair ? I tried the bottom left button to get into pairing mode and the lights flash after 10 seconds

…EDIT…

magically just paired all of a sudden - and works on each button as single, double and held - great little buy !

---

<div class="post-metadata">

**Author:** ![StuartB](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@StuartB](https://community.smartthings.com/u/StuartB)\
**Post date:** [April 25, 2021, 10:39am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/15 "2021-04-25T10:39:21Z")

</div>

I found this DH works really well for 3 of the 4 buttons. Has this ever been updated to make all 4 buttoins work?

---

<div class="post-metadata">

**Author:** ![Andy1205](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Andy1205](https://community.smartthings.com/u/Andy1205)\
**Post date:** [April 27, 2021, 8:28pm UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/16 "2021-04-27T20:28:44Z")

</div>

Hi, I have installed this device driver and it works for all 4 buttons with all 3 press types.

BUT - when I set ‘button 1 press’ to ‘turn on lamp 1’ it turns it off, and vice versa.

Does anyone have any idea how I correct this? I’ve read the device handler guide but can’t see how the actions you select are controlled by the device handler.

Thank you

---

<div class="post-metadata">

**Author:** ![Michael\_Wood](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@Michael\_Wood](https://community.smartthings.com/u/Michael_Wood)\
**Post date:** [May 12, 2021, 8:11pm UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/17 "2021-05-12T20:11:49Z")

</div>

hello everyone  
i have installed one of these switches onto smartthings. it worked great the first time every button controlled as it said. Had to reinstall it again ,now the buttons 1-2 control everything for the four switches? buttons 3-4 will not work even though the device has function in every output Press/D press/and hold. Has anyone else had this problem ,if so how was it rectified  
any advice would be appreciated. Thanks

---

<div class="post-metadata">

**Author:** ![palti0r](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/palti0r/32/128300_2.png) [@palti0r](https://community.smartthings.com/u/palti0r)\
**Post date:** [May 13, 2021, 11:05am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/18 "2021-05-13T11:05:01Z")

</div>

![Screenshot_20210513_130152_com.samsung.android.oneconnect](https://global.discourse-cdn.com/smartthings/original/3X/5/5/55c9389e5b5e66ff086273f7fcbbe7dab5984bd0.jpeg)

What to do next? Where can i config the Buttons correctly? Tried Webcore, shows 32 Buttons … tested it, but it doens’t work. ABController … no reaction

---

<div class="post-metadata">

**Author:** ![Mariano\_Colmenarejo](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mariano_colmenarejo/32/220132_2.png) [@Mariano\_Colmenarejo](https://community.smartthings.com/u/Mariano_Colmenarejo)\
**Post date:** [May 13, 2021, 11:37am UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/19 "2021-05-13T11:37:10Z")

</div>

@palti0r,

I don’t know very well what you want to do and if you only want to use webcore, but you can use the quick controls, directly by pressing an action and you can control devices and scenes.

You can schedule automations with each of the button and actions.

To delete a quick control schedule, you have to go to automations and they appear at the end of the list. Select the one you want to delete and press delete

---

<div class="post-metadata">

**Author:** ![palti0r](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/palti0r/32/128300_2.png) [@palti0r](https://community.smartthings.com/u/palti0r)\
**Post date:** [May 13, 2021, 1:56pm UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/20 "2021-05-13T13:56:15Z")

</div>

I just wanted to toggle some Plugs (Speaker, Lights etc) in my Kitchen.  
I don’t use Webcore often, just tried it out.  
Where can I choose which button to execute the corresponding scene?  
There is no Option like: Button #1 press: …; hold: …; Button #2 press … and so on.  
Do not find the menu to link the buttons to the scenes/rules.

---

<div class="post-metadata">

**Author:** ![Mariano\_Colmenarejo](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mariano_colmenarejo/32/220132_2.png) [@Mariano\_Colmenarejo](https://community.smartthings.com/u/Mariano_Colmenarejo)\
**Post date:** [May 13, 2021, 2:57pm UTC](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149/21 "2021-05-13T14:57:08Z")

</div>

> [@palti0r](#):
>
> Do not find the menu to link the buttons to the scenes/rules.

To use quick controls:

- click on the blue letters of the desired button action and the menu to control devices or run scenes opens  
 ![Screenshot_20210513-164446~2](https://global.discourse-cdn.com/smartthings/original/3X/f/c/fca713c107eaff658824c4d8823bb18867c2c864.png)  
 ![Screenshot_20210513-164546](https://global.discourse-cdn.com/smartthings/original/3X/0/8/08ce2e6d4284130d6aad23c2f8edda8c81124a7b.png)  
 ![Screenshot_20210513-164625](https://global.discourse-cdn.com/smartthings/original/3X/1/c/1c7e7bbfaf8af6d7a6333e88d27e46dd79b4f484.png)

To delete a quick control schedule, you have to go to automations and they appear at the end of the list. Select the one you want to delete and press delete

 ![Screenshot_20210513-132955](https://global.discourse-cdn.com/smartthings/original/3X/7/d/7da6ceb296c3233a13320bf0710783fa98836df7.png)

[Next page](https://community.smartthings.com/t/obsolete-four-button-tuya-zigbee-device-dth-dth-link-in-post-7-same-device-from-multiple-brands-zemismart-yagusmart-losonho-dyhf-etc/206149.md?page=2)
