tuyapi icon indicating copy to clipboard operation
tuyapi copied to clipboard

tuya-cli get does not work, ECONNRESET error.

Open bonjour81 opened this issue 2 years ago • 1 comments

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.<anonymous> (/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.<anonymous> (/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

bonjour81 avatar Jul 20 '23 15:07 bonjour81

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

Apollon77 avatar Jul 24 '23 11:07 Apollon77