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.72k stars 28.88k forks source link

Tuya re-authorization problem . #120644

Closed motogon closed 5 hours ago

motogon commented 6 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

NikDevx commented 5 days ago

@motogon

SOLUTION!!! I was migrate to HA v. 2024.1.0 (where no QR code authentication) and everything work correct more than 12 hours

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

odis68 commented 5 days ago

It doesn't work either. After a reboot or after an indefinite period of time, it requires authorization!!!

motogon commented 5 days ago

It is sad that HA developers are silent on this problem I checked integration of Tuya in homebridge - everything works fine there. Apparently the problem is in the HA integration

GraemeDBlue commented 5 days ago

Apparently the problem is in the HA integration

I think it must be the HA Tuya developer account, Tuya must have revoked the auth tokens

SaaX-IRL commented 5 days ago

Same issue here ("Authentication expired for . . .") but the devices are still reporting fine. Confused...

dengi76 commented 5 days ago

Hello, I have the same problem - after every reboot, re-authorization is required

danielbergholm commented 5 days ago

Same problem here.

Scoopien commented 5 days ago

Same problem!

bernardofortes commented 5 days ago

UPDATE: It's working again here. i've tried a few time to reauthenticate this morning and got the "QR expired". I've rebooted HA and it worked. Doesn't make sense to me, but its what happened.

dengi76 commented 5 days ago

ОБНОВЛЕНИЕ: Здесь все снова работает. Я несколько раз пытался повторно пройти аутентификацию сегодня утром и получил сообщение «QR истек». Я перезагрузил HA, и все заработало. Мне это не понятно, но вот что произошло.

Hello! Try rebooting HA and it will require authorization again

MathiasGIZ commented 5 days ago

Same here,

deleting, reinstalling, rebooting, reauthenticating, downgrading, nothing works stable.

One time, most of my over 100 devices worked again for half an hour, and then ... suddendeath!

Schepie commented 5 days ago

Same issue here. Hope this gets resolved soon.

jorgepicarraformacao commented 5 days ago

I have the same problem, i hope you solve the problem soon, please

rsmatias commented 5 days ago

Same here just a few minutes ago. Any info so far about root cause and when can this be solved? Thanks for all your support.

motogon commented 4 days ago

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

I also want to know what the developers think about this problem. thank you

pier-da commented 4 days ago

One more with a ... "Failed to set up: Authentication failed. Please re-authenticate" and scanning QR in app gives "The QR code has expired. Refresh and scan it again." Nothing works from suggestions above.

Nothing else to add as to the source of this issue, but might help to say that I use the new Tuya integration and Local Tuya. Currently Local Tuya working, it is only the cloud integration is not. Ironically, Local Tuya is the one that has been giving problems last few weeks, with devices going unavailable and only a full HA restart resolving. Now the cloud version?! Really makes the whole Tuya integration a non-runner as there is simply no stability to the availability of devices with either integration. Nice to learn this after recently setting up about two dozen devices.

motogon commented 4 days ago

2024.1.0

изображение

изображение

gcmc629 commented 4 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

worked for a few hours then stopped again.

ricardda commented 4 days ago

same here. after every desinstall/install, works for few minutes, then down. Now here a new message : : image

alfgomes commented 4 days ago

I having the same problem, after reauthentication.

Flatsher commented 4 days ago

Ja hier auch der selbe mist... seit ca. 2Tagen geht nichts mehr.... Tuya ade... wenn das jetzt nicht bald in den nächsten 2 Tagen behoben wird werde ich alle tuya Geräte entfernen oder kennt jemand eine möglichkeit die dinger zu flashen ? :-)

vehreschild commented 4 days ago

