plasticrake / homebridge-tplink-smarthome

TP-Link Smarthome Plugin for Homebridge
MIT License
480 stars 70 forks source link

TCP Error #316

Open jhk1620 opened 1 year ago

jhk1620 commented 1 year ago

Is there an existing issue for this?

What happened?

Getting the error with Kasa Led lighting.

TplinkSmarthome.API] TCP 999.999.9.99:9999 Error: TCP Timeout after 15000ms 999.999.9.999999 {"system":{"get_sysinfo":{}}} at Timeout._onTimeout (/homebridge/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/src/network/tcp-socket.ts:67:17) at listOnTimeout (node:internal/timers:564:17) at processTimers (node:internal/timers:507:7)

What, if anything, has recently changed?

None

Version

v7.0.1

Node Version

v7.0.1

Homebridge Version

v4.50.6

Which OS/Platform?

Linux

Relevant log output

TplinkSmarthome.API] TCP 999.999.9.99:9999 Error: TCP Timeout after 15000ms
999.999.9.999999 {"system":{"get_sysinfo":{}}}
    at Timeout._onTimeout (/homebridge/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/src/network/tcp-socket.ts:67:17)
    at listOnTimeout (node:internal/timers:564:17)
    at processTimers (node:internal/timers:507:7)

Configuration

{
    "platform": "TplinkSmarthome",
    "name": "TplinkSmarthome",
    "addCustomCharacteristics": true,
    "_bridge": {
        "port": ,
        "username": ""
    },
    "deviceTypes": [
        "plug",
        "bulb"
    ]
}
anthonymkz commented 1 year ago

I am also having this issue with two of my HS210 switches

anthonymkz commented 11 months ago

Just an update, I was getting this error after about 20 minutes every time I started the plugin. I changed my Timeout to 30 and wait time to 150 in Advanced Settings of the config and so far so good. Not sure which (or both) helped, but I'll update if the error returns.

jhk1620 commented 11 months ago

Thanks for the info. Still the same results.

[xxxxxxx] device.send() Error: UDP Timeout after 45000ms 999.999.9.999:9999 {"system":{"get_sysinfo":{}}} at Timeout._onTimeout (/homebridge/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/src/network/udp-socket.ts:64:15) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7)

On Dec 17, 2023, at 10:07 AM, anthonymkz @.***> wrote:

Just an update, I was getting this error after about 20 minutes every time I started the plugin. I changed my Timeout to 30 and wait time to 150 in Advanced Settings of the config and so far so good. Not sure which (or both) helped, but I'll update if the error returns.

— Reply to this email directly, view it on GitHub https://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1859211785, or unsubscribe https://github.com/notifications/unsubscribe-auth/A34EQJTUQPQHMUEYIQJUIV3YJ4KEPAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJZGIYTCNZYGU. You are receiving this because you authored the thread.

anthonymkz commented 11 months ago

You have your settings at UDP not TCP. I would have specified this but your original post says TCP. I haven't gotten this error again since making these changes.

jhk1620 commented 11 months ago

I tried both ways with the same results.

TCP 999.999.9.99:9999 Error: TCP Timeout after 59000ms 999.999.9.99:9999 {"system":{"get_sysinfo":{}}} at Timeout._onTimeout (/homebridge/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/src/network/tcp-socket.ts:68:17) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7)

On Dec 19, 2023, at 11:24 AM, anthonymkz @.***> wrote:

You have your settings at UDP not TCP. I would have specified this but your original post says TCP. I haven't gotten this error again since making these changes.

— Reply to this email directly, view it on GitHub https://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1863194839, or unsubscribe https://github.com/notifications/unsubscribe-auth/A34EQJR5IM36YNBMI3LPP23YKHEUJAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGE4TIOBTHE. You are receiving this because you authored the thread.

anthonymkz commented 11 months ago

Looks like mine as back is well. So I guess this isn't the fix.


