Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebridge connect error #109

Closed
Blinky122 opened this issue Sep 21, 2021 · 14 comments
Closed

Homebridge connect error #109

Blinky122 opened this issue Sep 21, 2021 · 14 comments

Comments

@Blinky122
Copy link

Blinky122 commented Sep 21, 2021

I have IoT connect with my Smart Life app and i see the device in Tuya project. But i have no answer, why i have this issue
All my Login Data is correct.

I have HB in Docker Container in Synology NAS (DSM 7). Automatik Install

Starting to advertise 'Homebridge 3625 F32F' using bonjour-hap backend!
[9/21/2021, 3:47:36 PM] Homebridge v1.3.4 (Homebridge 3625) is running on port 51047.
TuyaOpenAPI response: {"result":{"access_token":"f3a3e9ebdc08xxxxxxxxxxx","expire_time":7200,"platform_url":"h t openapi.tuyaeu.com","refresh_token":"fa9e77ba7a31397xxxxxxxxxxxxxxx","uid":"eu16319883xxxxxxxxxx"},"success":true,"t":1632232057098} path = /v1.0/iot-01/associated-users/actions/authorized-login
TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaeu.com, path = /v1.0/iot-01/associated-users/devices, params = {"size":100}, body = null, headers = {"t":"1632232057260","client_id":"cjwd4peaaxxjt6enlc7u","nonce":"7a4ed300-1ae2-11ec-a5fc-d5c6cf63a671","Signature-Headers":"client_id","sign":"7DD03E7B19E5AA1932F37C88F87F7B8xxxxxxxxxxx","sign_method":"HMAC-SHA256","access_token":"f3a3e9ebdc0803f3e04798bf091cd3e5","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.4.0"}
TuyaOpenAPI response: {"code":28841101,"msg":"No permissions. This API is not subscribed.","success":false,"t":1632232057383} path = /v1.0/iot-01/associated-users/devices
Failed to get device information. Please check if the config.json is correct.

When i install Homebride on Windows 10, it is the same issue

Config

"options": { "username": "[email protected]", "password": "xxxxxx", "accessId": "cjxxxxxxxxxxxxx", "accessKey": "bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "lang": "en", "projectType": "2", "appSchema": "smartlife", "countryCode": 49, "debug": true }, "name": "TuyaPlatform", "platform": "TuyaPlatform"

sorry for my english.

@github-actions
Copy link

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

@Blinky122
Copy link
Author

Now i have install my devices in Tuya Smart, but the issue is the same...

TuyaOpenAPI response: {"result":{"access_token":"73d6xxxxxxxxxxx","expire_time":7200,"platform_url":"https://openapi.tuyaeu.com","refresh_token":"b11e9cb5c226d4xxxxxxxxxxxxxxx","uid":"eu16xxxxxxxx"},"success":true,"t":1632xxxx} path = /v1.0/iot-01/associated-users/actions/authorized-login
TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaeu.com, path = /v1.0/iot-01/associated-users/devices, params = {"size":100}, body = null, headers = {"t":"1632xxxxxxx2","client_id":"cjwd4xxxxxxxx","nonce":"f6xxxxxxxxxxxxxxxxxxxxxxxx","Signature-Headers":"client_id","sign":"26B356423252ED2E1ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","sign_method":"HMAC-SHA256","access_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.4.0"}
TuyaOpenAPI response: {"code":28841101,"msg":"No permissions. This API is not subscribed.","success":false,"t":1632243432999} path = /v1.0/iot-01/associated-users/devices
Failed to get device information. Please check if the config.json is correct.

@Blinky122
Copy link
Author

Now i have this issue....

TuyaOpenAPI response: {"code":2007,"msg":"your ip(xxxxxxxxxxx) cross-region access is not allowed","success":false,"t":1632308811156} 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 (/homebridge/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:48:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at TuyaSHOpenAPI.request (/homebridge/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:144:7)
at TuyaSHOpenAPI.getDevices (/homebridge/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:62:15)
at TuyaPlatform.initTuyaSDK (/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.

@xrust83
Copy link

xrust83 commented Sep 22, 2021

https://developer.tuya.com/ droop host

@Blinky122
Copy link
Author

https://developer.tuya.com/ droop host

Dont unterstand

@weirdpattern
Copy link

I'm having the same issue here. getting the cross region access is not allowed error because the API is ignoring the endPoint from my config and connecting to the China Data Center.

@xrust83
Copy link

xrust83 commented Sep 22, 2021

https://developer.tuya.com/ droop host

Dont unterstand

the site through which the tuya api plugin is configured did not work all day and morning today. Because of this, my curtains did not open in the morning and I opened them from the SmartLife application, by the time the curtains closed by themselves. the site is working now.

@Blinky122
Copy link
Author

Answer from support:

Hello, I'm sorry, we are urgently repairing HB's Tuya account login problem. It is expected that the repair will be completed in one to two working days. please wait patiently.

@0ldF0x
Copy link

0ldF0x commented Sep 23, 2021

I also opened a ticket and suggested them a fix. Support is very responsive :)
openApi setting from config is not loaded...

EDIT: fix is already out! Good job team!

@Blinky122
Copy link
Author

Hello, this problem has been fixed, you can download the latest version of the Master branch and try again.
https://github.com/tuya/tuya-homebridge

@Hanh94
Copy link
Contributor

Hanh94 commented Nov 3, 2021

Hi guys, Sorry for the late reply.
Please see #134 (comment) & #108 (comment)

@C1ironie
Copy link

Hi team

I have an error code 1114 with description of my IP adress doesn't have access to this API",
Certainly I missed something...
Thank for your help

@github-actions
Copy link

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

@xrust83
Copy link

xrust83 commented Oct 11, 2022

TuyaOpenAPI response: {"code":1114,"msg":"your ip(45.151.238.199) don't have access to this API","success":false,"t":1665515022539,"tid":"6c5d99bb499711edb89bca0f69d78a9e"} 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 (/usr/local/lib/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:49:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at TuyaSHOpenAPI.request (/usr/local/lib/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:145:7)
at TuyaSHOpenAPI.getDevices (/usr/local/lib/node_modules/homebridge-tuya-platform/lib/tuyashopenapi.js:63:15)
at TuyaPlatform.initTuyaSDK (/usr/local/lib/node_modules/homebridge-tuya-platform/index.js:90:19)
Attention⚠️ ⚠️ ⚠️ ! You get an error!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants