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.
Downloaded Smart Life by Tuya Inc. from Google Play Store
Registered new account using my email (gmail in my case) (I did not login with my google account SSO)
Reset my light and connected it to the app
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.
I might be a little late here, but I was having issues using a hotmail account for the email. Worked as soon as I switched the account to a gmail account
Something I have checked on code base and figured out that the integration doesn’t use the correct region url based on the country.
If you are desperately trying to connect your devices and you don’t have time to wait for the patch, Delete existing account in another country, create an account in country "United States"
I tried as well, but the option is not there in Tuya. :’( I’ve checked everything in the app. Changed my PW a couple of times. Changed my email. Tried my phone # but that doesn’t work either. No clue what to check next! But the option indicated above isn’t there.
I tried that. Set a password that was just uppercase, lowercase, and a number. Still getting the same thing. I get either “Invalid authentication” or “Aborted Failed to connect”. I’ve been fighting with this for several days now and it’s getting really irritating! Not sure if it’s an issue with Tuya, or with Home Assistant.
What is your country code? If you are trying with an account that has country other than USA, this must fail. Since there is a rate limiting from tuya, when you try second time in 1 minute, it gives “Failed to connect error”
Country code is 1 (USA/Canada). Only thing I have not tried yet is to delete my Tuya account and create a new one starting with my email address instead of using Google account. Found in the notes above where that resolved it for someone… I did change Tuya to use a different email account, and back again, as well, but that didn’t help. Just not excited about completely redoing my Tuya configuration at this point since I’ll likely be re-flashing all of my devices to Tasmota at some point anyway.
In fact, I may just say screw it, and re-flash all of the devices to Tasmota instead of messing with Tuya. I’d rather not be giving my activities up to a 3rd party to handle anyway… I’ve already flashed an extra 3-way that I have, with success. We’ll see. That’s even more work, but it will be done at some point. Between work and other necessities, I don’t have as much time as I’d like to mess with this.
Head over to you file editor and add this to your configuration.yaml. If your are already registered with either smartlife or tuya it should work.
tuya:
username: [email protected]
password: yourpassword
country_code: xx
Then go to configurations>Integrations>add integration>tuya
when you get to the tuya dialog box
re-enter your username that you entered in your configuration.yaml file and select the app that you registered in. For me it was smart life.
If you are experiencing that error with a linked Google account(SSO). Try creating a ‘regular’ new account just using your e-mail and setting a password. I did that and 1 minute after I could connect from my HA. I’m using SmartLife.
Still not able to complete authentication with the integration ui
Note, that I have LocalTuya installed as well. But it should not affect the login of the Tuya integration.
I have verified that my credentials are correct, and I can login to auth.tuya.com
If you use the Smart Life mobile app by Volcano Technology Limited,
in this app you can go to Profile > Setting -> About -> Download Log (maybe little wrong)
In the popup, you will find the “User Account” filed.
This field is what exactly you should use as username.
But for me, when registered with Google, this value was like gg-[many-many-numbers] and does not work with HA.
When registered with mail, it was like my@mail and working perfectly with HA.