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

Fix 'Locking...' and 'Unlocking...' issue #66

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

dacarson
Copy link

When a lock is unlocked or locked manually, the event is correctly sent to the plugin, and the current state is updated. The lock target state also needs to be updated to match the current state.

♻️ Current situation

As the Target state is not updated, it is stale, and reflects the last state of the lock. Which is often the opposite of the new Current state. So in the HomeKit UIs it will show that the lock is currently transitioning from the Current state to the Target state, and the UI will be stuck there until the user either uses HomeKit to change the lock state, or manually restores the lock to the previous state.

💡 Proposed solution

When the event arrives that the user has manually changed the lock state, also update the Target lock state to match.

⚙️ Release Notes

Fixes issue #22 where manual lock changes result in Home app showing the lock stuck in transition mode.

Testing

Manually tested on my Homebridge setup with two August Locks (AUG-SL04-M01-G04) that do not have DoorSense setup. Manual testing included:

  • Manually changing lock state and checking that the UI updated correctly.
  • Changing the lock state in the Home app and checking that the UI updated correctly and the physical locks changed state.
  • Changing the lock state in the August app via Bluetooth, and checking that the UI updated correctly and the physical locks changed state
  • Changing the lock state in the August app via Bluetooth, and checking that the UI updated correctly and the physical locks changed state

Reviewer Nudging

Focus on when a lock state change happens externally to HomeKit.

When a lock is unlocked or locked manually, the event is correctly sent to the plugin, and the current state is updated. The lock target state also needs to be updated to match the current state.
@jspiro
Copy link

jspiro commented Jul 25, 2023

Ready to help test as soon as this is available in the 1.2 beta release. I use DoorSense.

@donavanbecker donavanbecker changed the base branch from latest to beta-1.2.0 July 26, 2023 00:20
@donavanbecker donavanbecker merged commit f967182 into homebridge-plugins:beta-1.2.0 Jul 26, 2023
@donavanbecker donavanbecker mentioned this pull request Jul 27, 2023
donavanbecker added a commit that referenced this pull request Aug 19, 2023
## [Version 1.2.0](https://github.com/donavanbecker/homebridge-august/releases/tag/v1.2.0) (2023-08-19)

## What's Changes
- Fixed debugging issue, Thanks [@dacarson](https://github.com/dacarson) [#69](#69)
- Reduce August API calls, Thanks [@dacarson](https://github.com/dacarson) [#69](#69)
- Fix 'Locking...' and 'Unlocking...' issue, Thanks [@dacarson](https://github.com/dacarson) [#66](#66)
- Default Refresh Rate has been updated to limit the rate at which we refresh from August APIs.
  - This should fix any Status 429 Errors. [#55](#55)

**Full Changelog**: v1.1.1...v1.2.0
donavanbecker added a commit that referenced this pull request Aug 19, 2023
## [Version 1.2.0](https://github.com/donavanbecker/homebridge-august/releases/tag/v1.2.0) (2023-08-19)

## What's Changes
- Fixed debugging issue, Thanks [@dacarson](https://github.com/dacarson) [#69](#69)
- Reduce August API calls, Thanks [@dacarson](https://github.com/dacarson) [#69](#69)
- Fix 'Locking...' and 'Unlocking...' issue, Thanks [@dacarson](https://github.com/dacarson) [#66](#66)
- Default Refresh Rate has been updated to limit the rate at which we refresh from August APIs.
  - This should fix any Status 429 Errors. [#55](#55)

**Full Changelog**: v1.1.1...v1.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants