codetheweb / tuyapi

🌧 An easy-to-use API for devices that use Tuya's cloud services. Documentation: https://codetheweb.github.io/tuyapi.
MIT License
2.04k stars 332 forks source link

tuya-cli get does not work, ECONNRESET error. #636

Open bonjour81 opened 11 months ago

bonjour81 commented 11 months ago

Describe the bug tuya-cli get command does not work. ECONNRESET error

To Reproduce Steps to reproduce the behavior:

  1. send a get command: tuya-cli get --ip 192.168.xx.xx --id xxxxx --key 'xxxxx' --protocol-version 3.1 --full

  2. See error

    
    node:events:489
      throw er; // Unhandled 'error' event
      ^

Error: Error from socket: read ECONNRESET at Socket. (/usr/lib/node_modules/@tuyapi/cli/node_modules/tuyapi/index.js:651:26) at Socket.emit (node:events:511:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) Emitted 'error' event on TuyaDevice instance at: at Socket. (/usr/lib/node_modules/@tuyapi/cli/node_modules/tuyapi/index.js:651:12) at Socket.emit (node:events:511:28) [... lines matching original stack trace ...] at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v20.3.1



**Expected behavior**
a normal answer to get command.

**Desktop (please complete the following information):**
 - OS: Manjaro
 - OS Version : last stable
 - Node Version 20.3.1
Apollon77 commented 11 months ago

ECONNRESET means that the device declines the connection. Check the device, potentially reboot and check your network connections