core: Tuya Integration failing with Invalid authentication

The problem

I am having an issue getting the Tuya integration to work. I can’t seem to get the integration to accept my credentials.

I enter in my username, password, country code (353 - Ireland) and select tuya as app option and I just get “Invalid authentication”. I can’t see anything in the logs that might hint at the cause. I am successfully able to log into the Tuya portal as well as the phone app.

Additionally i have changed my password to be easier as that was one of the suggestions on the forums https://community.home-assistant.io/t/tuya-integration-setup-failure-invalid-authentication/216592

Environment

  • Home Assistant Core release with the issue: Home Assistant 0.113.3
  • Last working Home Assistant Core release (if known): N\A -brand new installation
  • Operating environment (OS/Container/Supervised/Core): Container running on Synology NAS
  • Integration causing this issue: Tuya Integration
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/tuya

Problem-relevant configuration.yaml

Not using settings from configuration.yaml just the UI portal for configuration


Traceback/Error logs

Not seeing any failure in logs even when switch to debug


Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 57 (9 by maintainers)

Most upvoted comments

I don’t have dots in my email and it doesn’t work

You must try setup a mobile phone number first and after use this as the username.

To setup that go to: Me / More Services / Mobile Notification (or SMS notification) on Smart Life App or Tuya App. I don’t even see even such option…

I think I know the workaround for the issue. I also have an account on gmail. Usually when I use it it contains dots before @ i.e. xxx.yyy.zzz@gmail.com. You can create an account like that in the Tuya/Smart Life app but in the Home Assistant integration login with such email fails.

As gmail will deliver e-mails with or without dots to the same account I’ve created new account on Tuya app without dots like xxxyyyzzz@gmail.com. And I was able to successfully authenticate in Home Assistant Tuya integration.

In my case having the account linked to my google account was the problem. Create a new account using a google account, didn’t work. Create a new account with an email address and password without linking it to anything else and it worked.

You must try setup a mobile phone number first and after use this as the username.

To setup that go to: Me / More Services / Mobile Notification (or SMS notification) on Smart Life App or Tuya App.

this is still not working properly

Hello, have the same Problem using a fresh install of HA 0.118.5. Nothing is done yet.

Have an Smart Life account like misei[…]97@gmail.com With an simple password.

Used the integration with tuya. Got my Country code (mine is 49 - Germany) Getting the same error messages, hope someone will help me out 😃

Edit1: After add sms notification in SmartLife app i can use my phone number as username. In smartlife, it show my username like this : 49-01XXXXXXXX. In HA, i use 01XXXXXXXX and 49 as country code and it still doesnt work…

Edit2: It was possible in the mobile App. Im not asking why and how, it just works.

Ok so it took me quite some time to figure this out, here’s what solved it for me.

In Sweden where I am the app Nedis SmartLife (by NEDIS) is promoted as the app to use. By coincidence I found that there is another app called Smart Life (by Tuya Inc.) which is the app you have to register and use for the integration in Home Assistant to work.

image

Steps I did to resolve my issue

  1. Downloaded Smart Life by Tuya Inc. from Google Play Store
  2. Registered new account using my email (gmail in my case) (I did not login with my google account SSO)
  3. Reset my light and connected it to the app
  4. Added the Tuya integration through the HA GUI, entered my email as username and password I set. (including special characters). Set my country code (46) and chose “Smart Life” as platform.

Worked right away.

So my theory is that “Nedis SmartLife” is not the same as “Smart Life” referred to in the Home Assistant Tuya integration setup.

I hope this can help others like myself who searched and searched for a solution. If others can confirm this is correct then the documentation should be updated to help new users.