question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error from socket

See original GitHub issue

Running the following command produces an error:

pi@raspberrypi:~ $ DEBUG=* tuya-cli get --ip 192.168.178.42 --id 38272685dc4f22e92563 --key 68379fd576eb1963 -a
  TuyAPI IP and ID are already both resolved. +0ms
  TuyAPI Connecting to 192.168.178.42... +28ms
  TuyAPI Socket connected. +22ms
  TuyAPI GET Payload: +8ms
  TuyAPI { gwId: '38272685dc4f22e92563', devId: '38272685dc4f22e92563' } +1ms
  TuyAPI Error event from socket. 192.168.178.42 { Error: write EPIPE
    at WriteWrap.afterWrite [as oncomplete] (net.js:868:14) errno: 'EPIPE', code: 'EPIPE', syscall: 'write' } +36ms
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: Error from socket
    at Socket.client.on.err (/usr/lib/node_modules/@tuyapi/cli/node_modules/tuyapi/index.js:365:30)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at onwriteError (_stream_writable.js:417:12)
    at onwrite (_stream_writable.js:439:5)
    at _destroy (internal/streams/destroy.js:39:7)
    at Socket._destroy (net.js:568:3)
    at Socket.destroy (internal/streams/destroy.js:32:8)
    at WriteWrap.afterWrite [as oncomplete] (net.js:870:10)

The IP is “pingable” and for sure correct. ID and key have been extracted using Charles.

My installation should be ok. No updates in the pipe.

sudo apt-get update
sudo apt-get upgrade

were run.

Any idea?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
codethewebcommented, Jul 14, 2019

@masipulami I just merged in a PR on the CLI repo that adds support for v3.3 firmware, published in v1.7.0 of @tuaypi/cli. Please update the package and try it out.

0reactions
andy0172commented, Aug 28, 2019

Hi and thanks for all this work. It was all fine until I clicked on update firmware for my tuya sockets 😦

Now I have updated to the latest version, but still get the same error like in the initial post: TuyAPI IP and ID are already both resolved. +0ms TuyAPI Connecting to 192.168.178.74… +16ms TuyAPI Socket connected. +27ms TuyAPI GET Payload: +5ms TuyAPI { gwId: ‘18122702600194bff1eb’, devId: ‘18122702600194bff1eb’ } +1ms TuyAPI Error event from socket. 192.168.178.74 { Error: write EPIPE at WriteWrap.afterWrite [as oncomplete] (net.js:868:14) errno: ‘EPIPE’, code: ‘EPIPE’, syscall: ‘write’ } +22ms events.js:183
throw er; // Unhandled ‘error’ event
^

Error: Error from socket
at Socket.client.on.err (/usr/lib/node_modules/@tuyapi/cli/node_modules/tuyapi/index.js:323:30)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at onwriteError (_stream_writable.js:417:12)
at onwrite (_stream_writable.js:439:5)
at _destroy (internal/streams/destroy.js:39:7)
at Socket._destroy (net.js:568:3)
at Socket.destroy (internal/streams/destroy.js:32:8)
at WriteWrap.afterWrite [as oncomplete] (net.js:870:10)

Details of tuya socket: MCU Modul 1.0.7 Wi-Fi Modul 1.0.7

Strange behavior, with the same installation I can turn on and off a tuya light with this details: MCU Modul 1.1.1 Wi-Fi Modul 1.1.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is a Socket Error? (with pictures) - EasyTechJunkie
A socket error is when there is a problem with the user's computer or the other computer or server while making this connection....
Read more >
Common FTP Socket Errors | HostGator Support
A socket error can occur if one or more of certain conditions are not met or something is blocking communication between the client...
Read more >
How to Fix a Socket Error in My Computer - Techwalla
How to Fix a Socket Error in My Computer · Step 1. Click on "Start," then type "cmd" (without quotes) in the "Start...
Read more >
What Is a Socket Error? - Veloce Network
A socket error is an error that means that the data sent over the network was not received in time. Some simple fixes...
Read more >
Socket errors - IBM
Errors are written to the agent log file for problems that occur with data received from a socket client. Other errors that are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found