TuyaAPI / cli

🔧 A CLI for Tuya devices
MIT License
267 stars 43 forks source link

getaddrinfo ENOTFOUND openapi.tuyabe.com #67

Closed giloser closed 4 years ago

giloser commented 4 years ago

Hi,

I tried to get my localkey with your code and I got this error... Could you tell me what I did wrong? thanks

Γ£û Device(s) failed to be registered! GotError: getaddrinfo ENOTFOUND openapi.tuyabe.com at onError (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/request-as-event-emitter.js:140:29) at handleRequest (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/request-as-event-emitter.js:173:17) at processTicksAndRejections (internal/process/task_queues.js:97:5) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:64:26) { name: 'RequestError', code: 'ENOTFOUND' }

codetheweb commented 4 years ago

What are the arguments you're passing to tuya-cli? Looks like you have --region be, which is not valid. See here for a list of valid regions.

giloser commented 4 years ago

Hi thanks for the quick answer

but any other 3 possiblities you propose give me

Error: sign invalid at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/openapi/dist/api.js:68:31) at EventEmitter. (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38) at processTicksAndRejections (internal/process/task_queues.js:97:5)

codetheweb commented 4 years ago

That almost certainly means that one of your configuration values is bad (key, secret, schema). Please go through the setup instructions again, making sure you use the cloud key and secret, not the app values.

giloser commented 4 years ago

Hi thanks again,

you were write I thought I had check everything twice seems I was wrong.

sorry for the disturbance.

have a good day

codetheweb commented 4 years ago

Glad you got it working.