Scenes cluster handler#469
Conversation
There was a problem hiding this comment.
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.
|
PR #469: Size comparison from fa71b9c to 7fbfbd5 Increases above 0.2%:
Full report (8 builds for (core), dimmable-light, onoff-light, onoff-light-bt, speaker)
|
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
scenesYAML/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.