0x5e / homebridge-tuya-platform

Make homebridge-tuya-platform great again.
MIT License
222 stars 67 forks source link

Login Failed #164

Open deboy69 opened 1 year ago

deboy69 commented 1 year ago

Describe the bug Login failed. code=1106, msg=permission deny [12/19/2022, 8:50:43 AM] [@0x5e/homebridge-tuya-platform] Please make sure your countryCode, username, password, appSchema is correct, and app account is linked with cloud project.

Following debug area that isnt correct. body = { "country_code": 1, "username": "example@example.com", "password": "Not my password", is this area salted? "schema": "tuyaSmart"

Expected behavior Login

Screenshots If applicable, add screenshots to help explain your problem.

Device info If the issue is related to a device, please provide the device info list and debug logs.

0x5e commented 1 year ago

Yes the password is salted. If you confirm you information is correct, please submit a ticket on https://service.console.tuya.com/

my99svt commented 1 year ago

Di you submit a ticket on this? Mine is doing the exact same thing.

0x5e commented 1 year ago

the API error don't have any useful information, and wrong countryCode/username/password/appSchema maybe is just one of the failure reason. I think submit the ticket by everyone is the best solution because I remember some people submited, and problem solved without any change from user-side.

deboy69 commented 1 year ago

Support had me change the password. I had to do it twice. Had to limit the complexity and length for it to work.

my99svt commented 1 year ago

I switched from using the Tuya Smart app to the Smart Life app and everything worked perfectly.

floperrot44 commented 1 year ago

Same problem on my side. I've checked dozen of times all informations. I use "smartlife" as appSchema because it's a smart Life app login and devices. My user is linked to my devices with full permissions (Tuy App Account). The country code is the right one... No any other information in DEBUG mode.

I think there is a pb on Tuya Platform. I've created a ticket on tuya pt. Keep in touch

grelca commented 1 year ago

i'm getting this same error message as well

i'm not totally clear on what username and password i should be providing in the config

i've tried:

none of them worked

0x5e commented 1 year ago

i'm getting this same error message as well

i'm not totally clear on what username and password i should be providing in the config

i've tried:

  • app username/password

  • tuya iot username/password

  • username/password for a user i created in the cloud project

none of them worked

it's app username. if not working, need to submit a ticket let the staff to process.

floperrot44 commented 1 year ago

The support team has just replied to test the same password with smartlife app. Anyway this is working... I have just a doubt about the password encryption : "password is MD5 encrypted 32-bit lowercase letters" So i'm trying to reproduce the login API call with postman. The sign field is so tricky !! (multiple concat of strings) Do you have some out of the box js function to generate it ? Thanks!

0x5e commented 1 year ago

@floperrot44 you can use https://iot.tuya.com/cloud/explorer to debug api, no need to calculate sign by your self. Someone just update to a simple password then it's working, I'm not sure if update password works, or update a simple password works. Can you have a try?