tuya / tuya-homebridge

Homebridge custom plugin for controlling Powered by Tuya (PBT) devices in HomeKit. This plugin is officially maintained by the Tuya Developer Team.
MIT License
332 stars 168 forks source link

Unable to login - Debug mode says 1106 #368

Closed sreenath87 closed 4 months ago

sreenath87 commented 9 months ago

Seems like an API error where i am unable to login. This information is only available on Debug mode and does not reflect without Debug.

Initializing TuyaPlatform... TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"country_code":1,"username":"XXXX@gmail.com","password":"HASHEDPASSWORD","schema":"tuyaSmart"}, headers = {"t":"1696443643489","client_id":"XXXXXXX","nonce":"bac297b0-62e2-11ee-b39d-8d4f0e806963","Signature-Headers":"client_id","sign":"0A8674DC6696E798D610DDDC4C83C3A30E51A79FB95D108FB8B126AED55CFF9D","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"} [04/10/2023, 13:20:43] Homebridge v1.6.1 (HAP v0.11.1) (TuyaPlatform) is running on port 54476. TuyaOpenAPI response: {"code":1106,"msg":"permission deny","success":false,"t":1696443644251,"tid":"bb7288c562e211ee8b62ea7d43a7f458"} path = /v1.0/iot-01/associated-users/actions/authorized-login TypeError: Cannot destructure property 'access_token' of 'res.result' as it is undefined. at TuyaSHOpenAPI._refreshAccessTokenIfNeed (/var/lib/homebridge/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:49:11) at processTicksAndRejections (node:internal/process/task_queues:95:5) at TuyaSHOpenAPI.request (/var/lib/homebridge/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:145:7) at TuyaSHOpenAPI.getDevices (/var/lib/homebridge/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:63:15) at TuyaPlatform.initTuyaSDK (/var/lib/homebridge/node_modules/homebridge-tuya-platform/index.js:90:19) Attention⚠️ ⚠️ ⚠️ ! You get an error! Failed to get device information. Please check if the config.json is correct

github-actions[bot] commented 9 months ago

Thank you for your feedback, we will solve this issue soon

sreenath87 commented 9 months ago

upon further research it appears to be API with error code "Login error (1114): your ip(...) don't have access to this API" . Is there a different API that can be used ? I dont have Cloud IP restriction enabled. but still i get this error.

iRonin commented 7 months ago

Same issue here.

iRonin commented 7 months ago

Would you please add info to the README that Tuya app's password must be 11 characters or less and contain only lower or upper case letters and numbers? That's the issue with logins.

Koalamanx commented 6 months ago

Hi @sreenath87 - Did you ever fix this issue fully? I am having the same issue and no idea what to do.

github-actions[bot] commented 4 months ago

Stale issue. we will close the issue soon. If this issue has not been resolved, please update the issue and contact us in time.