How to Add Tuya Smart Devices to Apple HomeKit

Ishara Fernando

I have some Tuya Smart Devices in my home. But they only support Google Home and Amazon Alexa. I wanted to get them with my favorite ecosystem Apple HomeKit. Also, I found some interesting things about Tuya Apple HomeKit. And yeah! Tuya devices can be controlled locally without an internet connection using Tuya local key. Let’s see how to Add Tuya Smart Devices to Apple HomeKit using the web and local keys.

How to integrate Tuya Smart devices into HomeKit?

Now we all know that Tuya smart devices don’t natively support to HomeKit. But, it can be integrated with your Apple HomeKit by using the Tuya Homebridge plugin. Homebridge is a third-party lightweight plugin server. Also, it is the best solution for your Tuya smart devices that don’t natively support HomeKit. Ever wondered how to connect any smart device to HomeKit using HomeBridge. Let's find out.

All you need to control your Tuya devices with Apple HomeKit (Tuya Apple HomeKit)

  • Tuya user Account
  • Tuya developer Account
  • Tuya Smart Device

There’re several ways to integrate your Tuya devices into your Apple HomeKit. Following are the 3 easy ways to integrate your Tuya device with your HomeKit.

  1. Configuration by simply using Tuya email Credentials
  2. Using Tuya’s official HomeBridge plugin
  3. Using Local keys

You can easily control your Tuya devices with your favorite ecosystem HomeKit using the web and local keys, Let’s see How to get Tuya’s local key.

Extracting device keys from the Tuya platform — Local Key configuration

Before controlling your devices locally without even an internet connection, you’ll need to have the TuyaSmart app installed on your Apple device and you have to set up your account firstly.

If you haven’t a Tuya developer account on http://iot.tuya.com/, first you have to create an account using this.

Install the Homebridge Tuya plugin

You can use Homebridge or HOOBS to install the Tuya plugin. I used the Homebridge interface to install the Tuya plugin.

If you’re interested in the HOOBS, you can find HOOBS smart home automation.

Here are the steps to install the Homebridge Tuya plugin

Step 1: Open the Homebridge and go to the plugin tab. Then, type “HomeBridge Tuya web” in the search box. (Homebridge - Plugin - Search "Homebridge Tuya Web")

Step 2: Then click the Search button and you can see a few results. In here, you'll see “Official HomeBridge plugin for TuyaAPI”. Next, you have to click the install button of the plugin.

There is another easy way to install this Tuya plugin. (1. Go to the GitHub page of HomeBridge Tuya. 2. Copy header of the plugin 3. Go to the HomeBridge and then go to plugins. 4. In the search tab, paste it, then install the plugin)

Create a project

Step 1: Firstly, go to the Tuya IoT Platform, and then you can create the cloud development project by clicking create cloud project button. (go to Cloud — Development — Create Cloud Project).

Step 2: Next, fill in the fields of the form and click the Create button to create a cloud project

Link account

Step 1: Once you created it, you need to link it to your user account with the devices that you want to control.

Step 2: Again go to the Cloud Development tab, and then the Devices tab in the Tuya IoT platform before linking your account. (Cloud - Development - Device)

Step 3: Next, Select the Link Tuya App Account, and click the Add App Account button on the right.

Step 4: You will see a QR code and you want to go to your TuyaSmart app on your smartphone. Then Tap the Me icon, and then tap the [ — ] button. After all, you can scan the code using your phone.

Step 5: Now, these two accounts will be linked. You'll see it in the list on the website.

Extract the Device ID

You can see the device that has been added toTuya App. Then, we'll see how to extract the Device ID.

Step 1: Go to devices tab in the IoT platform and select the created device button. (Tuya IoT Platform - Cloud - Development - Devices)

Step 2: Then, you have to copy the device ID, and select the data center from the drop-down

Get device permission

Now, you have your Tuya device ID, but before doing anything, we need to add API permission.

Step 1: Go to the My Services in the cloud menu and then click it.

Step 2: Click IoT core and sign up for the trial edition plan.

Extract to Tuya local key

Now we have some API permission to our Tuya Device ID