bei mir auch seit heute Nacht :-(

NikDevx commented 4 days ago

2024.1.0

изображение

изображение

Disable this tuya integration and add as a new one. Because HA 2024.1.0 have old authentication method.

idanuz commented 4 days ago

Same here. Found in logs: API call prompt { "code": 1004, "msg": "sign invalid"}

I tried almost everything, please assist. Thank you.

dakarx commented 4 days ago

Reloading integrations works for most devices, although the one I added today loads, but switches to unsupported after a few mins....but appears to be read-only while working reads battery state, but will not activate the device 'switch' (water timer).

richardvdo commented 4 days ago

Same here...

ItsChasman commented 4 days ago

Same here. Reinstalling fixes it, but then it repeats. You can wipe the integration and reload it/ Then get the security code from your account settings. Then, you get the new QR code, which you can scan from smart life or tuya app and confirm login. This seems to work, but within anything from 30 seconds to 10 minutes, it gives the same error. Then of course If you go to the QR code, it says it's old since you used it to set up. So you can keep doing that and restarting, etc., many times. Always the same.

EdSpatariu commented 4 days ago

I am curious, why @tuya @zlinoliver and @frenck go silent? I believe this is by far the most important issue that they are facing as the integration is not working anymore...

tdemarquay commented 4 days ago

Same here

gitTerracide commented 4 days ago

Same here. Re-authed like 4 or 5 times. Have given up now on tuya iot cloud. Thankfully my local tuya working well. I don't like my home coming to a halt when theres problems outside my home! Life should not be that complicated to rely on a distant datacentre to turn on your lights haha.

DaddyBear34 commented 4 days ago

same problem here :(

motogon commented 4 days ago

Disable this tuya integration and add as a new one. Because HA 2024.1.0 have old authentication method.

Thank you.

NikDevx commented 4 days ago

Disable this tuya integration and add as a new one. Because HA 2024.1.0 have old authentication method.

Thank you.

Does it work for you?

motogon commented 4 days ago

Does it work for you?

Yeah, it's working. How long it will work - I'll tell you :)

ps even statuses are now updated without forced cron updates.

zaabi811 commented 4 days ago

Disable this tuya integration and add as a new one. Because HA 2024.1.0 have old authentication method.

Thank you.

Does it work for you?

I tried and unfortunately it didn't work

motogon commented 4 days ago

I tried and unfortunately it didn't work

you added a new hub with new authorization ?

изображение

zaabi811 commented 4 days ago

I tried and unfortunately it didn't work

you added a new hub with new authorization ?

изображение

Screenshot_29-6-2024_135320

motogon commented 4 days ago

I tried and unfortunately it didn't work

used authorization data from platform.tuya.com. ++ your login password in tuya application ?

изображение

zaabi811 commented 4 days ago

I tried and unfortunately it didn't work

used authorization data from platform.tuya.com. ++ your login password in tuya application ?

In fact, I use the login data through the app because it is not possible to use the old method of logging in

applegeeks commented 4 days ago

I tried and unfortunately it didn't work

used authorization data from platform.tuya.com. ++ your login password in tuya application ?

изображение

Yeah. This is old skool. Assuming you are using an older version of HA where it uses the older tuya integration?

SimonJamesM commented 4 days ago

Same issue Restored a full backup to a new USB SSD, everything working fine except Tuya (and the 75 devices under that integration)

motogon commented 4 days ago

I tried and unfortunately it didn't work

Yeah. This is old skool. Assuming you are using an older version of HA where it uses the older tuya integration?

I had to go back to the version HA 2024.1.0 to get tuye working again.

motogon commented 4 days ago

Same issue Restored a full backup to a new USB SSD, everything working fine except Tuya (and the 75 devices under that integration)

Same issue Restored a full backup to a new USB SSD, everything working fine except Tuya (and the 75 devices under that integration)

problem with the latest tuya integration

AlexVelky commented 4 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?

so today it stopped working again, and reconfiguration not working at all, :( guess it really time to say bye bye to tuya, this is the most unreliable integration in HA environment,

pergolafabio commented 4 days ago

I think we can confirm that there is an issue, maybe stop responding untill a dev can tell us more?

NikDevx commented 4 days ago

Does it work for you?

Yeah, it's working. How long it will work - I'll tell you :)

ps even statuses are now updated without forced cron updates.

My tuya working around 35 hours 272 devices )

applegeeks commented 4 days ago

Does it work for you?

Yeah, it's working. How long it will work - I'll tell you :) ps even statuses are now updated without forced cron updates.

My tuya working around 35 hours 272 devices )

Same here. Working for 18hours now. However, I kept re-authenticating and reloading the integration like a mad man until it got to a loaded or working state. Rebooting my ha in between where the QR code expires.

It’s been working since yesterday and I dare not attempt to reboot or reload my ha. I’m sure it will stop working if I do and I gotta brute force authenticate/reload for a good few mins to get a working connection again.

I still suspect an api retry error from ha to tuya. We just aren’t seeing the metrics for it. :(

Teammie73 commented 4 days ago

Does it work for you?

Yeah, it's working. How long it will work - I'll tell you :) ps even statuses are now updated without forced cron updates.

My tuya working around 35 hours 272 devices )

Same here. Working for 18hours now. However, I kept re-authenticating and reloading the integration like a mad man until it got to a loaded or working state. Rebooting my ha in between where the QR code expires.

It’s been working since yesterday and I dare not attempt to reboot or reload my ha. I’m sure it will stop working if I do and I gotta brute force authenticate/reload for a good few mins to get a working connection again.

I still suspect an api retry error from ha to tuya. We just aren’t seeing the metrics for it. :(

Same for me . Yesterday morning after several attempts it kept working and this morning - the same as yesterday - integration not working. Authenticated several times, restarted when the code expired and finally i gave up. After another restart since now (6 hours its working) but I am sure tomorrow morning its the same problem..

peteS-UK commented 3 days ago

Not sure if this is just co-incidence, but I had the same problem, and intended to go onto the tuya iot site to extend my access. When I got to the site, I was presented with new T&C's, privacy statement etc. to accept, which I did. I then rebooted my HA and the re-authenticate QR code was accepted and I was able to log back in. I only have one use for the core Tuya integration (a scene for IR blaster) with everything else on Tuya Local, but it's nice that it's working again (for now at least).

caitotheonlypotato commented 3 days ago

Not sure if this is just co-incidence, but I had the same problem, and intended to go onto the tuya iot site to extend my access. When I got to the site, I was presented with new T&C's, privacy statement etc. to accept, which I did. I then rebooted my HA and the re-authenticate QR code was accepted and I was able to log back in. I only have one use for the core Tuya integration (a scene for IR blaster) with everything else on Tuya Local, but it's nice that it's working again (for now at least).

With the extension it appears to have a limitation on the number of controllable and readable devices.

a lot of users have more than 10 devices I guess

image