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

Read Handler was slow to respond & event emitter leak #45

Closed
thespurofthings opened this issue Jul 2, 2023 · 7 comments
Closed

Read Handler was slow to respond & event emitter leak #45

thespurofthings opened this issue Jul 2, 2023 · 7 comments
Assignees

Comments

@thespurofthings
Copy link

thespurofthings commented Jul 2, 2023

Describe The Bug

I get a warning about this plugin slowing down Homebridge (which is not the issue!), it's now added in "The read handler for the characteristic 'XXX' was slow to respond!"

Additionally, I now get this alternating between "end listeners added" and "disconnect listeners added": MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit

Expected behavior

Unsure!

Logs

Deleted for privacy

Plugin Config

{
"_bridge" : {
"port" : 45050,
"username" : "0E:5D:C0:83:66:26"
},
"addresses" : [
"192.168.0.XXX",
"192.168.0.XXX",
"192.168.0.XXX",
"192.168.0.XXX",
"192.168.0.XXX",
"192.168.0.XXX",
"192.168.0.XXX"
],
"email" : "XXXXX",
"name" : "Tapo Devices",
"password" : "XXXXX",
"platform" : "HomebridgeTPLinkTapo"
}

Plugin Version

3.2.2

Homebridge Version

1.6.1

Node.js Version

16.16.0

NPM Version

3.2.2

Operating System

macOS Ventura

@RaresAil
Copy link
Owner

RaresAil commented Jul 2, 2023

Hey, do the light bulb turns off often?

@thespurofthings
Copy link
Author

thespurofthings commented Jul 2, 2023 via email

@RaresAil
Copy link
Owner

RaresAil commented Jul 6, 2023

From the logs it looks like the Light Bulbs are not responding @thespurofthings , that is why i asked if they are turning off like a power loss, what you could try is to remove 1 by 1 from config and see with how many light bulbs you can use the plugin

@thespurofthings
Copy link
Author

thespurofthings commented Jul 7, 2023 via email

@RaresAil
Copy link
Owner

Any updates? @thespurofthings

@thespurofthings
Copy link
Author

So the tapo lights I have are on their own child bridge. I have been unable to reproduce it until today when I rebooted the macmini I use as a homebridgee. it tries 20 times per light, to login, but then gives session expired, THEN it says memory leak detected. I am not sure whats going but listeners being 'added' is no longer showing, but the Homebridge UI and Tapo Plugin slow it all down, umsire what that is!

Below is the last attempts at Homebridge to run the login:

�[0;36mLoading logs using native method...
�[0m�[0;36mFile: /Users/thespurofthings/.homebridge/homebridge.log

�[37m[7/31/2023, 5:57:44 PM] �[39m�[36m[Tapo Devices]�[39m Try for 192.168.0.241 : 1/20

�[37m[7/31/2023, 5:57:44 PM] �[39m�[36m[Tapo Devices]�[39m Session expired

�[37m[7/31/2023, 5:57:44 PM] �[39m�[36m[Tapo Devices]�[39m Trying to login again.

�[37m[7/31/2023, 5:57:44 PM] �[39m�[36m[Tapo Devices]�[39m �[31mCommand error: deviceInfo > 9999�[39m

�[37m[7/31/2023, 5:57:44 PM] �[39m�[36m[Tapo Devices]�[39m �[31mFailed to get info about: 192.168.0.241�[39m

�[37m[7/31/2023, 5:57:44 PM] �[39m�[36m[Tapo Devices]�[39m Retry timeout: 192.168.0.241

(node:1376) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 disconnect listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit

(Use node --trace-warnings ... to show where the warning was created)

(node:1376) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit

(node:1376) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 disconnect listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit

(node:1376) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 childBridgeStatusUpdate listeners added to [HomebridgeIpcService]. Use emitter.setMaxListeners() to increase limit

(node:1376) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit

@RaresAil
Copy link
Owner

Update the homebridge and node version to 18, that might fix the issue, i can't reproduce it on node 18

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

2 participants