prostotlumacze.xyz

ZigBee Gateway (Tuya): Which One and Why

Before my first purchase of Smart Home devices, I analyzed the solutions available on the market. The choice wasn't easy, because there are quite a few of them, and for a beginner it's not at all obvious what to expect…

Before my first purchase of Smart Home devices, I analyzed the solutions available on the market. The choice wasn't easy, because there are quite a few of them, and for a beginner it's not at all obvious what to expect. What the market currently offers in terms of smart home automation – solutions based on dedicated wiring (good for new buildings, e.g. Somfy, but unfortunately very expensive), on WiFi networks (cheap devices from AliExpress or discount stores), compatible with the Z-Wave protocol (e.g. Fibaro), or precisely ZigBee (Tuya, Xiaomi, Philips HUE).

Got questions? Join the group Smart Home Not Only for Beginners

First to go were solutions based on dedicated wiring and controllers. Firstly, they're expensive; secondly, such a network has to be planned at the construction stage or during a major renovation; thirdly, it's hard to modify and expand. Next to go were Z-Wave solutions, specifically Fibaro. Unfortunately, despite its advantages, it's an expensive and closed system, and I didn't want to tie myself to a single manufacturer, nor did I feel like spending an excessive amount of money. For the same reason I ruled out Xiaomi devices – although they have plenty of fans, they unfortunately have their drawbacks – it's a closed ecosystem (a limited number of available devices), and another problem is the internally incompatible network based on a „Chinese” and a „European” cloud. Nice, but not enough for me. I also considered Sonoff solutions, but that's also a single-manufacturer ecosystem, plus the devices look rather clunky. So, for a good start, I chose the Tuya platform.

Next, I wondered whether to buy WiFi or ZigBee devices. It turned out that the ZigBee protocol is designed to be energy-efficient (which matters a lot for battery-powered devices), devices respond quickly (local processing in the gateway), and the network is easy to expand (mesh technology, where every mains-powered device extends its range). I've described the advantages of the ZigBee protocol below.

It's worth adding that there are different types of ZigBee gateways on sale. There are gateways that connect to the Internet via WiFi, and there are also ones that connect directly via cable. The advantage of the former is mobility (you can put the gateway wherever you like), while the drawback is usually a smaller number of devices that can be connected at the same time – typically around 50. Gateways connected to the network by cable support around 120 devices. You can also buy multi-mode gateways (also supporting around 120 devices) which, in addition to ZigBee, can connect devices using the Bluetooth 5.0 protocol. You can see my two gateways in the photo below. If you want to compare prices, take a look here.

To sum up: Tuya solutions are cheap and easy to set up. For the record, though, it's worth mentioning that if you want to significantly expand your Smart Home and become independent of external factors (e.g. no Internet access or a cloud outage), sooner or later you'll start thinking about Home Assistant (not to be confused with Google Home), but that's a topic for another time and place.

Shopping list of Tuya ZigBee and WiFi devices

Tuya gateways, based on https://www.tuya.com/solution/hardware/Gateway

Why a network based on the ZigBee protocol

  • Most ZigBee device automations run on the local gateway (ZigBee gateway) rather than in the cloud. A typical rule takes about 0.5 seconds. The same rule for WiFi devices, processed in the cloud, can take as much as 3-7 seconds!
  • The ZigBee protocol operates at 2.4 GHz, a frequency that propagates well inside buildings
  • ZigBee connectivity is based on a MESH topology (a mesh is more reliable and gives better coverage), which means that every ZigBee device plugged directly into mains power (bulbs, sockets, switches with a neutral wire, etc.) acts as a repeater for the other devices. If a distant device has no connection to the ZigBee gateway, it's enough for it to have a radio link to another mains-powered ZigBee device that is connected to the gateway.
  • ZigBee devices and sensors use very little energy, which means long life on battery power (2 years of operation on a battery – that's a requirement for ZigBee certification)
  • Thanks to their speed, ZigBee devices have a huge advantage when it comes to smart rule automation.
  • A dedicated, separate network that doesn't use up your home WiFi network's resources.
  • This is what the topology of Zigbee looks like

Why Tuya

  • Openness to devices from different manufacturers (over ten thousand manufacturers, hundreds of thousands of devices)
  • A dedicated, clear app: Tuya Smart, or Smart Life (if you need IFTTT)
  • Works smoothly with Google Home, Nest speakers and Google Assistant
  • Far more devices than Xiaomi Aqara, and far cheaper than e.g. Philips Hue
  • In my opinion the Tuya app works better and is more user-friendly than Sonoff eWeLink. I got rid of all my Sonoff WiFi devices – they ran with big lags and the app didn't want to play nicely with Google Home
  • The Tuya app + Google Home are completely sufficient; if you want to become an expert and set up and configure your own server, read up on Home Assistant

You'll find a link to the ZigBee gateway I bought on AliExpress here

ZigBee gateway and Tuya platform FAQ

Have other questions? Join the Facebook group – Smart Home Not Only for Beginners

  1. What is ZigBee? It's a data transmission protocol for wireless mesh networks. ZigBee-based networks are characterized by low power consumption, low data rates (up to 250 kbps) and a range between nodes of around 100 m. Typical applications are sensor networks, personal area networks (WPAN), home automation, alarm systems and monitoring systems.
  2. What is a mesh network? It's a network that you expand by adding more devices, each of which increases the network's range and reliability. In a ZigBee network, every device permanently connected to mains power (e.g. sockets, bulbs, switches) extends the network's range.
  3. Which is better, WiFi or ZigBee? Each of these networks has its own use. WiFi is perfect where we want high throughput. However, it's power-hungry, which means that battery-powered devices (door/window sensors, thermometers, scene switches, etc.) need their batteries replaced often. ZigBee-based networks transmit small amounts of data, scale well and are stable, which makes them ideal for home automation.
  4. How long does a battery last in a ZigBee device compared to a WiFi one? Of course, that depends on the device and the battery used. ZigBee devices are designed to draw a minimal amount of power, so they can last up to two years on a battery. WiFi devices usually run several times shorter on the same power source.
  5. What is Tuya? It's an international platform focused on developing AI and IoT solutions. The Tuya Smart platform provides end-to-end solutions for home automation, from providing the app and the dedicated cloud the system runs on, to making communication modules and helping bring them into mass production. Tuya brings together many device manufacturers, which makes it an ideal solution for a Smart Home.
  6. Is Tuya compatible with Google's Home app? Yes, Tuya can be connected to Google's solutions without any problems. Not all devices will be supported, though – it depends on the vendors of specific products (when buying a device, check whether it's supported by Google).
  7. Does Tuya only support the ZigBee protocol? The platform supports both ZigBee and WiFi devices.
  8. There are two apps in the store, Tuya Smart and Smart Life – which should I choose? They're basically apps that work in a similar way. They differ in their look.
  9. What are the drawbacks of this solution? Tuya is a cloud-based app. This means that if you don't have Internet access, or there's a cloud outage, some devices may not work. Fortunately, that doesn't happen often 🙂 Just in case, it's worth having equipment in critical places that can be controlled manually with buttons (light switches, sockets, etc.)
  10. Which devices does Tuya support? A whole bunch of them – see the screenshots below