feat(homebridge-ring): add allowDisarm option to block disarm from HomeKit#1650
Open
salmanesm wants to merge 5 commits intodgreif:mainfrom
Open
feat(homebridge-ring): add allowDisarm option to block disarm from HomeKit#1650salmanesm wants to merge 5 commits intodgreif:mainfrom
salmanesm wants to merge 5 commits intodgreif:mainfrom
Conversation
…rom HomeKit - Introduced `allowDisarm` configuration parameter to the Homebridge Ring plugin. - When set to `false`, disarming the Ring Alarm from HomeKit is blocked for added security. - Updated documentation to reflect
Author
|
Hi @dgreif — this adds an optional |
Author
|
Config used for validation: "allowDisarm": false |
… is blocked When allowDisarm=false, set Target & Current back to the actual state and re-assert after onSet (200ms, 1000ms) so the Home app reliably snaps back without an error.
- Compute `effectiveAllowDisarm`: `blockDisarm === true` → false; else `allowDisarm !== false` - Use `effectiveAllowDisarm` in `security-panel.setTargetState` to decide whether to no-op/snap-back on disarm
Owner
|
Thanks for the PR @salmanesm! I see the error banner as a "feature", not a bug. What are the scenarios where you expect a disarm to fail and are ok with it? |
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.
feat(homebridge-ring): add
allowDisarmoption to block disarm from HomeKitCloses #1651
Summary
Adds a new optional config flag,
allowDisarm(default:true), to the Homebridge Ring plugin. When set tofalse, HomeKit Disarm requests are quietly blocked, while Arm Home/Away/Night continue to work as usual.Why
Throwing an error from the
.onSethandler produced a red error banner in the Home app / Siri, which was confusing even though the block was intentional. This change switches to a no-op + snap-back: the request is ignored and the Home app tile immediately reverts without an error toast.What changed
allowDisarm?: boolean(defaulttrue, backward-compatible).security-panel.ts:state === DISARMandallowDisarm === false, log a warning, reset Target and Current state so the UI snaps back, and return early (no Ring API call, no thrown error).Behavior
allowDisarm: true→ unchanged (HomeKit can arm & disarm).allowDisarm: false→ Disarm is ignored; UI/Siri show no error; Ring remains armed.Config example
{ "platform": "Ring", "refreshToken": "<your-token>", "allowDisarm": false }