Closed Christian-CFP closed 2 years ago
As the message suggested you need to trace the warnings so we can see what are they triggered by.
The plugin sends the 'state.change' event when one of these action happens: ['wakeup', 'standby', 'artmode.change']
How many TVs do you have in your config?
Hi, this happens only when I start/restart the homebridge. This do not happend when its running just at the startup. And its independent if the TV is on or off. I just got one TV (Q90R).
My plugin sets only 4 listeners per device. From what i've read the default maximum listeners are 10.
Do you have many plugins installed only one instance of homebridge? If you do, i recommend looking to create multiple instance (you could take a look at homebridge docker).
I've got 10 plugins devided by 5 instances so I guess thats fine.
PS 6 Plugins are in the instance with yours. This warning is only since the ver. 5.
Depending on how many devices you have for each plugin :D
You could try the --trace-warnings, maybe we will get more info.
I do not know how to get use of this node --trace-warnings
I think you just call node --trace-warnings ...
in your terminat, including the three dots
I never used it :D
Or i think another solution is to start homebridge in debug mode and it will show the warning with the trace.
Same issue here, I've seen it for a while. debug mode doesn't help, but node trace-warnings does
[05/08/2021, 6:38:35 pm] Homebridge v1.3.4 (Homebridge) is running on port 51106.
Preparing Advertiser for 'TV E63D' using ciao backend!
(node:28193) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 state.change listeners added to [Device]. Use emitter.setMaxListeners() to increase limit
at _addListener (events.js:451:17)
at Device.addListener (events.js:467:10)
at new Switch (/usr/lib/node_modules/homebridge-samsung-tizen/lib/accessories/switch.js:26:21)
at /usr/lib/node_modules/homebridge-samsung-tizen/lib/device.js:52:32
at Array.forEach (<anonymous>)
at new Device (/usr/lib/node_modules/homebridge-samsung-tizen/lib/device.js:50:30)
at SamsungPlatform.init (/usr/lib/node_modules/homebridge-samsung-tizen/index.js:47:26)
Starting to advertise 'TV E63D' using ciao backend!
I think i know from what is it! Do you have multiple switches for the TV?
I think i know from what is it! Do you have multiple switches for the TV?
Yep, sure do
Me too.
That’s it then! For every switch an event listener is created!
i will change they way it works!
That’s it then! For every switch an event listener is created!
i will change they way it works!
was that ironic?
Don’t know what sound ironic to you. Probably “that’s it then” but i was referring as “that’s the problem, that’s why the warning messages appears” … especially since in the previous message i said “I probably know from what is it” :)
Ok got it. Sorry.
Hi. I have updated the plugin and now only one listener is created for updating all accessories instead of having one listener for every accessory.
I didn't publish a new version of the plugin yet, so the warning will be there until I do that. I still have some issues i want to fix and then i will release the new version. Maximum at the end of the week.
I dont know what this is:
Here in debug:
31.7.2021, 14:20:26HOME BridgePreparing Advertiser for 'Fernseher 1B13' using bonjour-hap backend! 31.7.2021, 14:20:26HOME BridgeWARNING<(node:507) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 state.change listeners added to [Device]. Use emitter.setMaxListeners() to increase limit 31.7.2021, 14:20:26HOME BridgeWARNING(Use
node --trace-warnings ...
to show where the warning was created) 31.7.2021, 14:20:26HOME BridgeStarting to advertise 'Fernseher 1B13' using bonjour-hap backend! 31.7.2021, 14:20:26HOME BridgeFernseher 1B13 is running on port 34065.