Navigation Menu

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

TCP Socket Closed and Connection Refused errors #46

Open
jerbzz opened this issue Nov 10, 2020 · 4 comments
Open

TCP Socket Closed and Connection Refused errors #46

jerbzz opened this issue Nov 10, 2020 · 4 comments

Comments

@jerbzz
Copy link

jerbzz commented Nov 10, 2020

Problem enconutered
I'm using multiple kasa nodes (four, and then one in a subflow which appears 7 times) at different points in my flow to control a single HS100. I have another HS100 and a HS110 on my network but they are not configured in any of the kasa nodes.

I'm getting repeated errors in the Node-RED debug panel immediately after deploying the flow (this is with kasa node debug turned on):

Error connecting to device 192.168.1.112: Error: TCP Socket Closed. segment:0 hadError:false

The nodes do work - for a period of time measured in minutes or hours, and then stop working completely. Sending input does not result in the device responding and there is no output from the node. Redeploying just the node which is borked seems to get things moving again. I'm having a hard time confirming, but I don't think all the nodes stop working at the same time.

Once the node has stopped working, it's this error in the debug panel:

Polling error for 192.168.1.112: Error: connect ECONNREFUSED 192.168.1.112:9999

I have disabled polling on all but one of the nodes, which is set to 15000/10000. This hasn't seemed to make any difference - if anything, it's worse now.

Happy to share my flow if that would be helpful.

OS: Raspbian buster on Pi 3B+

@jerbzz
Copy link
Author

jerbzz commented Nov 10, 2020

I should add that throughout this, the Kasa app still seems to be able to do the business.

@jerbzz jerbzz changed the title TCP Socket Closed errors TCP Socket Closed and Connection Refused errors Nov 11, 2020
@rakgupta
Copy link

I am seeing this in my logs (where XXX.XX.X.XXX is the IP address of TPLink HS105) - everything seems to work (MacOS - High Sierra)

TCP XXX.XX.X.XXX:9999 Error: TCP Socket Closed. segment:0 hadError:false
at Socket. (/Users/rakesh/.node-red/node_modules/tplink-smarthome-api/lib/network/tcp-socket.js:104:31)
at Object.onceWrapper (events.js:284:20)
at Socket.emit (events.js:196:13)
at TCP. (net.js:586:12)
[Hubitat Plug] device.send() Error: TCP Socket Closed. segment:0 hadError:false
at Socket. (/Users/rakesh/.node-red/node_modules/tplink-smarthome-api/lib/network/tcp-socket.js:104:31)
at Object.onceWrapper (events.js:284:20)
at Socket.emit (events.js:196:13)
at TCP. (net.js:586:12)

@jerbzz
Copy link
Author

jerbzz commented Nov 12, 2020

I saw that on another issue you posted.

The difference is, I think, that the node stops working for me.

@Botched1
Copy link

Botched1 commented Jun 5, 2021

For the record, I see the same thing on 2 KP115 units when getting energy readings @ 10s. They just stop updating after after a few days. Reload the node (typically I check/unckeck debug logging in the node and reload) then it will work again for a few days.

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

3 participants