Tuya Official Home Assistant Integration on Github now!

As it’s said in the tutorial, it’s free, not need to pay to use it: https://developer.tuya.com/en/docs/iot/Home_Assistant_Integration?id=Kamcjcbvk2mu8

Q: Will I be billed after the 1-year free trial of the API product expires?

A: After expiration, you can renew the subscription for free. The Trial Edition allows you to use all free API products but puts limits on the quota of API calls. For more information about the quota, see the Pricing.

ok, joining and testing… hoping trial remains free… but could have been called “free plan” …

i subscribe the petition for a offline fallback +1 … i understand you have to make money on plans but the fallback can stay on 24h just in case of a severe internet downtime and then use default behaviour… i should be able to choose what to do: imagine a radiathor or a fridge connected to a plug. thanks.

so… done… test plug is working, integration easy to use… but, energy monitoring entity is missing

1 Like

using the api explorer is easy to read energy values, so we have just to wait an integration update or build our sensors… very nice

1 Like

@Oleok @zlinoliver I’ve been trying to use this integration for hours with no success. I bought myself a portable AC unit which uses tuya, it works with Tuya Smart app. Made a tuya-iot account, created a paas project, paired my tuya account to it, i can see the device listed on the project as well. Then i startup the integration, put all the data in - and all I get is “Invalid authentication”. Both my tuya and tuya-iot accounts use the same username and password, both are in the USA. I have no idea what’s wrong, but I would very much like to make it work. Do I contact devops or what? I see on github I’m not the only one with this problem, but there’s absolutely no debugging data to be seen

After some wrestling i managed to get some debugging info out

TuyaConfigFlow.async_step_user start, is_import= None
TuyaConfigFlow.async_step_user start, is_import= {'password': 'CENSORED', 'endpoint': 'https://openapi.tuyaus.com', 'access_id': 'CENSORED', 'access_secret': 'CENSORED', 'tuya_app_type': 'tuyaSmart', 'country_code': '1', 'username': 'CENSORED}
TuyaConfigFlow._try_login start, user_input: {'password': 'CENSORED', 'endpoint': 'https://openapi.tuyaus.com', 'access_id': 'CENSORED', 'access_secret': 'CENSORED', 'tuya_app_type': 'tuyaSmart', 'country_code': '1', 'username': 'CENSORED', 'tuya_project_type': 0}
[tuya-openapi] Request: method = POST, url = https://openapi.tuyaus.com/v1.0/iot-01/associated-users/actions/authorized-login, params = None, body = {'username': 'CENSORED', 'password': 'CENSORED', 'country_code': '1', 'schema': 'tuyaSmart'}, headers = {'client_id': 'CENSORED', 'sign': '970A1A2A605618C9C24011301CA5C22B472B36F61105512173734BDF94EA7898', 'sign_method': 'HMAC-SHA256', 'access_token': '', 't': '1624477851121', 'lang': 'en', 'dev_lang': 'python', 'dev_version': '0.2.2', 'dev_channel': 'hass'}
[tuya-openapi] Response: {
  "code": 2406,
  "msg": "skill id invalid",
  "success": false,
  "t": 1624477851701
}


Pls see the FAQ for trouble shooting
How to use Tuya Official Integration

You are welcomed to feedback to [email protected]

Yes, I’ve seen this, and I’ve got those points covered, because as I’ve said:
I created the project yesterday
I can see my AC unit in the project
I am entering my credentials correctly


My region is set to Australia but its not available to choose in the integration. Is it possible to add Australia?

1 Like

Same issue - Region set to Australia not available to choose in the integration. Authentication fails.

After poking around in the Tuya IOT platform I worked out that my devices show up under the “Europe” availability zone. I still can’t successfully auth using this zone though.

Hi @PMaksymiuk , for the “msg”:“skill id invalid” log, please double check the following two procedures:

  1. Make sure your cloud project is created after May 25, 2021
  2. Make sure you have linked your Tuya Smart or Smart Life app account with your cloud project to link the devices
  3. Make sure you have select the correct availability zone associated with your Tuya Smart or Smart Life App account’s location. Normally, recommend select “America” and “Europe” for availability zone. if you cannot find your linked devices in the device list section, please try select more availability zone to cover your app account’s location.

Hope this help.

If you set your region to Australia in the Tuya Smart App or Smart Life App account, please select “America” as the availability zone in the cloud project’s setting.

Make sure you can get the linked devices in the “Device List” section of the IoT Platform.

No, I’ve already posted above you that none of these help

I just want to clarify here that the word “official” means that Tuya maintains it. It’s not an official Home Assistant integration as it is a custom component and has not been added to the Home Assistant core repository.

It would be great if it was added to Home Assistant. I have added an issue to track it: Contribute this integration to Home Assistant? · Issue #22 · tuya/tuya-home-assistant · GitHub

1 Like

Attempted the migration method, and it fails. Anything I enter in a new project is rejected. Error only says “会员过期”

I tried to translate it and it means the membership has expired

I eventually figured that out. Didn’t help, because there’s no way to renew. Errors out with yet another error. I give up.

I also get the “Invalid authentication” error when adding the integration in HA.
I have followed the instructions and prerequisites and I’ve read the FAQ about this error to no avail.
I’ve come to the point where I’m out of ideas.

I use the Smart life app. I have a project on the Tuya IoT platform and I’ve integrated it with Smart life and I’ve selected the APIs according to the instructions. I can see my Tuya devices in my Tuya IoT platform project. I can also see in the Smart life app that it’s successfully linked to my cloud project. I enter my Access ID and Access Secret from my project, and my Smart life email and password. I copy and paste everything so there are no typing errors. Yet all I get is the “Invalid authentication” error.

The only two fields I’m unsure of are the Region and Country Code, and I’m not sure then matter for the authentication part? The instructions for Region tells me to enter the region as set in the Smart life App. But the app has a country, not a region. Anyway, selecting Europe or WesternEurope (where my country is) does not make any difference. The other field, “Country Code” is also a bit of a mystery. The field is called Country Code but the instructions says country. Anyway, I’ve tried all combinations of country codes and country names.

It would be nice to see some details in the error message, e.g. is it the Access ID/Secret that is incorrcet, or the app credentials? (Why do we even have to give the App credentials to HA, aren’t the Tuya devices supposed to be controlled via the Tuya IoT Platform which in turn is linked to the App and therefore have access to the Tuya devices?)

Any ideas?

You have not tried to enter the phone code for your country as the country code. For the Czech Republic, for example, it is 420.
I see you tried the country code called. I’m sorry I missed it.