Skip to content

Scenes cluster handler#469

Merged
ivmarkov merged 15 commits into
project-chip:mainfrom
sysgrok:scenes
Jun 1, 2026
Merged

Scenes cluster handler#469
ivmarkov merged 15 commits into
project-chip:mainfrom
sysgrok:scenes

Conversation

@ivmarkov
Copy link
Copy Markdown
Contributor

@ivmarkov ivmarkov commented Jun 1, 2026

This PR implements the Scenes cluster handler, as well as a generic framework so that "scene-aware" cluster handlers like On-Off, Level-Control, and - in future - Color-Control and others can integrate with the Scenes cluster handler.

There is also a new scenes YAML/Python suite, and all YAML and Python tests related to Scenes in the chip-tool repo do pass.

=====

The PR also contains a small fix to our PASE responder so that it could accept salt < 32 bytes as long as it is >= 16 bytes. This is a spec-compliant behavior, and without it, the YAML tests fail.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the Scenes Management cluster handler and its state management, integrating it with the On/Off and LevelControl clusters, and adds a skeleton ColorControl cluster handler to support scene capture and recall. It also includes a new scenes_tests example, integration tests, and PASE commissioning salt length validation. Feedback on the changes highlights several critical issues: in ColorControlHandler, the conversion between 8-bit CurrentHue and 16-bit EnhancedCurrentHue is incorrect in both directions (requiring 8-bit shifts), and the ColorMode attribute needs to be kept in sync with EnhancedColorMode. Additionally, in ScenesHandler, AddScene should return SC_INSUFFICIENT_SPACE instead of failing with a generic error when the payload exceeds capacity, and Scene ID 0x00 should be validated and rejected as a reserved value across all scene commands.

Comment thread rs-matter/src/dm/clusters/app/color_control.rs Outdated
Comment thread rs-matter/src/dm/clusters/app/color_control.rs
Comment thread rs-matter/src/dm/clusters/scenes.rs
Comment thread rs-matter/src/dm/clusters/app/color_control.rs
Comment thread rs-matter/src/dm/clusters/scenes.rs
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

PR #469: Size comparison from fa71b9c to 7fbfbd5

Increases above 0.2%:

platform target config section fa71b9c 7fbfbd5 change % change
(core) thumbv6m-none-eabi infodefmt-optz-ltofat FLASH 362424 363196 772 0.2
onoff-light-bt x86_64-unknown-linux-gnu infologs-optz-ltofat FLASH 3367784 3506192 138408 4.1
Full report (8 builds for (core), dimmable-light, onoff-light, onoff-light-bt, speaker)
platform target config section fa71b9c 7fbfbd5 change % change
(core) riscv32imac-unknown-none-elf infodefmt-optz-ltofat FLASH 448454 449194 740 0.2
RAM 71056 71088 32 0.0
thumbv6m-none-eabi infodefmt-optz-ltofat FLASH 362424 363196 772 0.2
RAM 66628 66636 8 0.0
thumbv7em-none-eabi infodefmt-optz-ltofat FLASH 340292 340260 -32 -0.0
RAM 66396 66404 8 0.0
x86_64-unknown-linux-gnu infologs-optz-ltofat FLASH 877187 878323 1136 0.1
RAM 71386 71402 16 0.0
dimmable-light x86_64-unknown-linux-gnu infologs-optz-ltofat FLASH 2056272 2057952 1680 0.1
RAM 60368 60368 0 0.0
onoff-light x86_64-unknown-linux-gnu infologs-optz-ltofat FLASH 1984328 1984416 88 0.0
RAM 59536 59536 0 0.0
onoff-light-bt x86_64-unknown-linux-gnu infologs-optz-ltofat FLASH 3367784 3506192 138408 4.1
RAM 5776 5776 0 0.0
speaker x86_64-unknown-linux-gnu infologs-optz-ltofat FLASH 2019120 2019736 616 0.0
RAM 5472 5472 0 0.0

@ivmarkov ivmarkov enabled auto-merge (squash) June 1, 2026 11:40
@ivmarkov ivmarkov disabled auto-merge June 1, 2026 11:40
@ivmarkov ivmarkov merged commit d81fb20 into project-chip:main Jun 1, 2026
14 checks passed
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.

1 participant