Step 1: Go to the Cloud tab and then API explorer (Cloud - API explorer)

Step 2: Next, go to Smart Home Management System, and then device management, now you can scroll down to get device details

Step 3: After then, copy the device ID and you have to submit the request. Now, you'll see your local key.

Step 4: Copy this local key along with the device ID for entering into your bridge.

Configuring the Tuya device

Step 1: Back to HomeBridge home page and select the device type

Step 2: You can give any name to your device, and then give the Tuya ID

Step 3: Copy the local key and paste it in the field of the Tuya key

Step 4: Fill out the other sections(If you don’t know how to fill other section you can go to GitHub issues and you'll find your device type, ). Then, click on save button

Step 5: Now, restart your HomeBridge and allow it to load all of its plugins

Step 6: Go to accessories, and you'll see your device here. Then, click on it to control the device using HomeBridge. If you go to the Apple Home app, you can also control your Tuya device using Apple HomeKit

How to use Tuya HomeBridge web plugin to control Tuya devices in Apple HomeKit

First, you have to install the official Tuya Homebridge plugin. You can use HomeBridge or HOOBS to integrate Tuya Smart Devices with HomeKit. Here are the two easy ways.

Configuration by simply using Tuya email Credentials

You can control your Tuya smart devices with your HomeKit simply using Tuya email credentials. But you cannot control your Tuya device locally. You need to have an internet connection for that.

How to configure this plugin

Take the following steps to integrate your Tuya devices

Steps 01: Firstly, go to the HomeBridge and then plugin. After you can search HomeBridge-tuya-web plugin (You can go to the Tuya web and then copy the header of the plugin (HomeBridge-tuya-web) then paste it here)

Step 02: Install the HomeBridge Tuya plugin. After a few seconds, you'll see TuyaWebPlatform.

Step 03: Next, you have to put in your email credentials. (Username, Password, Country code, platform). There are three platforms — Tuya App, Smart Life App, Genevo Smart App). Don’t change other settings and click the save button.

Step 4: Restart your Homebridge now and click on accessories. Now, you can see your device over here. After click on it, your smart device will be turned on (we can control this device using the internet connectivity between the plugin and Tuya’s cloud ).

It uses your email credential and need to have an active internet connection. Now, you can now control devices with your HomeKit. If you go through the plugin configuration, you can even expose many device types into this plugin.

Tuya development configuration

HomeBridge Developing team is actively supporting the Homebridge community. You can easily expose to Apple HomeKit using this method.

How to configure the Tuya development plugin — Steps

You can see the official plugin and supported device type on the Tuya HomeBridge development page. (Small Home Appliances, Security and sensors, Electrician category, Lighting).

You can go to GitHub page to open up an issue and they actively resolve your problem. They are a very active community to configure this plugin

Step 1: As the previous installation of the plugin, you can install this Tuya HomeBridge Plugin. (Copy the header of the plugin- go to the HomeBridge and Tuya-Platform). Then you want to go to HomeBridge plugins. Click install and it takes a few seconds. Once the plugin is installed, you have to fill settings of the HomeBridge tuya platform. (Username, password, country code, Access id, Access key).

Step 2: You can go to iOT.Tuya.com to get other information. And now go to the cloud development tab

Step 3: Then, create a new project (fill and create), and authorize to follow API services device log and notification.

Step 4: Next, You want to go to the Devices tab, and then link Tuya app account

Step 5: Open up Tuya smart app on your smartphone, and click your profile. After then, click on the scan account and scan the account here. Next, confirm login, and let’s go to the Devices tab

Step 6: Now, you'll see the devices that you have installed.

Step 7: You need the access ID for this plugin, so, go to IoT Tuya Platform and go to the overview tab

Step 9: Then you'll see the Activation key, copy this Activation key, and paste it here.

Step 10: Select platform as Tuya smart and click on save. You want to click on restart bridge once it saved

Step 11: Go to accessories once the plugins are loaded, then you can see your device over here. you can control your Tuya smart device using HomeBridge or Apple Home App

Comments / 0

Published by

Technical Writer, SEO Strategist, and Freelancer

Los Banos, CA
1052 followers

More from Ishara Fernando

Comments / 0