How to connect Tuya compatible 2 gangs Zigbee Switch module

I have a zigbee module that can easily connected to smartthing and identify as “Thing”
It is 2 gangs switch that works in Tuya zigbee hub. These are the parameters i’m getting in IDE :

Data :

  • application: 52
  • endpointId: 01
  • manufacturer: _TZE200_5apf3k9b
  • model: TS0601
  • onOff: catchall
  • zigbeeNodeType: ROUTER

Raw Description :
01 0104 0051 00 05 0000 000A 0004 0005 EF00 01 0019

I’m not SW engineer but i do understand how things work.
I tried to use a generic Device Handler with no success. The device just won’t switch on by remote command. Can some please help and advice what to do to make this work ?

Don’t know if that can help in live logging i saw when assing :

detecting status for be7d2c01-61fa-46a6-8782-109706b5b3a0 : true

also in Events list it was :

zbjoin: {“dni”:“539A”,“d”:“EC1BBDFFFEB8CC7F”,“capabilities”:“8E”,“endpoints”:[{“simple”:“01 0104 0051 00 05 0000 000A 0004 0005 EF00 01 0019”,“application”:“52”,“manufacturer”:"_TZE200_5apf3k9b",“model”:“TS0601”}],“parent”:“0000”,“joinType”:1,“joinDurationMs”:2633,“joinAttempts”:1}

1 Like

Try selecting “ZigBee Multi Switch” from the drop down list in the IDE when you edit the device. Technically this should work without making any changes, so try it first before making any changes.

image

If you need to make changes, here’s the source for your own DTH:

https://raw.githubusercontent.com/SmartThingsCommunity/SmartThingsPublic/master/devicetypes/smartthings/zigbee-multi-switch.src/zigbee-multi-switch.groovy

Here’s what should change, if needed: (you’ll see where your model number was added)

private getChildCount() {
	if (device.getDataValue("model") == "9f76c9f31b4c4a499e3aca0977ac4494" || device.getDataValue("model") == "HY0003" || device.getDataValue("model") == "HY0097" || device.getDataValue("model") == "HS2SW3L-EFR-3.0" ) {
		return 3
	} else if (device.getDataValue("model") == "TS0601") {
		return 2
	} else if (device.getDataValue("model") == "E220-KR2N0Z0-HA") {
		return 2
	} else if (device.getDataValue("model") == "E220-KR3N0Z0-HA" || device.getDataValue("model") == "ZB-SW03") {
		return 3
	} else if (device.getDataValue("model") == "E220-KR4N0Z0-HA" || device.getDataValue("model") == "ZB-SW04") {
		return 4
	} else if (device.getDataValue("model") == "E220-KR5N0Z0-HA") {
		return 5
	} else if (device.getDataValue("model") == "E220-KR6N0Z0-HA") {
		return 6 
	} else if (device.getDataValue("model") == "PM-S340-ZB" || device.getDataValue("model") == "PM-S340R-ZB") {
		return 3
	} else if (device.getDataValue("model") == "" || device.getDataValue("model") == "PM-S340R-ZB") {
		return 2
	} else {
		return 2
	}
}

Thanks @johnconstantelo,
for the quick response. Unfortunately none of the methods worked for me.
It did created a child device. But no response when pressing the device . In Classic app it is always saying turning on , but noting happen. Childe device always saying ON but it is actually OFF . Nothing happen when pressing the ON not even saying turning off. same behavior in official new app.

This is what i can see in live login when pressing ON/OFF button in device and child device… not much info

331753aa-afc8-4081-a2b0-31e9ed10a2e6 3:08:43 PM: debug child off B954:02

331753aa-afc8-4081-a2b0-31e9ed10a2e6 3:08:42 PM: debug child off B954:02

331753aa-afc8-4081-a2b0-31e9ed10a2e6 3:08:40 PM: debug off

331753aa-afc8-4081-a2b0-31e9ed10a2e6 3:08:27 PM: debug on

Hi @johnconstantelo

I have a zigbee module that can easily connected to smartthing and identify as “Thing”
It is 2 gangs switch that works in Tuya zigbee hub. These are the parameters i’m getting in IDE :

Data :

  • application: 41
  • endpointId: 01
  • manufacturer: _TZ3000_fvh3pjaz
  • model: TS0012
  • onOff: catchall
  • zigbeeNodeType: SLEEPY_END_DEVICE

Raw Description :
01 0104 0100 01 04 0000 0004 0005 0006 02 0019 000A

I can connect it to smartthing hub as a Thing and I changed the DH to Zigbee Multi Switch in IDE and it works very fine and I can control the switch both gangs from smartthings app but after 3 minutes both 2 switches switch OFF

