tuya / tuya-home-assistant

Home Assistant integration for controlling Powered by Tuya (PBT) devices using Tuya Open API, maintained by the Home Assistant Community and Tuya Developer Team.
MIT License
882 stars 207 forks source link

1106 Error - UK/Europe Data Zone issue? #663

Open pnichols77 opened 3 years ago

pnichols77 commented 3 years ago

Describe the bug I receive a 1106 Permission Denied error when trying to set the integration up. It had previously worked.

Expected behavior Ability to connect my Tuya account and devices to Home Assistant.

Home Assistant Version

Additional context I'm in the UK and have been using the official Tuya integration - the new one where you need a dev account. That was working fine until this morning when the integration showed an error.

I tried restarting with no luck, then removed it and readded. After sticking in the info I kept getting '1106 permission denied' - which is normally a bad password, though I triple checked it was correct.

So I decided to follow the config steps and at the point where I have to link it to my Tuya app by scanning the QR code, my app reports the error:

You cannot scan the QR code to add a device deployed in another data centre.

When I've looked into error 1106 further it seems it can also mean this:

Incorrect availability zone: See Availibity Zone and select the correct availability zone.

I also note this warning on the Tuya dev web page:

Please note that data transfer across regions has a risk of violation of the data security regulations. If you request Tuya's cloud services from an IP address outside the data center region, you are at risk of illegally transferring data. For example, using an IP address in the U.S.A. to access cloud services in China's data centers will be regarded as data transfer across regions, and vice versa. Tuya will completely prohibit cross-region API calls and message subscriptions. Please deploy your cloud services properly to ensure data security.

Are people in the UK now barred from using the Western Europe data centre?

Ive only noticed this since updating to 2021.11 this morning - not sure if this is a coincidence.

renaudallard commented 3 years ago

Seems possibly related to https://github.com/tuya/tuya-home-assistant/issues/635 https://github.com/tuya/tuya-home-assistant/issues/663 https://github.com/tuya/tuya-home-assistant/issues/662 https://github.com/home-assistant/core/issues/57864

pnichols77 commented 3 years ago

After changing my project to 'Central Europe' (despite being somewhere as West as Europe gets) I can now scan the QR code to link my account, but even with these new details I get the1106 error in HA.

smokedropp23 commented 3 years ago

same here , error 1106

chrise86 commented 3 years ago

Same here, been pissing me off all day. Glad it's not just me, seems like an actual issue.

renaudallard commented 3 years ago

It even seems the behaviour is different if you enable "Cloud Authorization IP Allowlist" with your IP or not. Though, none of them work. So far, the only answer I got from tuya support is

Tuya engineer11-04 12:59:00 We recommend turning off the whitelist function under the overview of cloud development projects to ensure that the whitelist is not turned on."

drax-uk commented 3 years ago

same issue here

humptydumptyhaoz commented 3 years ago

same here.after upgrading to latest HA version. (from malaysia)

zlinoliver commented 3 years ago

Sorry for the inconvenience, we have found the cause of the 1106 error, it's related to the Tuya Smart/ Smart Life account password validation, not related to the 2021.11 HA version. We will fix it ASAP.

smokedropp23 commented 3 years ago

it works for me after reset password of tuya app account , reinstall in ha works now

Rodger13Dodger commented 3 years ago

it works for me after reset password of tuya app account , reinstall in ha works now

I can fortunately second that.

renaudallard commented 3 years ago

it works for me after reset password of tuya app account , reinstall in ha works now

I can fortunately second that.

Unfortunately I can't I changed my password in tuya app, and the password in tuya iot web account, but that doesn't change anything.

drax-uk commented 3 years ago

Works now, changed the password. had to reinstall the integration.

chrise86 commented 3 years ago

Works now, changed the password. had to reinstall the integration.

@dracula385 can you clarify what you mean here please? You removed the plugin and re-installed? Shouldn't changing the config trigger a restart and rediscovery anyway?

chrise86 commented 3 years ago

Sorry for the inconvenience, we have found the cause of the 1106 error, it's related to the Tuya Smart/ Smart Life account password validation, not related to the 2021.11 HA version. We will fix it ASAP.

Any indication as to when this will be fixed? Seems like a pretty major bug to still have open.

Brouwertje commented 3 years ago

Delete integration > Change Tuya app password (not iOT account) > restart HA > Add Tuya.

drax-uk commented 3 years ago

Delete integration > Change Tuya app password (not iOT account) > restart HA > Add Tuya.

Yes exactly what I did and it started to work.

humptydumptyhaoz commented 3 years ago

Delete integration > Change Tuya app password (not iOT account) > restart HA > Add Tuya.

This works perfectly. Thanks guys

Cippo2019 commented 3 years ago

Same for me. Deleted integration, re-associate app into tuya iot project and re-add tuya integration in HA. So in my case no need to change any password. The only bad thing is this happens every time you restart HA, so we need wait for bug fix :-)

renaudallard commented 3 years ago

No amount of restart/change pass, delete and put back the app link works.

I got a reply from tuya helpdesk telling me:

Hello, I checked the request log, the headers did not carry Client_id.

renaudallard commented 3 years ago

I am wondering something. Does the email in tuya app need to be the same as the tuya iot email?

Brouwertje commented 3 years ago

I am wondering something. Does the email in tuya app need to be the same as the tuya iot email?

No, that does not matter. Login with your tuya app credentials in HA

renaudallard commented 3 years ago

OK, I finally got it to work. I had to change my password in tuya app for a password without any special characters, only letters and numbers.

drax-uk commented 3 years ago

Works now, changed the password. had to reinstall the integration.

I am getting the same issue after few days. Anybody else getting the same issue repeatedly even with reinstalling integration and changing password?

Barsonax commented 2 years ago

I still get this error even with a short password (8 chars) and only letters and numbers

chrise86 commented 2 years ago

I'm back to this after reinstalling. Tried changing the password just incase but that didn't work. Waiting for support to get back to me, not that it helped last time, but I'm fully out of ideas...

Vincent-Brazil commented 1 year ago

I'm getting a "don't have access to this API" now