Skip to content

Matter Window Covering: Fix shades that get stuck opening/closing#3050

Open
tpmanley wants to merge 1 commit into
mainfrom
bugfix/window-covering-status
Open

Matter Window Covering: Fix shades that get stuck opening/closing#3050
tpmanley wants to merge 1 commit into
mainfrom
bugfix/window-covering-status

Conversation

@tpmanley

Copy link
Copy Markdown
Contributor

As reported in https://community.smartthings.com/t/smartwings-shades-matter-over-thread-stuck-on-opening-and-closing/309925 and thanks to the analysis done by @ldeora, it seems some shades get stuck in an opening or closing state. This attempts to fix this by starting a timer when the shade reports that it stopped moving. If a lift or tilt report is received then it cancels the timer. If the timer fires (meaning a lift or tilt report was not received within the timeout) then it will do a read of lift and/or tilt to determine the current position and update the windowShade state.

Resolves: #3043

Check all that apply

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • New feature
  • Refactor

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have verified my changes by testing with a device or have communicated a plan for testing
  • I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

Summary of Completed Tests

I have not had a chance to test this with a real device yet and won't be in a position to for some time. Would appreciate some help testing.

As reported in https://community.smartthings.com/t/smartwings-shades-matter-over-thread-stuck-on-opening-and-closing/309925
and thanks to the analysis done by @ldeora, it seems some shades get stuck
in an opening or closing state. This attempts to fix this by starting a timer
when the shade reports that it stopped moving. If a lift or tilt report is
received then it cancels the timer. If the timer fires (meaning a lift or
tilt report was not received within the timeout) then it will do a read
of lift and/or tilt to determine the current position and update the
windowShade state.

Resolves: #3043
@tpmanley tpmanley requested review from ctowns and hcarter-775 June 25, 2026 06:00
@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Test Results

   73 files    517 suites   0s ⏱️
2 954 tests 2 954 ✅ 0 💤 0 ❌
4 851 runs  4 851 ✅ 0 💤 0 ❌

Results for commit 931af02.

@github-actions

Copy link
Copy Markdown

File Coverage
All files 88%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/sub_drivers/closure/closure_utils/utils.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/sub_drivers/closure/closure_handlers/attribute_handlers.lua 88%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/sub_drivers/closure/closure_handlers/capability_handlers.lua 73%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/sub_drivers/closure/init.lua 79%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/lazy_load_subdriver.lua 57%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/sub_drivers/matter-window-covering-position-updates-while-moving/can_handle.lua 70%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 931af02

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.

Matter Window Covering: final open/closed state may not be resolved when OperationalStatus returns to 0

1 participant