From: jhk1620 @.> Sent: Tuesday, December 19, 2023 1:52 PM To: plasticrake/homebridge-tplink-smarthome @.> Cc: anthonymkz @.>; Comment @.> Subject: Re: [plasticrake/homebridge-tplink-smarthome] TCP Error (Issue #316)

I tried both ways with the same results.

TCP 999.999.9.99:9999 Error: TCP Timeout after 59000ms 999.999.9.99:9999 {"system":{"get_sysinfo":{}}} at Timeout._onTimeout (/homebridge/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/src/network/tcp-socket.ts:68:17) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7)

On Dec 19, 2023, at 11:24 AM, anthonymkz @.***> wrote:

You have your settings at UDP not TCP. I would have specified this but your original post says TCP. I haven't gotten this error again since making these changes.

— Reply to this email directly, view it on GitHub https://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1863194839, or unsubscribe https://github.com/notifications/unsubscribe-auth/A34EQJR5IM36YNBMI3LPP23YKHEUJAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGE4TIOBTHE. You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHubhttps://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1863311162, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5FXRIGL5UDW4MRZBHLZ3CDYKHO6TAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGMYTCMJWGI. You are receiving this because you commented.Message ID: @.***>

jhk1620 commented 11 months ago

Yeah looks like once you restart the bridge then at the point you turn something on it starts up again. The switches/lights still work. But just fills up the logs,

On Dec 19, 2023, at 1:05 PM, anthonymkz @.***> wrote:

Looks like mine as back is well. So I guess this isn't the fix.


From: jhk1620 @.> Sent: Tuesday, December 19, 2023 1:52 PM To: plasticrake/homebridge-tplink-smarthome @.> Cc: anthonymkz @.>; Comment @.> Subject: Re: [plasticrake/homebridge-tplink-smarthome] TCP Error (Issue #316)

I tried both ways with the same results.

TCP 999.999.9.99:9999 Error: TCP Timeout after 59000ms 999.999.9.99:9999 {"system":{"get_sysinfo":{}}} at Timeout._onTimeout (/homebridge/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/src/network/tcp-socket.ts:68:17) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7)

On Dec 19, 2023, at 11:24 AM, anthonymkz @.***> wrote:

You have your settings at UDP not TCP. I would have specified this but your original post says TCP. I haven't gotten this error again since making these changes.

— Reply to this email directly, view it on GitHub https://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1863194839, or unsubscribe https://github.com/notifications/unsubscribe-auth/A34EQJR5IM36YNBMI3LPP23YKHEUJAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGE4TIOBTHE. You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHubhttps://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1863311162, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5FXRIGL5UDW4MRZBHLZ3CDYKHO6TAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGMYTCMJWGI. You are receiving this because you commented.Message ID: @.***> — Reply to this email directly, view it on GitHub https://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1863327386, or unsubscribe https://github.com/notifications/unsubscribe-auth/A34EQJQM7PPJKTC37JNH473YKHQQBAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGMZDOMZYGY. You are receiving this because you authored the thread.

jhk1620 commented 11 months ago

Weird. No errors now for the past 10-15 minutes now. Triggering things now thru HomeKit has not triggered any errors

[12/19/2023, 1:26:33 PM] [TplinkSmarthome] [Entertainment TV Lights] Setting On to: true [12/19/2023, 1:26:41 PM] [TplinkSmarthome] [Entertainment TV Lights] Setting On to: false [12/19/2023, 1:26:45 PM] [TplinkSmarthome] [Entertainment TV Lights] Setting On to: true [12/19/2023, 1:26:53 PM] [TplinkSmarthome] [Entertainment TV Lights] Setting On to: false

On Dec 19, 2023, at 1:05 PM, anthonymkz @.***> wrote:

Looks like mine as back is well. So I guess this isn't the fix.


