Skip to content

Commit

Permalink
Support Commands for rootnode_extendedcolorlight (project-chip#22477)
Browse files Browse the repository at this point in the history
* Support Commands for rootnode_extendedcolorlight

The current rootnode_extendedcolorlight_8lcaaYJVAa doesn't
support many commands such as MoveToHue, MoveToHueAndSaturation ... etc.
We add this patch to support them.

* Remove unnecessary Attributes not for ColorControl

Some Attributes referenced from examples/lighting-app are not for
ColorControl Cluster and not required by us.
And these also be complained by CI sanity check
  • Loading branch information
erwinpan1 authored and isiu-apple committed Sep 16, 2022
1 parent 21e5fd1 commit 594d067
Show file tree
Hide file tree
Showing 4 changed files with 431 additions and 1 deletion.
141 changes: 141 additions & 0 deletions examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1621,6 +1621,59 @@ server cluster ColorControl = 768 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct MoveToHueRequest {
INT8U hue = 0;
HueDirection direction = 1;
INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
}

request struct MoveHueRequest {
HueMoveMode moveMode = 0;
INT8U rate = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
}

request struct StepHueRequest {
HueStepMode stepMode = 0;
INT8U stepSize = 1;
INT8U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
}

request struct MoveToSaturationRequest {
INT8U saturation = 0;
INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
}

request struct MoveSaturationRequest {
SaturationMoveMode moveMode = 0;
INT8U rate = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
}

request struct StepSaturationRequest {
SaturationStepMode stepMode = 0;
INT8U stepSize = 1;
INT8U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
}

request struct MoveToHueAndSaturationRequest {
INT8U hue = 0;
INT8U saturation = 1;
INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
}

request struct MoveToColorRequest {
INT16U colorX = 0;
INT16U colorY = 1;
Expand All @@ -1644,9 +1697,97 @@ server cluster ColorControl = 768 {
BITMAP8 optionsOverride = 4;
}

request struct MoveToColorTemperatureRequest {
INT16U colorTemperature = 0;
INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
}

request struct EnhancedMoveToHueRequest {
INT16U enhancedHue = 0;
HueDirection direction = 1;
INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
}

request struct EnhancedMoveHueRequest {
HueMoveMode moveMode = 0;
INT16U rate = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
}

request struct EnhancedStepHueRequest {
HueStepMode stepMode = 0;
INT16U stepSize = 1;
INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
}

request struct EnhancedMoveToHueAndSaturationRequest {
INT16U enhancedHue = 0;
INT8U saturation = 1;
INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
}

request struct ColorLoopSetRequest {
ColorLoopUpdateFlags updateFlags = 0;
ColorLoopAction action = 1;
ColorLoopDirection direction = 2;
INT16U time = 3;
INT16U startHue = 4;
BITMAP8 optionsMask = 5;
BITMAP8 optionsOverride = 6;
}

request struct StopMoveStepRequest {
BITMAP8 optionsMask = 0;
BITMAP8 optionsOverride = 1;
}

request struct MoveColorTemperatureRequest {
HueMoveMode moveMode = 0;
INT16U rate = 1;
INT16U colorTemperatureMinimumMireds = 2;
INT16U colorTemperatureMaximumMireds = 3;
BITMAP8 optionsMask = 4;
BITMAP8 optionsOverride = 5;
}

request struct StepColorTemperatureRequest {
HueStepMode stepMode = 0;
INT16U stepSize = 1;
INT16U transitionTime = 2;
INT16U colorTemperatureMinimumMireds = 3;
INT16U colorTemperatureMaximumMireds = 4;
BITMAP8 optionsMask = 5;
BITMAP8 optionsOverride = 6;
}

command MoveToHue(MoveToHueRequest): DefaultSuccess = 0;
command MoveHue(MoveHueRequest): DefaultSuccess = 1;
command StepHue(StepHueRequest): DefaultSuccess = 2;
command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3;
command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4;
command StepSaturation(StepSaturationRequest): DefaultSuccess = 5;
command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6;
command MoveToColor(MoveToColorRequest): DefaultSuccess = 7;
command MoveColor(MoveColorRequest): DefaultSuccess = 8;
command StepColor(StepColorRequest): DefaultSuccess = 9;
command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10;
command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64;
command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65;
command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66;
command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67;
command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68;
command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71;
command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75;
command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76;
}

endpoint 0 {
Expand Down
130 changes: 129 additions & 1 deletion examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap
Original file line number Diff line number Diff line change
Expand Up @@ -6954,6 +6954,62 @@
"side": "client",
"enabled": 0,
"commands": [
{
"name": "MoveToHue",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "MoveHue",
"code": 1,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "StepHue",
"code": 2,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "MoveToSaturation",
"code": 3,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "MoveSaturation",
"code": 4,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "StepSaturation",
"code": 5,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "MoveToHueAndSaturation",
"code": 6,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "MoveToColor",
"code": 7,
Expand All @@ -6977,6 +7033,78 @@
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "MoveToColorTemperature",
"code": 10,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "EnhancedMoveToHue",
"code": 64,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "EnhancedMoveHue",
"code": 65,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "EnhancedStepHue",
"code": 66,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "EnhancedMoveToHueAndSaturation",
"code": 67,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "ColorLoopSet",
"code": 68,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "StopMoveStep",
"code": 71,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "MoveColorTemperature",
"code": 75,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "StepColorTemperature",
"code": 76,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": [
Expand Down Expand Up @@ -8283,4 +8411,4 @@
"deviceIdentifier": 269
}
]
}
}
Loading

0 comments on commit 594d067

Please sign in to comment.