I tried many times and same results, and I did follow your instruction to modify the DH for Zigbee Multi Switch and add my model name but unfortunately didnt work !
I do appreciate if any can give me any hints to solve this issue

PS: this is my device


Thanks

Really interested on this topic.
Did you solve your problem?

No, the problem not solve and i had to return product, do you have same issue?

@amin300
Your device seems to be discover as sleepy device. Is it no neutral device? If yes, it seems that your problem is reception problem. Can you add a repeater nearby?
Please note that my device discovered as a Router. My device requires a neutral wire. I have a different problem the EF00 in my discoverable fingerprint is Tuya protocol which is not supported by Zigbee Multi Switch generic Handler. I hope someone can help and add it to the generic Handler…

Hi @dotan_shai
The device is very close to hub 1m . it seems this device only can be discovered as SLEEPY_END_DEVICE and not ROUTER
Also it seems in AliExpress there is 2 types, one with Zigbee 3.0 and other not 3.0
This one which has no Zigbee 3.0

Hi. I opened up my tuya ZigBee 3 device…
It is exactly the same as the WiFi one I have, except from the communication board.

The ZigBee one has a TYZS3 module.

Datasheet here…

Not sure if this helps or not…

It will be discover as a ROUTER if the device have a connection to Live and Neutral wire.
If No Neutral and only Live, than it will be discover as SLEEPY_END_DEVICE.
Zigbee 3.0 is irrelevant .
So is your device have No Neutral connection ?

Correct, my device has no neutral
Maybe this is the reason, it is discovered as SLEEPY_END_DEVICE and connect for 2 minutes then turn OFF and goes to sleep!!

Hey,

I have the same issue and have been banging my head off the wall for the past day trying to figure it out.

If the device is a - Sleepy Endpoint Device : A device that is usually battery powered and spends most of it’s time in a low-power sleep mode. It will periodically wake up to send messages -

Does this mean that a change to the device handler requesting it to send a status alert or some other message every minute (while turned on) would keep the device awake or perhaps this is not the issue?

I would really love some input from someone with a bit more experience with smartthings devices and groovy.

check this out
https://github.com/WooBooung/BooungThings/blob/master/devicetypes/woobooung/integrated-zigbee-switch.src/integrated-zigbee-switch.groovy

Big credit to @WooBooung, I managed to add my custom Tuya 4-gang device fingerprint and it just work! Saved me tons of hassle. Its a well thought generic multi gang switch DH made by @WooBooung and it seems to fit a lot of devices and the supported device list still keep growing!

All you need is to follow the instruction and derive your device fingerprint from your device raw description. Then add the your switch gang number in the getMODEL_MAP() function. Save and deleted my device and re-discover it again and it already show the device with my previously coded description name instead of a “Thing” with all child switches automatically added correctly! Just work like a charm. Its pretty much straight forward.

I guess we can help grow the supported list by adding more fingerprint into that DH.

3 Likes

Nice job !! But , I haven’t saw in woobooung handler any devices containing the EF00 in the fingerprint. See also my 1st message
I posted. Any chance it will work ? I understand the the EF00 is Tuya specific protocol , that needs special treat.
I asked the developer and will post here when he’ll reply back.

1 Like

Try this Device Handler from YooSangBeom - GitHub.
This one works the best for me. I have some problems with configuring buttons but at least smartthings recognize it as remote and not “thing”.

I have Tuya Zigbee 3Gang remote (no wires)

2 Likes

Hi, had you any reply from @woobooung?
I’m having the same problem with a Lonsonho 2 gang switch. It turns off every 2minutes

For those who had the 2 minutes off issue check this out https://community.smartthings.com/t/uk-light-switches-my-experiences-2020/196035/67
Add your switch manufacturer to the Orbivo bool function and should fix that 2 minutes off issue.

This DTH works best for me - allows me to reliably add automations for this 3 button battery operated 1 gang switch Tuya/Bakeey (Zemismart)

Just needed to add the manufacturer code :"_TZ3000_a7ouggvs". Made a PR here: Add ST support for Tuya/Bakeey (Zemismart) 3 button by daltskin · Pull Request #2 · YooSangBeom/SangBoyST (github.com)

1 Like

Great progress in Habitat (HE) forum , they manage to get 3 gangs and dimmer switch that contain the EF00 cluster to work. if some can convert to Smartthings it will be great. A reminder , this is my readings:

  • application: 52
  • endpointId: 01
  • manufacturer: _TZE200_5apf3k9b
  • model: TS0601
  • onOff: catchall
  • zigbeeNodeType: ROUTER

Raw Description :
01 0104 0051 00 05 0000 000A 0004 0005 EF00 01 0019

1 Like

Hey @dotan_shai how can I discover my switch complete information?

The model, manufacturer etc?