Skip to content

Matter Ikea Scroll: Aggregate multiple responses into one event, add global bounds checking#3014

Open
hcarter-775 wants to merge 2 commits into
mainfrom
add/multi-response-block-support
Open

Matter Ikea Scroll: Aggregate multiple responses into one event, add global bounds checking#3014
hcarter-775 wants to merge 2 commits into
mainfrom
add/multi-response-block-support

Conversation

@hcarter-775
Copy link
Copy Markdown
Contributor

@hcarter-775 hcarter-775 commented Jun 4, 2026

Description of Change

Add aggregation logic to ensure that only the last info block is handled when multiple responses come in to the driver at once, leaving all single-response chunks unaltered. This should aggregate all un-handled steps into before sending out the single event.

Add global bounds checking to ensure that if, in a single time-defined scroll series, no superfluous events are sent.

Summary of Completed Tests

Tested on various numbers of devices to ensure performant behavior across these varying cases.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

Test Results

   73 files    515 suites   0s ⏱️
2 904 tests 2 898 ✅ 0 💤 6 ❌
4 800 runs  4 794 ✅ 0 💤 6 ❌

For more details on these failures, see this check.

Results for commit 1fa21e3.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

File Coverage
All files 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_mk1/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/embedded_cluster_utils.lua 38%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/capability_handlers.lua 84%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/attribute_handlers.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/attribute_handlers.lua 80%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/event_handlers.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/event_utils.lua 41%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua 62%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua 87%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 1fa21e3

@hcarter-775 hcarter-775 force-pushed the add/multi-response-block-support branch from 336c8e1 to 0ca61eb Compare June 5, 2026 16:21
@hcarter-775 hcarter-775 force-pushed the add/multi-response-block-support branch from 0ca61eb to 1fa21e3 Compare June 5, 2026 17:44

function IkeaScrollEventUtils.requeue_clear_scroll_state(device)
-- Stores a timer object, which is required to cancel a timer early
local CLEAR_STATE_TIMER = "__clear_state_timer"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest putting this definition and the timeout (delay_s = 8) into fields along with the other fields

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.

2 participants