Tuya Integration setup failure - Invalid authentication

I figured out that it only has problem with @gmail.com e-mail address for some reason. With hotmail.com and my country code works like a charm.

I tried every suggestion. nothing worked.

I do not use hotmail or gmail. normal email account and project setup correctly. devices show in the tuya iot platform. And I am able to see them in the app also. Incl. the tuya iot integration.

tried both entering the access id and secret manually and copy/paste.

seems like the integration is broken

3 Likes

Same shit here since long ago, one update and was no working anymore, updated to V2 via hacs and tried anything and bored of it now.

Good luck

Hi,
I just solve the error with Tuya V2 Integration validation with one change in a file.
The problem is that in the file ‘config_flow.py’ (inside custom/components/tuya_v2) there ir this constant:
TUYA_ENDPOINT_OTHER = “https openapi tuyaaus com”
For that, it only admit if you are register in China or Australia.
Changing that for the correct endpoint, it works after a system restart.

I found the endpoint here: https:// github.com /tuya /tuya-home-assistant/ blob /main /docs/regions_dataCenters.md

I found this solve in this thread: ( [zlinoliver] commented on 22 Oct

2 Likes

This solution worked for me with country code 46.

Thank you for sharing, this is the solution, I changed the URL to the Data Centre I am using and I could authenticate.

I was also having the same issue. It looks like an old or partial install of Tuya 2.0 was present. I fixed it by going in to the file editor, finding the sub folder tuya_v2 in the custom components folder and renaming it a xtuya_v2. I then restarted HA.

After the restart I then did an add integration of tuya v2 and it worked!!!

Bless you man, that worked for me too. Thank you

Hi,
Until I had to log in to say thanks.

Damn how much time I spent solving this and it’s so trivial. THANK YOU VERY MUCH!!!