Failed to get device information
Dashti81 opened this issue · comments
Hi,
I'm new in the world of Tuya, this is my first device :)
I have ceiling fan from create, this is connected to Tuya app and it works fine. Now I'm trying to connect via this plugin so I can use it in my homekit.
this is my config:
{
"options": {
"username": "{same username as https://iot.tuya.com/}",
"password": "{password}",
"accessId": "{accessId from cloud project}",
"accessKey": "{ accessKey from cloud project }",
"endPoint": "https://openapi.tuyaeu.com",
"lang": "en",
"projectType": "2",
"appSchema": "tuyaSmart",
"debug": true
},
"name": "Ceiling fan",
"platform": "TuyaPlatform"
}
When I start homebridge I get this error in log:
Initializing TuyaPlatform...
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"username":"xxx","password":"xxx","schema":"tuyaSmart"}, headers = {"t":"1705673985576","client_id":"xxx","nonce":"xxx","Signature-Headers":"client_id","sign":"xxx","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"}
TuyaOpenAPI response: {"code":1110,"msg":"illegal param","success":false,"t":1705673987659,"tid":"xxx"} 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
Failed to get device information. Please check if the config.json is correct.
I don't have any clue what I'm doing wrong, I hope you can help!
Thanks
Thank you for your feedback, we will solve this issue soon
Stale issue. we will close the issue soon. If this issue has not been resolved, please update the issue and contact us in time.