Fix memory leaks in motion and contact sensor drivers#679
Open
brakedalen wants to merge 1 commit into
Open
Conversation
- Add onUninit() lifecycle methods to clean up event listeners - Prevent duplicate listener registration on device reconnect - Store bound listener references for proper cleanup - Clear timeouts (suppressTimeout, _motionAlarmTimeout) on uninit - Use this.homey.setTimeout() for automatic cleanup on app shutdown - Add .catch(this.error) to prevent unhandled promise rejections - Bump version to 2.1.1 Affected drivers: - SML001-occupancy (indoor motion sensor) - SML002-occupancy (outdoor motion sensor) - SML001 (indoor motion sensor - timed) - SML002 (outdoor motion sensor - timed) - SOC001 (contact sensor) Fixes JohanBendz#615, JohanBendz#672 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Author
|
I'm testing this build now, to see if it helps to solve the issue. Will report back here after a few days to let you know the results. Looks good after 1 hour of testing 👍 |
Author
|
It appears that this helped, but it didn't fully resolve the issue. I’ve gone back to the bridge app since I need my lights to operate reliably. I hope you can still make use of the work I’ve done @JohanBendz 😉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Affected drivers:
Fixes #615, #672
🤖 Generated with Claude Code