Home Assistant + Aqara + Tuya

Hi all!

I am in the process of preparing my smart home system for my condo unit. This is what I now have.

Home Assistant

  • 1 x Home Assistant Green

Aqara

  • 1 x M2 Hub
  • 2 x Smart Wall Switch Z1 Pro (Single Rocker)
  • 2 x Smart Wall Switch Z1 Pro (Double Rocker)
  • 1 x Presence Sensor FP2

Tuya (SmartLife App)
1 x GW02B Hub (with LAN port)

  • 20+ x 12W RGBCW Downlight

There will be more for me to add, but since I haven’t started living there, I haven’t started setting up Home Assistant but connected smart devices to their own brand’s hub via Zigbee at the moment. I am inclined to use devices from Aqara but have a connection between these two brands as a higher priority. One thing I have in mind is for Tuya lights to turn on based on my location spotted by Aqara Presence Sensor FP2. If it means I could do such things by using the Tuya presence sensor, I would gladly do so. Should anyone have any insights regarding this specific case, please provide me guidance moving forward from this point. Should I press on with purchasing Aqara since HA can cover my connection between Aqara as a presence sensor as a condition and Tuya downlight as a result, or give up on my presence sensor and replace everything with Tuya instead?

This is a simple automation in HA.

1 Like

Personally I recommend using the “official” ZHA integration (native Zigbee Gateway built-into Home Assistant) as it is easier to get started with and maintain as it got no external dependecies, it is especially optimized for the Home Assistant SkyConnect / Home Assistant Connect ZBT-1, and if you too can help contribute to the overall ZHA community (like assist zigpy developers echance the ZHA Device Handlers / quirks if a device do not work out-of-the-box) then you can help that be improved and make easier to use by more and more people in the future too.

Recommend try to follow all tips in that Zigbee network optimization guide regardless but also suggest check out all Zigbee links in this cookbook list too:

Zigbee

Zigbee buyer’s guide contain some good basic information if you already know you want to use Zigbee:

Zigbee Gateway integrations

You need a Zigbee Gateway. Home Assistant’s own built-in ZHA integration and Zigbee2MQTT which are two most popular open-source and hardware-independent Zigbee Gateway implementationsfor Home Assistant integration will allow you do use almost any Zigbee device with Home Assistant, and with either one of those you will be able to mix devices from different manufacturers. Which one of those you choose use in the end is a matter of personal preference (some people even use both of them, but they then need to use two separate Zigbee Coordinator adapters and device can not be on both networks at the same time). Both are equally stable. Whichever one you choose, the Zigbee protocol is the same.

Zigbee Home Automation (or “ZHA” for short) is the name of Home Assistant’s native Zigbee Gateway integration (built-in open-source component that is part of Home Assistant Core) . If you buy the official Home Assistant SkyConnect / Home Assistant Connect ZBT-1 Zigbee Coordinator adapter, then it will be installed by default; with a different brand/type of Zigbee Coordinator the installation and device discovery is still very simple through the GUI. If a device follow the standard Zigbee specification then will work with out-of-the-box with the ZHA integration. In practice icompliance with the standard Zigbee specification is less common than you might think and many devices need custom device handlers (also known as quirks) for the ZHA integration. In most cases such ZHA Device handlers (quirks) will be included for most common/popular devices in the latest release of the integration, but very new or odder types of devices may have missing features initially so you will need to submit a device support request and help provide information needed to develop new/additional ZHA Device handlers or extend existing zha quirks. More details here .

Zigbee2MQTT is an open source gateway application for controlling Zigbee networks - in other words, it performs the same function as (say) a Philips Hue bridge but it is not restricted to any particular manufacurer’s devices. It works well with HA and with other smart home systems. If you wish you can run it on a machine separate from your HA server - which means your lights will still work while HA is being restarted. As the name suggests, it needs a MQTT broker , which makes it more complicated to set up and maintain than ZHA, however Z2M supports more non-compliant devices. More details here .

Propriatory and commercial closed-source Zigbee Gateways/Bridges/Hubs/Controllers

A lot of manufacturers will suggest that you use their proprietary gateway/bridge/hub/controller. There are pros and cons with doing so. You will be restricted to using one manufacturer’s devices, but on the other hand you can resonably expect them to work with their brand of devices (or at least you will know who to complain to). This can be a good starting point with Zigbee if you only bug a few devices as you can always move all Zigbee devices you bought to either that built-in native ZHA or Zigbee2MQTT later. But see comments below. It’s certainly not a good idea to use more than one hub - things can get very messy and the best practice is always to consolidate all Zigbee devices to a single Zigbee gateway/coordinator if possible.

Do your research

There is a list of recommended Zigbee radio adapters in the HA docs, but do not just go out and buy the first radio adapter you see on that list. Generally you do not want to buy a radio adapter that is based on an old chip and is no longer getting firmware updates or one that uses a radio type/manufacturer that is not specificlly recommend for the Zigbee integration that you will use.

The Zigbee Device Compatibility Repository is a good starting point for devices of all kinds. It will give you an idea of whether a gadget works with ZHA or Z2M, but it’s user compiled so further checks are a good idea.

If you’re using Z2M, their webpage has a database of supported devices (with pictures - very useful).

If you’re using ZHA, have a look at the GitHub device handler issues page. This will tell you what devices other people have requested support for - and whether support has been added. It will also give you a good idea of which devices are problematic.

Above all, before you part with your credit card number, search this forum and ask questions. There may be a few ranters :roll_eyes: but someone somewhere will probably already have tried out the device you’re considering.

In January 2024 about half the problem devices forum members posted about were Tuya. Just saying.

1 Like

thanx, very useful post

1 Like

Thank you!

I have yet started using HA at all, so everything is unknown to me. May I have confirmation that doing something similar to this with Tuya lights is certainly possible?

Thank you for your extensive response!

My understanding right now is to make my Home Assistant Green a Zigbee hub, replacing both the Aqara and Tuya hubs. Is that correct?

If that is the case, I understand that USB-A devices can be plugged into the HA Green, but I don’t know which one of them will be available to buy in Thailand. May I have your suggestions on that?

Regarding a contribution to the ZHA community, since coding is not my strong suit, I’m more than happy to do so as long as it’s within my capacity. How can I help?

Yes, and yes, see → Zigbee buyer's guide - #2 by Hedda

Summery; Personally recommend either Home Assistant Connect ZBT-1 (formally called Home Assistant SkyConnect) or Sonoff ZBDongle-E if going to use ZHA, or Sonoff ZBDongle-P if Zigbee2MQTT.

See the whole thread here → Zigbee buyer's guide

First of all follow best practices to avoid and eliminate most common problems, see → Zigbee network optimization: a how-to guide for avoiding radio frequency interference + adding Zigbee Router devices (repeaters/extenders) to get a stable Zigbee network mesh with best possible range and coverage by fully utilizing Zigbee mesh networking

Then you can help by trying to get all your devices working with the ZHA integration and open issues (as either bugs or device support request) to correct repository to report any problems if your devices working as you expect then. → Zigbee Home Automation - Home Assistant

You can also help improve ZHA documentation → Zigbee Home Automation - Home Assistant