Skip to content

Commit

Permalink
Enable Ballast Configuration cluster in controller-clusters. (#20685)
Browse files Browse the repository at this point in the history
Also aligns the cluster XML with the Matter spec.
  • Loading branch information
bzbarsky-apple authored Jul 14, 2022
1 parent ece3732 commit 56b387d
Show file tree
Hide file tree
Showing 40 changed files with 8,100 additions and 323 deletions.
32 changes: 15 additions & 17 deletions src/app/zap-templates/zcl/data-model/silabs/ha.xml
Original file line number Diff line number Diff line change
Expand Up @@ -406,23 +406,21 @@ limitations under the License.
<define>BALLAST_CONFIGURATION_CLUSTER</define>
<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>
<globalAttribute side="either" code="0xFFFD" value="3"/>
<attribute side="server" code="0x0000" define="PHYSICAL_MIN_LEVEL" type="INT8U" min="0x01" max="0xFE" writable="false" default="0x01" optional="true">physical min level</attribute>
<attribute side="server" code="0x0001" define="PHYSICAL_MAX_LEVEL" type="INT8U" min="0x01" max="0xFE" writable="false" default="0xFE" optional="true">physical max level</attribute>
<attribute side="server" code="0x0002" define="BALLAST_STATUS" type="BITMAP8" min="0x00" max="0x03" writable="false" default="0x00" optional="false">ballast status</attribute>
<attribute side="server" code="0x0010" define="MIN_LEVEL" type="INT8U" min="0x01" max="0xFE" writable="true" default="0x01" optional="true">min level</attribute>
<attribute side="server" code="0x0011" define="MAX_LEVEL" type="INT8U" min="0x01" max="0xFE" writable="true" default="0xFE" optional="true">max level</attribute>
<attribute side="server" code="0x0012" define="POWER_ON_LEVEL" type="INT8U" min="0x00" max="0xFE" writable="true" default="0xFE" optional="true">power on level</attribute>
<attribute side="server" code="0x0013" define="POWER_ON_FADE_TIME" type="INT16U" min="0x0000" max="0xFFFE" writable="true" default="0x0000" optional="true">power on fade time</attribute>
<attribute side="server" code="0x0014" define="INTRINSIC_BALLAST_FACTOR" type="INT8U" min="0x00" max="0xFE" writable="true" optional="true">intrinsic ballast factor</attribute>
<attribute side="server" code="0x0015" define="BALLAST_FACTOR_ADJUSTMENT" type="INT8U" min="0x64" writable="true" default="0xFF" optional="true">ballast factor adjustment</attribute>
<attribute side="server" code="0x0020" define="LAMP_QUALITY" type="INT8U" min="0x00" max="0xFE" writable="false" optional="true">lamp quality</attribute>
<attribute side="server" code="0x0030" define="LAMP_TYPE" type="CHAR_STRING" length="16" writable="true" optional="true">lamp type</attribute>
<attribute side="server" code="0x0031" define="LAMP_MANUFACTURER" type="CHAR_STRING" length="16" writable="true" optional="true">lamp manufacturer</attribute>
<attribute side="server" code="0x0032" define="LAMP_RATED_HOURS" type="INT24U" min="0x000000" max="0xFFFFFE" writable="true" default="0xFFFFFF" optional="true">lamp rated hours</attribute>
<attribute side="server" code="0x0033" define="LAMP_BURN_HOURS" type="INT24U" min="0x000000" max="0xFFFFFE" writable="true" default="0x000000" optional="true">lamp burn hours</attribute>
<attribute side="server" code="0x0034" define="LAMP_ALARM_MODE" type="BITMAP8" min="0x00" max="0x01" writable="true" default="0x00" optional="true">lamp alarm mode</attribute>
<attribute side="server" code="0x0035" define="LAMP_BURN_HOURS_TRIP_POINT" type="INT24U" min="0x000000" max="0xFFFFFE" writable="true" default="0xFFFFFF" optional="true">lamp burn hours trip point</attribute>
<globalAttribute side="either" code="0xFFFD" value="4"/>
<attribute side="server" code="0x0000" define="PHYSICAL_MIN_LEVEL" type="INT8U" min="0x01" max="0xFE" writable="false" default="0x01" optional="false">PhysicalMinLevel</attribute>
<attribute side="server" code="0x0001" define="PHYSICAL_MAX_LEVEL" type="INT8U" min="0x01" max="0xFE" writable="false" default="0xFE" optional="false">PhysicalMaxLevel</attribute>
<attribute side="server" code="0x0002" define="BALLAST_STATUS" type="BITMAP8" min="0x00" max="0x03" writable="false" default="0x00" optional="true">BallastStatus</attribute>
<attribute side="server" code="0x0010" define="MIN_LEVEL" type="INT8U" min="0x01" max="0xFE" writable="true" default="0x01" optional="false">MinLevel</attribute>
<attribute side="server" code="0x0011" define="MAX_LEVEL" type="INT8U" min="0x01" max="0xFE" writable="true" default="0xFE" optional="false">MaxLevel</attribute>
<attribute side="server" code="0x0014" define="INTRINSIC_BALLAST_FACTOR" type="INT8U" writable="true" isNullable="true" optional="true">IntrinsicBalanceFactor</attribute>
<attribute side="server" code="0x0015" define="BALLAST_FACTOR_ADJUSTMENT" type="INT8U" min="0x64" writable="true" default="0xFE" isNullable="true" optional="true">BallastFactorAdjustment</attribute>
<attribute side="server" code="0x0020" define="LAMP_QUANTITY" type="INT8U" writable="false" optional="false">LampQuantity</attribute>
<attribute side="server" code="0x0030" define="LAMP_TYPE" type="CHAR_STRING" length="16" writable="true" optional="true">LampType</attribute>
<attribute side="server" code="0x0031" define="LAMP_MANUFACTURER" type="CHAR_STRING" length="16" writable="true" optional="true">LampManufacturer</attribute>
<attribute side="server" code="0x0032" define="LAMP_RATED_HOURS" type="INT24U" writable="true" default="0xFFFFFF" isNullable="true" optional="true">LampRatedHours</attribute>
<attribute side="server" code="0x0033" define="LAMP_BURN_HOURS" type="INT24U" writable="true" default="0x000000" isNullable="true" optional="true">LampBurnHours</attribute>
<attribute side="server" code="0x0034" define="LAMP_ALARM_MODE" type="BITMAP8" min="0x00" max="0x01" writable="true" default="0x00" optional="true">LampAlarmMode</attribute>
<attribute side="server" code="0x0035" define="LAMP_BURN_HOURS_TRIP_POINT" type="INT24U" writable="true" default="0xFFFFFF" isNullable="true" optional="true">LampBurnHoursTripPoint</attribute>
</cluster>
<cluster>
<name>Occupancy Sensing</name>
Expand Down
2 changes: 2 additions & 0 deletions src/app/zap_cluster_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
'APPLICATION_BASIC_CLUSTER': ['application-basic-server'],
'APPLICATION_LAUNCHER_CLUSTER': ['application-launcher-server'],
'AUDIO_OUTPUT_CLUSTER': ['audio-output-server'],
'BALLAST_CONFIGURATION_CLUSTER': [],
'BARRIER_CONTROL_CLUSTER': ['barrier-control-server'],
'BASIC_CLUSTER': ['basic'],
'BINARY_INPUT_BASIC_CLUSTER': [],
Expand Down Expand Up @@ -99,6 +100,7 @@
'APPLICATION_BASIC_CLUSTER': [],
'APPLICATION_LAUNCHER_CLUSTER': [],
'AUDIO_OUTPUT_CLUSTER': [],
'BALLAST_CONFIGURATION_CLUSTER': [],
'BARRIER_CONTROL_CLUSTER': [],
'BASIC_CLUSTER': [],
'BINARY_INPUT_BASIC_CLUSTER': [],
Expand Down
23 changes: 23 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3336,6 +3336,28 @@ client cluster ColorControl = 768 {
command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76;
}

client cluster BallastConfiguration = 769 {
readonly attribute int8u physicalMinLevel = 0;
readonly attribute int8u physicalMaxLevel = 1;
readonly attribute bitmap8 ballastStatus = 2;
attribute int8u minLevel = 16;
attribute int8u maxLevel = 17;
attribute nullable int8u intrinsicBalanceFactor = 20;
attribute nullable int8u ballastFactorAdjustment = 21;
readonly attribute int8u lampQuantity = 32;
attribute char_string<16> lampType = 48;
attribute char_string<16> lampManufacturer = 49;
attribute nullable int24u lampRatedHours = 50;
attribute nullable int24u lampBurnHours = 51;
attribute bitmap8 lampAlarmMode = 52;
attribute nullable int24u lampBurnHoursTripPoint = 53;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

client cluster IlluminanceMeasurement = 1024 {
enum LightSensorType : ENUM8 {
kPhotodiode = 0;
Expand Down Expand Up @@ -4393,6 +4415,7 @@ endpoint 1 {
binding cluster FanControl;
binding cluster ThermostatUserInterfaceConfiguration;
binding cluster ColorControl;
binding cluster BallastConfiguration;
binding cluster IlluminanceMeasurement;
binding cluster TemperatureMeasurement;
binding cluster PressureMeasurement;
Expand Down
Loading

0 comments on commit 56b387d

Please sign in to comment.