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

Troubles with Lohas devices #180

Open
unlucio opened this issue Jan 12, 2025 · 0 comments
Open

Troubles with Lohas devices #180

unlucio opened this issue Jan 12, 2025 · 0 comments

Comments

@unlucio
Copy link

unlucio commented Jan 12, 2025

Hello,
I have 4 spotlights and a bulb from Lohas:

Screenshot_2025-01-12_at_14_30_57

I can control them using the Tuya app, and they appear in my Tuya developer portal. However, when I try to scan them, I mostly receive ECONNRESET errors across all protocols:

➜  ~ tuya-cli get --ip 10.6.9.69 --id <my device id> --key <my devce password> --protocol-version 3.1
node:events:496
      throw er; // Unhandled 'error' event
      ^

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

Node.js v20.11.1
➜  ~ tuya-cli get --ip 10.6.9.69 --id <my device id> --key <my devce password> --protocol-version 3.2
node:events:496
      throw er; // Unhandled 'error' event
      ^

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

Node.js v20.11.1
➜  ~ tuya-cli get --ip 10.6.9.69 --id <my device id> --key <my devce password> --protocol-version 3.3
node:events:496
      throw er; // Unhandled 'error' event
      ^

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

Node.js v20.11.1
➜  ~ tuya-cli get --ip 10.6.9.69 --id <my device id> --key <my devce password> --protocol-version 3.4
node:events:496
      throw er; // Unhandled 'error' event
      ^

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

Node.js v20.11.1

If I nmap them, they all have the 668 TCP port open:

➜  ~ nmap 10.6.9.69
Starting Nmap 7.95 ( https://nmap.org ) at 2025-01-12 14:47 CET
Nmap scan report for ESP_B2D874.local (10.6.9.69)
Host is up (0.025s latency).
Not shown: 999 closed tcp ports (conn-refused)
PORT     STATE SERVICE
6668/tcp open  irc

Nmap done: 1 IP address (1 host up) scanned in 2.61 seconds

I briefly managed to communicate with 1 of them using protocol 3.1 and get a list of datapoints, but it stopped responding afterward.
They all work fine in the tuya app.
I find the whole Tuya stack very confusing, and that doesn't help.

Can someone help me find some clarity? and perhaps to fix my white problem?

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

No branches or pull requests

1 participant