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

Bridge/accessory stops sending updates #20

Open
finestructure opened this issue Dec 9, 2022 · 3 comments
Open

Bridge/accessory stops sending updates #20

finestructure opened this issue Dec 9, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@finestructure
Copy link

Twice over the last couple of days my Aranet4 stopped sending updates. Both times I noticed the following warning in the logs:

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

Could this be related?

Plugin Config:

{
    "bridge": {
        "name": "Homebridge 47AE",
        "username": "xxxxx",
        "port": 51907,
        "pin": "xxxxx",
        "advertiser": "bonjour-hap"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "name": "Aranet4 Platform",
            "co2AlertThreshold": 1006,
            "batteryAlertThreshold": 10,
            "sensorDataRefreshInterval": 300,
            "bluetoothReadyTimeout": 10,
            "bluetoothDeviceSearchTimeout": 10,
            "_bridge": {
                "username": "xxxxx",
                "port": 56655
            },
            "platform": "Aranet4"
        }
    ]
}

Environment:

  • Plugin Version: homebridge-aranet4 v0.0.3
  • Homebridge Version: homebridge-config-ui-x v4.50.2
  • Node.js Version: v19.2.0
  • NPM Version: 8.19.3
  • Operating System: macOS 13.0.1 (22A400
@finestructure finestructure added the bug Something isn't working label Dec 9, 2022
@quentinms quentinms self-assigned this Dec 21, 2022
quentinms added a commit that referenced this issue Dec 22, 2022
Remove the listener so we start fresh each time and avoid the
```
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChange listeners added to [Noble]. Use emitter.setMaxListeners() to increase limit
```
warning

Might fix #20
@quentinms
Copy link
Owner

I noticed I got those warnings when the Mac went asleep.

[12/22/2022, 3:35:27 AM] [Aranet4] poweredOff
[12/22/2022, 3:35:27 AM] [Aranet4] poweredOff
[12/22/2022, 3:35:27 AM] [Aranet4] poweredOff
[12/22/2022, 3:35:27 AM] [Aranet4] poweredOff
[12/22/2022, 3:35:27 AM] [Aranet4] poweredOff
[12/22/2022, 3:35:27 AM] [Aranet4] poweredOff
[12/22/2022, 3:35:27 AM] [Aranet4] poweredOff
[12/22/2022, 3:35:27 AM] [Aranet4] poweredOff
[12/22/2022, 3:35:27 AM] [Aranet4] poweredOff
[12/22/2022, 3:35:27 AM] [Aranet4] poweredOff
(node:18712) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChange listeners added to [Noble]. Use emitter.setMaxListeners() to increase limit

But it's a different error message than you (it's on [Noble], not [HomebridgeIpcService] or [Socket]).

I'm currently running #24 locally, and I'll see if it helps.

For your original error, there are a few similar issues in the homebridge repo https://github.com/search?q=repo%3Ahomebridge%2Fhomebridge+Possible+EventEmitter+memory+leak+detected&type=issues, some which have potential work arounds, or on reddit (https://old.reddit.com/r/homebridge/comments/vnl5qb/raspberry_pi_issues_running_homebridge_when/) so it might be a Homebridge issue rather than something with this plugin specifically.

quentinms added a commit that referenced this issue Jan 8, 2023
Remove the listener so we start fresh each time and we try to avoid the
```
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChange listeners added to [Noble]. Use emitter.setMaxListeners() to increase limit
```
warning

Might help for #20
@max-christian
Copy link

Did #24 help with this, @quentinms & @finestructure ? Just installed the plugin and it only ran for a few hours before losing contact.

pi@homebridge:/var/lib/homebridge $ grep Aranet4 homebridge.log
[01/11/2023, 18:29:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 18:34:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 18:39:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 18:44:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 18:49:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 18:54:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 18:59:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 19:04:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 19:09:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 19:14:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 19:19:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 19:24:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 19:29:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 19:34:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 19:39:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 19:44:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 19:49:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 19:54:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 19:59:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 20:04:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 20:09:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 20:14:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 20:19:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 20:24:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 20:29:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 20:34:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 20:39:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 20:44:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 20:49:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 20:54:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 20:59:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 21:04:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 21:09:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 21:14:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 21:19:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 21:24:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 21:29:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 21:34:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 21:39:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 21:44:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 21:49:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 21:54:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 21:59:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 22:04:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 22:09:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 22:14:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 22:19:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 22:24:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 22:29:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 22:34:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 22:39:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 22:44:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 22:49:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting
[01/11/2023, 22:54:32] [Aranet4 Platform] Connecting to c1e91f3cf3b0 : connecting

@finestructure
Copy link
Author

I've stopped using home bridge because it wasn't reliable for me but I might try again in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants