tomikaa87 / gree-remote

Simple remote control utility for Gree Smart air conditioners
GNU General Public License v3.0
280 stars 64 forks source link

emitter.setMaxListeners() #34

Closed Aaron0621 closed 4 years ago

Aaron0621 commented 4 years ago

Hi there!

I'm using this MQTT Bridge to control my AC (through nodered btw, but that has nothing to do with the error)

https://github.com/stas-demydiuk/ewpe-smart-mqtt

Since this morning, I cannot use the mqtt bridge, due to this error that it gives in the terminal when I run "npm start" in the ewpe-smart-mqtt::

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

What should I do?

I tried to search for how and where should I set it to infinty (emitter.setMaxListeners(0)), but I have no idea which file should I edit. Also I read that this message is not strictly generated because it runs out of places for listeners, it could also indicate some sort of code error. I've read somewhere that the code might not release listeners, when connection lost, so when it reconnects the mqtt, it just adds another listener...so it might be a "not-perfect-wifi" connection between the AC and the router, therefore the mqtt, so it always creates a new listener, and that fills up quickly...

Can you help me here?

tomikaa87 commented 4 years ago

Hi @Aaron0621,

Since the MQTT Bridge you've mentinoned is not maintained by me, you should report this issue in that repository.

Regards, Tamas