From: jhk1620 @.> Sent: Tuesday, December 19, 2023 1:52 PM To: plasticrake/homebridge-tplink-smarthome @.> Cc: anthonymkz @.>; Comment @.> Subject: Re: [plasticrake/homebridge-tplink-smarthome] TCP Error (Issue #316)

I tried both ways with the same results.

TCP 999.999.9.99:9999 Error: TCP Timeout after 59000ms 999.999.9.99:9999 {"system":{"get_sysinfo":{}}} at Timeout._onTimeout (/homebridge/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/src/network/tcp-socket.ts:68:17) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7)

On Dec 19, 2023, at 11:24 AM, anthonymkz @.***> wrote:

You have your settings at UDP not TCP. I would have specified this but your original post says TCP. I haven't gotten this error again since making these changes.

— Reply to this email directly, view it on GitHub https://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1863194839, or unsubscribe https://github.com/notifications/unsubscribe-auth/A34EQJR5IM36YNBMI3LPP23YKHEUJAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGE4TIOBTHE. You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHubhttps://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1863311162, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5FXRIGL5UDW4MRZBHLZ3CDYKHO6TAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGMYTCMJWGI. You are receiving this because you commented.Message ID: @.***> — Reply to this email directly, view it on GitHub https://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1863327386, or unsubscribe https://github.com/notifications/unsubscribe-auth/A34EQJQM7PPJKTC37JNH473YKHQQBAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGMZDOMZYGY. You are receiving this because you authored the thread.

jhk1620 commented 11 months ago

Update…..

So it appears that the issue is not with homebridge and the plugin. I think the actual device is dropping off and on the network. I have monitored this closer the past few days. I think the actual devices need an update. I have unplugged the lights/device and plugged it back in and it fixes the issue for a short time. Then another one of my devices behalf the same way. I am using Kasa Light strips on my TV’s. I go to the app and it shows me the device is offline thus why I am unplugging it, So that is my take on it. Over all the initial changes have helped with the overall issue,

On Dec 19, 2023, at 1:05 PM, anthonymkz @.***> wrote:

Looks like mine as back is well. So I guess this isn't the fix.


From: jhk1620 @.> Sent: Tuesday, December 19, 2023 1:52 PM To: plasticrake/homebridge-tplink-smarthome @.> Cc: anthonymkz @.>; Comment @.> Subject: Re: [plasticrake/homebridge-tplink-smarthome] TCP Error (Issue #316)

I tried both ways with the same results.

TCP 999.999.9.99:9999 Error: TCP Timeout after 59000ms 999.999.9.99:9999 {"system":{"get_sysinfo":{}}} at Timeout._onTimeout (/homebridge/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/src/network/tcp-socket.ts:68:17) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7)

On Dec 19, 2023, at 11:24 AM, anthonymkz @.***> wrote:

You have your settings at UDP not TCP. I would have specified this but your original post says TCP. I haven't gotten this error again since making these changes.

— Reply to this email directly, view it on GitHub https://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1863194839, or unsubscribe https://github.com/notifications/unsubscribe-auth/A34EQJR5IM36YNBMI3LPP23YKHEUJAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGE4TIOBTHE. You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHubhttps://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1863311162, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5FXRIGL5UDW4MRZBHLZ3CDYKHO6TAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGMYTCMJWGI. You are receiving this because you commented.Message ID: @.***> — Reply to this email directly, view it on GitHub https://github.com/plasticrake/homebridge-tplink-smarthome/issues/316#issuecomment-1863327386, or unsubscribe https://github.com/notifications/unsubscribe-auth/A34EQJQM7PPJKTC37JNH473YKHQQBAVCNFSM6AAAAAA6H2FMMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGMZDOMZYGY. You are receiving this because you authored the thread.

wdbrady commented 11 months ago

It does not seem to have any functional impact, but is filling up the logs. Maybe add an option to throttle back the logging on these events could be added? I have observed the same issue with the devices appearing dropped from the network, but they do seem available when I trigger the events.

iceycake commented 10 months ago

I just updated homebridge and the plugs and the smart plug firmware and ran into the exactly issue. In the advanced setting, default is using TCP as transport. Since the timeout error is TCP, I changed to UDP for transport and everything is back as good as old days.