Skip to content

Matter Ikea Scroll: Aggregate multiple responses into one event, remove InitialPress handling during scroll#3014

Merged
hcarter-775 merged 6 commits into
mainfrom
add/multi-response-block-support
Jun 17, 2026
Merged

Matter Ikea Scroll: Aggregate multiple responses into one event, remove InitialPress handling during scroll#3014
hcarter-775 merged 6 commits into
mainfrom
add/multi-response-block-support

Conversation

@hcarter-775

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

Copy link
Copy Markdown
Contributor

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.

Remove any mapping for InitialPress to a rotateAmount event.

Summary of Completed Tests

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

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Channel deleted.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Test Results

   73 files    515 suites   0s ⏱️
2 908 tests 2 908 ✅ 0 💤 0 ❌
4 804 runs  4 804 ✅ 0 💤 0 ❌

Results for commit 1799207.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

File Coverage
All files 91%
/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/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/sub_drivers/ikea_scroll/scroll_utils/event_utils.lua 16%
/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/camera/camera_utils/utils.lua 98%
/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/sub_drivers/camera/camera_handlers/capability_handlers.lua 84%
/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/init.lua 97%
/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/switch_utils/utils.lua 92%
/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/sub_drivers/ikea_scroll/init.lua 87%
/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/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua 72%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/init.lua 95%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 1799207

@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
local presses_in_current_chain = 0
for _, ib in ipairs(info_blocks) do
if ib.info_block.event_id == clusters.Switch.events.MultiPressOngoing.ID then
presses_in_current_chain = presses_in_current_chain + (ib.info_block.data.elements and ib.info_block.data.elements.current_number_of_presses_counted.value or 0)

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.

If the message contains multiple MultiPressOngoing events I think we want to take the current_number_of_presses_counted from the last one and not add the value reported in each one. For example, say we receive a message that has MultiPressOngoing events with current_number_of_presses_counted values of 3, 6 and 12. We want the result to be 12, not 3 + 6 + 12.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ah, yeah that's very true. Will make that update!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added 0783d02

@hcarter-775 hcarter-775 changed the title Matter Ikea Scroll: Aggregate multiple responses into one event, add global bounds checking Matter Ikea Scroll: Aggregate multiple responses into one event, add global bounds checking, remove InitialPress handling during scroll Jun 15, 2026
@hcarter-775 hcarter-775 changed the title Matter Ikea Scroll: Aggregate multiple responses into one event, add global bounds checking, remove InitialPress handling during scroll Matter Ikea Scroll: Aggregate multiple responses into one event, remove InitialPress handling during scroll Jun 17, 2026
@hcarter-775
hcarter-775 merged commit d740b1e into main Jun 17, 2026
16 checks passed
@hcarter-775
hcarter-775 deleted the add/multi-response-block-support branch June 17, 2026 16:27
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