home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.7k stars 28.85k forks source link

Tuya re-authorization problem . #120644

Open motogon opened 4 days ago

motogon commented 4 days ago

The problem

Tuya app gives an error QR expired. Refresh it and scan again.

I have reloaded the integration but QR code is not updated

What version of Home Assistant Core has the issue?

core-2024.6.4

What was the last working version of Home Assistant Core?

--

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Tuya

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tuya

Diagnostics information

home-assistant_tuya_2024-06-27T07-41-03.302Z.log.zip

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 4 days ago

Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `tuya` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign tuya` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tuya documentation tuya source (message by IssueLinks)

arjanhs commented 4 days ago

Having the same issue, after reauthentication all is fine but directly given the same message again.

Neodymium60 commented 4 days ago

Same here

GraemeDBlue commented 4 days ago

mine wont let me re-authenticate, keeps telling me the QR code has expired, lost access to @ 20 devices now :-(

GraemeDBlue commented 4 days ago

ok after about 10 attempts it did let me in so not a complete train smash

motogon commented 4 days ago

rebooting HA does not solve the problem

robbie-brender commented 4 days ago

same occurring for me. mine authenticates, but the devices dont work, if i go reload the integration, it then tells me i need to re-authenticate again.

DanBar1971 commented 4 days ago

Same here

GraemeDBlue commented 4 days ago

seems to also be affecting my Tuya Local devices, wont let me log in to reconfigure them

motogon commented 4 days ago

ok after about 10 attempts it did let me in so not a complete train smash

I tried 10 times, then 10 more times - no luck. The result is the same - the code is not accepted. It seems to be a problem with qr code generation - once generated and after it is shown once, with any number of requests.

GraemeDBlue commented 4 days ago

ok it worked for a few minutes and now says it needs reconfig and now tell me to reconfigure again with Config flow could not be loaded: {"message":"Invalid flow specified"}

hddmax commented 4 days ago

same as here

GraemeDBlue commented 4 days ago

well I guess I need to replace all these last few Tuya devices sooner rather than later, only the few that i converted to Tuya local are still working and cant convert the rest now until this issue is resolved

motogon commented 4 days ago

well I guess I need to replace all these last few Tuya devices sooner rather than later, only the few that i converted to Tuya local are still working and cant convert the rest now until this issue is resolved

I also think that it is time to start moving to a local solution and abandoning the Tuya cloud - because this solution is clearly degenerating

me217 commented 4 days ago

I am having the same issue, and i have so many tuya devices currently :( luckily most are local.

sebmack commented 4 days ago

I restarted my Home Assistant box and it worked properly.

GraemeDBlue commented 4 days ago

I restarted my Home Assistant box and it worked properly.

Tried and it worked for a minute then complained again

DaHype commented 4 days ago

Same here. I have currently 102 Tuya Devices. Because so much work, only till now 10 devices Tuya Local. Hope they will fix it soon :-(

acs-lux commented 3 days ago

Tuya may have changed the API. I have same issue but the SmartLife app still works. Sadly, I had migrated to official Tuya Addon from Local Tuya ages ago since it worked so well so now I have no Tuya as it seems i can't revert.

Logger: homeassistant.config_entries Source: config_entries.py:622 First occurred: 1:58:18 PM (2 occurrences) Last logged: 1:59:54 PM

Config entry 'xxxx@xx.xx' for tuya integration could not authenticate: Authentication failed. Please re-authenticate

Nothing else in the logs

AlexVelky commented 3 days ago

same here, multiple reconfiguration attempts, problem is always back after integration reload, restart of HA didn't help, maybe issue or some changes on tuya side?

peregrines2 commented 3 days ago

Same here :( 104 devices completely useless :( :( :(

GraemeDBlue commented 3 days ago

so I've discovered if I reload the integration and ignore the warning about re configuring, my Tuya devices will work , but I can't add any new devices or move more to tuya local atm

NikDevx commented 3 days ago

Same for me Tuya won't re-authenticate

acs-lux commented 3 days ago

I deleted Tuya then added it again. So far so good. Its all working. Hopefully it stays that way.

hddmax commented 3 days ago

Try to reauthenticate in Tuya Developer integration an check the valid time , it works for me after i extend the periode

roelvandermade commented 3 days ago

Try to reauthenticate in Tuya Developer integration an check the valid time , it works for me after i extend the periode

I think exactly this indeed (still they must've changed something), think you only need the IoT Core.

Screenshot 2024-06-27 at 19 56 41
LuSkOb commented 3 days ago

Tuay keeps wanting reauthorization. It will happen with me, everything is fine for a while, but within an hour she wants reauthorization again.

PlayFaster commented 3 days ago

I tried the Extend the Authorized period of the IoT Core Service on the Tuya Developer Platform, and while it seemed to work after one restart, the issue returned after a further restart, so did not work for me.

roelvandermade commented 3 days ago

I tried the Extend the Authorized period of the IoT Core Service on the Tuya Developer Platform, and while it seemed to work after one restart, the issue returned after a further restart, so did not work for me.

ok well that's weird, I also did a restart and also a forced-reload of the integration but it keeps working for me (for now). No clue for your case..

EdSpatariu commented 3 days ago

Same issue here. Asking to re-authenticate every couple of minutes. Reboot HA not working, delete integration and add it back -> not working. I am thinking seriously about changing all my twenty devices and 66 entities to localtuya. I have 5 separate devices (smart plugs) added on localtuya, to not depend on the internet and must turn them on/off. Why the hack is this integration called "official" if it is not working with Tuya???

AlexVelky commented 3 days ago

Try to reauthenticate in Tuya Developer integration an check the valid time , it works for me after i extend the periode

I think exactly this indeed (still they must've changed something), think you only need the IoT Core.

Screenshot 2024-06-27 at 19 56 41

this was also solution for me, thanks

EdSpatariu commented 3 days ago

Same issue here. Asking to re-authenticate every couple of minutes. Reboot HA not working, delete integration and add it back -> not working. I am thinking seriously about changing all my twenty devices and 66 entities to localtuya. I have 5 separate devices (smart plugs) added on localtuya, to not depend on the internet and have to turn them on/off. Why the hack is this integration called "official" if it is not working with Tuya???

Re-authenticated (QRcode + scan on app) several times, it accepted the code verification, then asked again. It happened several times, see details (still happening)

2024-06-27 21:37:56.744 WARNING (MainThread) [homeassistant.config_entries] Config entry 'xxx@yyy.com' for tuya integration could not authenticate: Authentication failed. Please re-authenticate
2024-06-27 21:38:19.738 WARNING (MainThread) [homeassistant.config_entries] Config entry 'xxx@yyy.com' for tuya integration could not authenticate: Authentication failed. Please re-authenticate
2024-06-27 21:41:52.030 WARNING (MainThread) [homeassistant.config_entries] Config entry 'xxx@yyy.com' for tuya integration could not authenticate: Authentication failed. Please re-authenticate
2024-06-27 21:42:51.292 WARNING (MainThread) [homeassistant.config_entries] Config entry 'xxx@yyy.com' for tuya integration could not authenticate: Authentication failed. Please re-authenticate
2024-06-27 21:48:52.034 WARNING (MainThread) [homeassistant.config_entries] Config entry 'xxx@yyy.com' for tuya integration could not authenticate: Authentication failed. Please re-authenticate
EdSpatariu commented 3 days ago

Try to reauthenticate in Tuya Developer integration an check the valid time , it works for me after i extend the periode

I think exactly this indeed (still they must've changed something), think you only need the IoT Core.

Screenshot 2024-06-27 at 19 56 41

this was also solution for me, thanks

It is not asking for reauthentication each minute, did reboots and keeping an eye on it.

This is what has been changed: image Ref: https://www.tuya.com/vas/commodity/IOT_CORE_V2

They want more money. Most probably all of us will migrate to localtuya or other not cloud related integrations as we should do since day one.

NikDevx commented 3 days ago

Try to reauthenticate in Tuya Developer integration an check the valid time , it works for me after i extend the periode

I think exactly this indeed (still they must've changed something), think you only need the IoT Core.

Screenshot 2024-06-27 at 19 56 41

Problem in HA core for Tuya, not with Tuya ioT APi

I was migrate to HA v. 2024.1.0 (where no QR code authentication) and everything work correct.

EdSpatariu commented 3 days ago

Try to reauthenticate in Tuya Developer integration an check the valid time , it works for me after i extend the periode

I think exactly this indeed (still they must've changed something), think you only need the IoT Core.

Screenshot 2024-06-27 at 19 56 41

Problem in HA core for Tuya, not with Tuya ioT APi

I was migrate to HA v. 2024.1.0 (where no QR code authentication) and everything work correct.

Or could be the number of "controllable" devices

image

Moving some of them to localtuya and will let you know

NikDevx commented 3 days ago

Try to reauthenticate in Tuya Developer integration an check the valid time , it works for me after i extend the periode

I think exactly this indeed (still they must've changed something), think you only need the IoT Core.

Screenshot 2024-06-27 at 19 56 41

Problem in HA core for Tuya, not with Tuya ioT APi I was migrate to HA v. 2024.1.0 (where no QR code authentication) and everything work correct.

Or could be the number of "controllable" devices

image

Moving some of them to localtuya and will let you know

I have 287 devices and all devices now working good. After I was migrate to HA 2024.1.0

bernardofortes commented 3 days ago

Just as FYI.... I've tried downgrading to HA Core 2024.6.3 (from a backup from last week which was working).

Issue remains.

Tried SEVERAL times to reconnect to the official TUYA integration from HA.

applegeeks commented 3 days ago

ok after about 10 attempts it did let me in so not a complete train smash

this is what I did too. I just kept re-authenticating and eventually succeeded and stable since. Even after a restart, working without any issues now.

I believe the issue lies with the Tuya Cloud platform itself, they must be doing some upgrade or encountering some api re-try issues. Not an uncommon problem but I do wish Tuya would have a cloud status page indicating any existing/reported problem so that end users aren't pulling their hairs out trying to understand where the issue is.

EdSpatariu commented 3 days ago

Moved two devices to localtuya => controllable devices pool decreased to 9, still the same issue. downgraded to 2024.5.5 => still the same issue. But I have another big problem: all my records, scenarios, automation, disappeared. So, downgrading should be for an incredibly good reason to justify data loss! For sure, there is an issue with Tuya API.

JarreNejatyab commented 3 days ago

I have same issue, reAuthenticating , the Tuya integration is not working today.

trav13k commented 3 days ago

Issue appears to be resolved for me. I had to Re-Configure approximately 5 times with a page refresh and re-login between each for it to work

EdSpatariu commented 3 days ago

ok after about 10 attempts it did let me in so not a complete train smash

this is what I did too. I just kept re-authenticating and eventually succeeded and stable since. Even after a restart, working without any issues now.

I believe the issue lies with the Tuya Cloud platform itself, they must be doing some upgrade or encountering some api re-try issues. Not an uncommon problem but I do wish Tuya would have a cloud status page indicating any existing/reported problem so that end users aren't pulling their hairs out trying to understand where the issue is.

You are asking too much. We are talking about a Chinese company. Most probably if we are creating waves, someone from Chinese Communist Party (CCP) will visit us :) With $25000, some notifications could be sent. image

EdSpatariu commented 3 days ago

Issue appears to be resolved for me. I had to Re-Configure approximately 5 times with a page refresh and re-login between each for it to work

It will work until the next reboot. Same happened to me earlier today.

EdSpatariu commented 3 days ago

@tuya @zlinoliver @frenck what are your thoughts about this?

caitotheonlypotato commented 3 days ago

I have 158 devices :(

image

image

manuelcoders commented 3 days ago

I have same issue!

acs-lux commented 3 days ago

I deleted Tuya then added it again. So far so good. Its all working. Hopefully it stays that way.

Still working for me.

npa-homeassistant commented 3 days ago

I found that adding a new Hub made all of the devices re-appear and work. However, I was then left with the old one (with the same name) which is broken and an ongoing "Repair" notification which I can't resolve. I'm concerned about simply deleting it in case it also deletes the working one, as both have the same name.

gcmc629 commented 3 days ago

I restarted my Home Assistant box and it worked properly.

Tried and it worked for a minute then complained again

This worked for me, i disconnected power on the box, and then reauthenticated. so far it is working

Sir-Udo commented 3 days ago

Hi there, here the same problems, and the smartlive integration too.