tuyapi: QR code has expired issue

Describe the bug Hello,

I’m having an issue where the tuya cloud provider fails when I try to connect to my smart life app. After scanning the code, I get this notification on my phone:

A(n) Unknown Device mobile phone has just logged in to this account. If this is not your activity, we recommend that you modify the login password immediately to protect your account.

And on the Tuya page, I get a “QR code has expired” error. Could I please get some insight for this?

To Reproduce Steps to reproduce the behavior:

  1. Create a new cloud app following steps in the readme
  2. Add an app SDK
  3. Try to add app account
  4. See error

Expected behavior I expect that there should be no error in connecting to the Tuya service

Debug Output N/A

Screenshots N/A

Desktop (please complete the following information):

  • OS: [e.g. macOS]
  • OS Version [e.g. 22]
  • Node Version [output of node -v]

Additional context Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 22 (2 by maintainers)

Most upvoted comments

Ah yes. At the time, I was using the wrong app. Tuya is a complicated, wild, fragmented ecosystem of many different products – and many look-alike apps that seem to work on the same data, yet somehow… don’t? So, grab another look-alike app and log in there, see if that one’s QR code works instead.

My conclusion was that my use-case was perfect for ditching Tuya completely, and hacking them with Tasmota firmware to “free” them from the wacky Tuya ecosystem. Now they work locally – and more accurately! (corrected the 30% energy-monitoring error) Using Home Assistant and Nabu Casa for remote control from my home server, instead of Tuya’s cloud.

App show “no access”. I turn on all permissions when creating new Cloud Project. And I cheched my region. All right. But app “tuya smart” and “smart life” show “no access” after scan QR-code. 2022-10-22 16-01-52 2022-10-22_16-11-46

Same here! This is so unbelievably frustrating - Tuya’s console is an absolute jungle for such a simple ask.

WHERE is this “home man(n)agement” option? “API groups”? What tab, what sub-tab, what sub-sub-sub tab? I’m pulling my hair out dealing with this “QR code has expired” issue (still a very valid issue - why doesn’t the setup guide say where to go?).

I am having the same issue as well. Where are is the “Home Mannagement” setting?

I am having the same issue now. Where did you find the “Home Management” setting?

Sounds good, I updated the setup instructions with the API groups.

It just magically worked for me now as well!

I had everything under API Groups enabled since two days ago, but it just worked for me. I’m wondering if there was something up on Tuya’s back-end preventing the app to register with the QR code. Just tried scanning again, and instead of the QR code showing expired, it showed a success message and my devices are now showing in the portal.

Hey guys @enz1ey @tommy21osu. I played around with the permissions and enabled Home Management and Device User Mangement for my app in the tuya cloud console. Let me know if that works for you

Did that fix it for you?