thenewwazoo / homebridge-lutron-caseta-leap

Homebridge support for Lutron Caseta Smart Bridge 2
Apache License 2.0
82 stars 28 forks source link

MaxListenersExceededWarning In Log #120

Closed PaulDeas closed 1 year ago

PaulDeas commented 1 year ago

Describe Your Problem: I am getting MaxListenerExceededWarnings from the Lutron Leap Plugin. Everything seems to be working, so maybe it really is just a warning. But it does indicate that the emitter.SetMaxListeners should be increased.

Logs:

[28/08/2023, 08:41:40] [Lutron] Got MaxListenersExceededWarning process warning: Possible EventEmitter memory leak detected. 76 disconnected listeners added to [SmartBridge]. Use emitter.setMaxListeners() to increase limit:
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 76 disconnected listeners added to [SmartBridge]. Use emitter.setMaxListeners() to increase limit
    at _addListener (node:events:587:17)
    at SmartBridge.addListener (node:events:605:10)
    at PicoRemote.initialize (/var/lib/homebridge/node_modules/homebridge-lutron-caseta-leap/src/PicoRemote.ts:229:25)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at LutronCasetaLeap.processDevice (/var/lib/homebridge/node_modules/homebridge-lutron-caseta-leap/src/platform.ts:230:24)
    at async Promise.allSettled (index 38)
    at /var/lib/homebridge/node_modules/homebridge-lutron-caseta-leap/src/platform.ts:197:61
(node:6066) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 76 disconnected listeners added to [SmartBridge]. Use emitter.setMaxListeners() to increase limit

Plugin Config:


        {
            "name": "Lutron",
            "platform": "LutronCasetaLeap",
            "options": {
                "filterPico": false,
                "filterBlinds": false,
                "clickSpeedDouble": "default",
                "clickSpeedLong": "default"
            },
            "secrets": [
                {
                    "comment": "XXXX",
                    "bridgeid": "032E3978",
                },
                {
                    "comment": "YYYYY",
                    "bridgeid": "047D744C",
                },
                {
                    "comment": "GARAGE",
                    "bridgeid": "042B22A5",
               },
                {
                    "comment": "POND2",
                    "bridgeid": "04787472",
              },
                {
                    "comment": "POND1",
                    "bridgeid": "047D7462",
                }
            ],
            "_bridge": {
                "username": "0E:F0:C6:D0:BC:7B",
                "port": 54738
            }
        }```
thenewwazoo commented 1 year ago

Fixed, dupe of #123. Sorry for the noise, hopefully the latest release should fix it for ya. :)