Zigbee 3.0 Coordinator + Tuya ZB 3.0 devices

Hi. I am sure that this question or a hundred other similar questions have been asked already, but I had a look and struggled to find a simple answer to this question so I’m hoping to get some clarity here.

I currently have only wifi-based integrations, but I can see the benefit of Zigbee (mainly for low power devices like motion sensors and switches). I have just ordered a SONOFF Zigbee 3.0 USB Dongle Plus to connect to my HA box as the first step towards Zigbee. What I understand (I think?) is that because it’s ‘universal Zigbee 3.0’, in theory it should be able to communicate and work with any Zigbee 3.0 device that uses standardised Zigbee protocols (apparently this excludes many vendor devices).

Reliance on Tuya’s services vs native Zigbee integration is what isn’t entirely clear for me. There seems to be some disagreement/confusion about whether Tuya-based Zigbee devices would work or whether they need a Tuya Zigbee gateway. My question is also whether the features of the devices (for example a switch that I was looking at apparently can provide a variety of smart functionalities depending on whether you click it once, twice, or a long press). I’m assuming that this functionality is entirely based on Tuya’s integration. In other words, a Tuya Zigbee switch relies completely on Tuya’s cloud servers to ‘interpret’ a double click, for example, and then provide an ‘output’ that Home Assistant can use to trigger something. Is there any way to bypass Tuya so that Home Assistant (via ZHA → SONOFF Zigbee dongle → device) “natively” connects to the switch and can receive and interpret the double click instead? Or is that only going to be possible if you can flash them to ESPHome or something similar?

1 Like

Welcome to the forum, David :wave:t4:

I have a couple of Tuya Zigbee devices in place without having a Tuya Zigbee Gateway installed. No hiccups whatsoever, they all connect flawlessly to the Zigbee Coordinator/Routers. No Tuya Zigbee Gateway is needed.

Using Z2M here and no problems with smart functionalities at all. To make sure cross-check your devices with the supported device list for Z2M. The site tells you which functionalities will work for compatible devices and which wont.

Thanks for the confirmation (and welcome). So it’s a direct integration with ZHA (or Z2M in your case), with no ties to Tuya’s cloud servers and no loss of functionality? (assuming compatibility of course)

Perhaps your use cases are different to mine, but if you know the answer to the following question, it would be helpful for me to understand… For the example in my original post above, where a double click would give you the capability to trigger something different to a single click, does this need to be interpreted by Z2M as “if a single click input is received, do X, but if two click inputs received within 1 second of each other then do Y”? Or are the single and double clicks generated internally by the Zigbee switch and provided externally as two different entities to work with in Home Assistant?

No Tuya cloud involved at all.

Functionality is probably 95-100% for most devices. It depends on how well implemented the device is in ZHA or Z2M. For most devices this isn’t a problem, but a blanket “no loss of funtionality” statement would be a stretch.

Tuya zigbee implementations do not properly follow standards. A z2m “converter” or zha “quirk” is required for most if not all Tuya devices. If it is on the z2m supported device list it should be fine. Unfortunately I don’t think there is an equivalent zha list, but the devs (in both camps) are generally very responsive if you stumble upon an unsupported device and willing to provide logs and such to assist.

EDIT: For clarification, you generally do not need to do anything “extra” to get the converter/quirk for a supported device. They are installed by default as part of z2m/zha packages and automatically updated with each release.

In the end it is OSS, so you get what the devs were willing to take the time for. One dev may get a device to the “good enough” stage, another dev may squeeze everything they can out of another device.

Basically yes, two separate values, but not necessarily separate entities. Exactly how it is exposed can vary by zigbee provider and device. ZHA will almost certainly expose the different “clicks” as events. In Z2M probably as a sensor with something like “single”, “double”, “long”, etc values.

I have the following Zigbee coordinator:

And just bought this Tuya Zigbee switch which has different commands for single, double and long press:

And thats what I see in Z2M Console:

When I check the automation trigger, I get only 6 options as detailed below: 4 actions for single click and 2 actions for double click. Is there any way to get the remaining actions for double and long press?

I try to read the text on your Zigbee coordinator, but it is to blurry. And what is your switch discovered as in Zigbee2MQTT ?

I think I have a similar unit to what you have and mine is connected to a zigbee2mqtt network. I never used the ‘long press’ message for anything, as it is a REALLY LONG PRESS to get that message :wink:

Single and double presses come thru as well and I find them ‘usable’ from a human standpoint.

Note, I am pretty old school so I create my own ‘sensor’ from the manually MQTT device. And then uses these sensor states as my ‘switches’ for control of lights and such. So the ‘auto’ populated Automations and other attributes is not something I am familiar with. So there might be something missing there.

Good hunting!

Description
Shared Bathroom Light Switch
Last seen
just now
Availability
Online
Device type
EndDevice
Zigbee Model
TS0044
Zigbee Manufacturer
_TZ3000_wkai4ga5
Description
Wireless switch with 4 buttons
Support status
Supported

IEEE Address
0xcc86ecfffe9a557c
Network address
0x3D50
Manufacturer
TuYa
Model
TS0044
Power
Battery 100%
Interview completed
True

Thanks for the feedback @francisp and @dproffer

The switch that I’ve bought and discovered is the Tuya TS0044

After looking at the “Actions (enum)” section of the page above, I’ve noticed that the available trigger options for this switch within HA’s Automation only displays the “single”, “double” and “hold” actions previously triggered on the switch. Now I can see all available options. Issue fixed.

Interesting. Wondering if those ‘seen’ values are retained by HA between HA reboots, would only matter for humans using the GUI automation builder I am thinking. Makes sense, as there is no ‘all possible values’ database/reference between independent systems such as Zigbee2MQTT and Home Assistant. Might be a ‘plus’ for ZHA over Zigbee2MQTT as ZHA and HA are much more tightly coupled. However, I think there are far more ‘pluses’ in the cap of Zigbee2MQTT over ZHA.

Good hunting!