athombv / com.tuya

Tuya app for Homey
https://homey.app/a/com.tuya
15 stars 11 forks source link

Cant connect with oauth #54

Closed ricardovanlaarhoven closed 1 month ago

ricardovanlaarhoven commented 1 month ago

When trying to connect via the android app, nothing happens after you see the honey message to close the browser, just after tuya redirects you there.

When i do the same thing, via the webapp, i'm getting the message oauth client already exists.

I already checked my app and see under account and security -> cloud development project -> homey

When removing that and trying it again, the same thing happens.

crazzyyfool commented 1 month ago

I have the same issue.

bobvandevijver commented 1 month ago

Please make sure to restart the Tuya app or your Homey and then try again using https://my.homey.app. If you get the same message and you do not have too many Tuya devices linked with Homey yet, you can try to reinstall the app.

ks2018ks commented 1 month ago

I have the same problem: Tuya App version 1.1.0 Homey app version 8.3.0.1518 Homey pro 2023 12.0.0

Select devices > new device > Tuya > Other > Connect > Conitnue > Login > enter Tuya Smart email > agree to terms of service > Next step > Slide jigsaw puzzle > Tuya Smart > Next step > enter password > agree to terms of service > log in > Slide jigsaw puzzle > Confirm authorization > "You can now close this window" > Close window and Homey app shows "Login with your account" + one of the following:

  1. Spinning icon with 'Please login on the website of the manufacturer '
  2. Blank
  3. OAuth already <disappears too fast to read the full message

Tried: Restarting Tuya app Restarting Homey app Rebooting Homey, Rebooting Phone Reinstalling Tuya app

None of the above makes any difference

bobvandevijver commented 1 month ago

@ks2018ks Did you try to authenticate using a browser on a laptop/desktop using https://my.homey.app? If not, please try that first.

Bossie53 commented 1 month ago

I still have the same issue.

ricardovanlaarhoven commented 1 month ago

@ks2018ks Did you try to authenticate using a browser on a laptop/desktop using https://my.homey.app? If not, please try that first.

On browser using a desktop, the popup disapears so fast, no error is visible. But it doesnt work either.

Bossie53 commented 1 month ago

The Smart Life app does indicate that it is connected to Homey.

But cannot add devices from Tuya in Homey.

You must then give access to the Smart life app again and again. So i think its the same problem as Ricardo?

Bossie53 commented 1 month ago

Works now. Remove app tuya from homey. Restart Homey. Install tuya app again and follow installation steps again. Then it worked.

jorgenhs commented 1 month ago

Had same error "OAuth2 client already exists", followed steps above: Uninstall Tuya app Restart Homey Reinstall Tuya app. OAuth completes successfully.

However, now having problem where app says briefly "discovered new devices", then "could not install devices. Took too much time" (paraphrased from Norwegian error message)

After this happens, the OAuth problem reappears, and I have to reinstall the app again. 😬 (It doesn't seem that the Tuya app correctly retains the OAuth token...)

Will pursue that new problem in a separate issue.

ricardovanlaarhoven commented 1 month ago

The same actions i did before, do now work :)