-
Notifications
You must be signed in to change notification settings - Fork 420
Add optional macOS system sleep prevention setting for HomeKit reliability #2539
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
base: beta-5.8.1
Are you sure you want to change the base?
Conversation
|
@NorthernMan54 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: NorthernMan54 <[email protected]>
Co-authored-by: NorthernMan54 <[email protected]>
Co-authored-by: NorthernMan54 <[email protected]>
|
@copilot pls edit this PR so it is against the latest beta branch |
✅ Done! I've rebased the PR against the latest beta branch (beta-5.5.1). The PR now includes all the same fixes but is based on the beta branch with commits ff2a077. All features remain the same:
The PR is now ready for the beta release cycle. |
125531b to
ef33e98
Compare
5adcf37 to
8cfe941
Compare
974ae19 to
4120ea1
Compare
This PR addresses HomeKit accessories becoming unresponsive when macOS systems enter sleep mode by adding an optional user-configurable setting to prevent system sleep.
Problem
By default, macOS allows systems to sleep when inactive, which interrupts background processes like Homebridge. This leads to:
Solution
Instead of forcing sleep prevention on all users, this implementation provides a user-controllable option:
New UI Setting
Backend Implementation
caffeinate -sonly when enabled/config-editor/uiAPI endpoint for saving the settingExample Usage
When the setting is enabled, the LaunchDaemon runs:
When disabled (default), it runs normally without caffeinate.
Technical Details
This gives users control over their system's sleep behavior while ensuring HomeKit accessories remain responsive for those who choose to enable the feature.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.