diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
index 4180b1eef78e26..dbaaf04237a9b4 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
@@ -6301,7 +6301,7 @@ cluster RelativeHumidityMeasurement = 1029 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -6339,6 +6339,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
index 363da41015d0b0..49be7047972beb 100644
--- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
+++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
@@ -4735,7 +4735,7 @@ cluster RelativeHumidityMeasurement = 1029 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -4773,6 +4773,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap
index 2482ca381ee7af..dbab34c300bd41 100644
--- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap
+++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap
@@ -12488,4 +12488,4 @@
"parentEndpointIdentifier": null
}
]
-}
+}
\ No newline at end of file
diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter
index 5edebd77931b80..79dfef5be486d8 100644
--- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter
+++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter
@@ -1917,7 +1917,7 @@ cluster FixedLabel = 64 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -1955,6 +1955,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter
index 8b8c2003f7bc29..767012e788c629 100644
--- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter
+++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter
@@ -1812,7 +1812,7 @@ cluster FixedLabel = 64 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -1850,6 +1850,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter
index 0bf5f933e3d543..b73b9867cce1c3 100644
--- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter
+++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter
@@ -1968,7 +1968,7 @@ provisional cluster ScenesManagement = 98 {
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -2006,6 +2006,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.zap b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.zap
index 40df85e6248d6e..6860a53833d87f 100644
--- a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.zap
+++ b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.zap
@@ -2801,4 +2801,4 @@
"parentEndpointIdentifier": null
}
]
-}
+}
\ No newline at end of file
diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap
index 7404c36bb6a120..79ec3559c8319f 100644
--- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap
+++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap
@@ -2780,4 +2780,4 @@
"parentEndpointIdentifier": null
}
]
-}
+}
\ No newline at end of file
diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter
index 146cc74bf0526f..9d7e22c21dc1ac 100644
--- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter
+++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter
@@ -1615,7 +1615,7 @@ cluster FixedLabel = 64 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -1653,6 +1653,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
@@ -1896,7 +1900,7 @@ endpoint 0 {
}
}
endpoint 1 {
- device type ma_occupancysensor = 263, version 1;
+ device type ma_occupancysensor = 263, version 4;
binding cluster Groups;
binding cluster Binding;
diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap
index 94cd749abacb5c..3d817ad7191ee9 100644
--- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap
+++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap
@@ -2484,7 +2484,7 @@
}
],
"deviceVersions": [
- 1
+ 4
],
"deviceIdentifiers": [
263
@@ -3022,4 +3022,4 @@
"parentEndpointIdentifier": null
}
]
-}
+}
\ No newline at end of file
diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter
index ae6441c2eaebea..77e88549108fa8 100644
--- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter
+++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter
@@ -2118,7 +2118,7 @@ cluster RelativeHumidityMeasurement = 1029 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -2156,6 +2156,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/examples/chef/sample_app_util/test_files/sample_zap_file.zap b/examples/chef/sample_app_util/test_files/sample_zap_file.zap
index 87dd68c26e1d74..2e72d5b9db48b2 100644
--- a/examples/chef/sample_app_util/test_files/sample_zap_file.zap
+++ b/examples/chef/sample_app_util/test_files/sample_zap_file.zap
@@ -5683,4 +5683,4 @@
"parentEndpointIdentifier": null
}
]
-}
+}
\ No newline at end of file
diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter
index bb1c2827a8d609..eb551dd395a9ae 100644
--- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter
+++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter
@@ -1914,7 +1914,7 @@ cluster BooleanState = 69 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -1952,6 +1952,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap
index 8815cb496a719c..0486ab6d328c97 100644
--- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap
+++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap
@@ -4750,4 +4750,4 @@
"parentEndpointIdentifier": null
}
]
-}
+}
\ No newline at end of file
diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap
index 80a6d6dc6a7602..fdeaef99bfcc36 100644
--- a/examples/light-switch-app/light-switch-common/light-switch-app.zap
+++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap
@@ -5903,4 +5903,4 @@
"parentEndpointIdentifier": null
}
]
-}
+}
\ No newline at end of file
diff --git a/examples/light-switch-app/qpg/zap/switch.zap b/examples/light-switch-app/qpg/zap/switch.zap
index 4509b773fac6ee..b402b32c960efa 100644
--- a/examples/light-switch-app/qpg/zap/switch.zap
+++ b/examples/light-switch-app/qpg/zap/switch.zap
@@ -6569,4 +6569,4 @@
"parentEndpointIdentifier": null
}
]
-}
+}
\ No newline at end of file
diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter
index df7f0dfe4d9a55..700b615879ceef 100644
--- a/examples/lighting-app/lighting-common/lighting-app.matter
+++ b/examples/lighting-app/lighting-common/lighting-app.matter
@@ -2634,7 +2634,7 @@ cluster ColorControl = 768 {
command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -2672,6 +2672,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap
index 6592c66dfea564..e73563ebe35ec8 100644
--- a/examples/lighting-app/lighting-common/lighting-app.zap
+++ b/examples/lighting-app/lighting-common/lighting-app.zap
@@ -5932,4 +5932,4 @@
"parentEndpointIdentifier": null
}
]
-}
+}
\ No newline at end of file
diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter
index 33521a7a93fa75..5cc4c47092ba77 100644
--- a/examples/placeholder/linux/apps/app1/config.matter
+++ b/examples/placeholder/linux/apps/app1/config.matter
@@ -6651,7 +6651,7 @@ cluster RelativeHumidityMeasurement = 1029 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -6689,6 +6689,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap
index 1a21bd9533419b..0dff614f290388 100644
--- a/examples/placeholder/linux/apps/app1/config.zap
+++ b/examples/placeholder/linux/apps/app1/config.zap
@@ -15129,4 +15129,4 @@
"parentEndpointIdentifier": null
}
]
-}
+}
\ No newline at end of file
diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter
index 86d20b24a4f629..cee95d2d1cfa7a 100644
--- a/examples/placeholder/linux/apps/app2/config.matter
+++ b/examples/placeholder/linux/apps/app2/config.matter
@@ -6608,7 +6608,7 @@ cluster RelativeHumidityMeasurement = 1029 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -6646,6 +6646,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap
index 9bc81ae46fea4c..a3b75ae5203e2f 100644
--- a/examples/placeholder/linux/apps/app2/config.zap
+++ b/examples/placeholder/linux/apps/app2/config.zap
@@ -14889,4 +14889,4 @@
"parentEndpointIdentifier": null
}
]
-}
+}
\ No newline at end of file
diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter
index c99a5c2f2c7782..a356b78b628cc1 100644
--- a/examples/pump-app/pump-common/pump-app.matter
+++ b/examples/pump-app/pump-common/pump-app.matter
@@ -1918,7 +1918,7 @@ cluster FlowMeasurement = 1028 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -1956,6 +1956,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter
index 4327438f220783..f88f26870c0224 100644
--- a/examples/pump-app/silabs/data_model/pump-thread-app.matter
+++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter
@@ -1918,7 +1918,7 @@ cluster FlowMeasurement = 1028 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -1956,6 +1956,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter
index 4327438f220783..f88f26870c0224 100644
--- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter
+++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter
@@ -1918,7 +1918,7 @@ cluster FlowMeasurement = 1028 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -1956,6 +1956,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml
index 23746d916cfa0f..0141a7542f4d78 100644
--- a/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml
@@ -47,7 +47,7 @@ limitations under the License.
Occupancy Sensing
Measurement & Sensing
- Attributes and commands for configuring occupancy sensing, and reporting occupancy status.
+ The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status.
0x0406
OCCUPANCY_SENSING_CLUSTER
@@ -147,5 +147,10 @@ limitations under the License.
+
+
+ If this event is supported, it SHALL be generated when the Occupancy attribute changes.
+
+
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index 1413833c1b14c7..6fa99d2558bf0f 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -7598,7 +7598,7 @@ cluster RelativeHumidityMeasurement = 1029 {
readonly attribute int16u clusterRevision = 65533;
}
-/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */
+/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;
@@ -7636,6 +7636,10 @@ cluster OccupancySensing = 1030 {
int16u holdTimeDefault = 2;
}
+ info event OccupancyChanged = 0 {
+ OccupancyBitmap occupancy = 0;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java
index 160f29d2cf8344..916493fc2b60c3 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java
@@ -5871,6 +5871,52 @@ public String toString() {
return output.toString();
}
}
+public static class OccupancySensingClusterOccupancyChangedEvent {
+ public Integer occupancy;
+ private static final long OCCUPANCY_ID = 0L;
+
+ public OccupancySensingClusterOccupancyChangedEvent(
+ Integer occupancy
+ ) {
+ this.occupancy = occupancy;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(OCCUPANCY_ID, new UIntType(occupancy)));
+
+ return new StructType(values);
+ }
+
+ public static OccupancySensingClusterOccupancyChangedEvent decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer occupancy = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == OCCUPANCY_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ occupancy = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new OccupancySensingClusterOccupancyChangedEvent(
+ occupancy
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("OccupancySensingClusterOccupancyChangedEvent {\n");
+ output.append("\toccupancy: ");
+ output.append(occupancy);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class TargetNavigatorClusterTargetUpdatedEvent {
public ArrayList targetList;
public Integer currentTarget;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index 5dbefbab1da2b7..30f064babb1fa5 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -13593,7 +13593,8 @@ public static Attribute value(long id) throws NoSuchFieldError {
}
}
- public enum Event {;
+ public enum Event {
+ OccupancyChanged(0L),;
private final long id;
Event(long id) {
this.id = id;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt
new file mode 100644
index 00000000000000..6d2aa3d4c9faa9
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt
@@ -0,0 +1,52 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.eventstructs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class OccupancySensingClusterOccupancyChangedEvent(val occupancy: UInt) {
+ override fun toString(): String = buildString {
+ append("OccupancySensingClusterOccupancyChangedEvent {\n")
+ append("\toccupancy : $occupancy\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_OCCUPANCY), occupancy)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_OCCUPANCY = 0
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OccupancySensingClusterOccupancyChangedEvent {
+ tlvReader.enterStructure(tlvTag)
+ val occupancy = tlvReader.getUInt(ContextSpecificTag(TAG_OCCUPANCY))
+
+ tlvReader.exitContainer()
+
+ return OccupancySensingClusterOccupancyChangedEvent(occupancy)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
index 9665346b3d04b2..3642d238e664f7 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
@@ -205,6 +205,7 @@ eventstructs_sources = [
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessageCompleteEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessagePresentedEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessageQueuedEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt",
diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt
new file mode 100644
index 00000000000000..dc13e3f291f39f
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt
@@ -0,0 +1,52 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.eventstructs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class OccupancySensingClusterOccupancyChangedEvent(val occupancy: UByte) {
+ override fun toString(): String = buildString {
+ append("OccupancySensingClusterOccupancyChangedEvent {\n")
+ append("\toccupancy : $occupancy\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_OCCUPANCY), occupancy)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_OCCUPANCY = 0
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OccupancySensingClusterOccupancyChangedEvent {
+ tlvReader.enterStructure(tlvTag)
+ val occupancy = tlvReader.getUByte(ContextSpecificTag(TAG_OCCUPANCY))
+
+ tlvReader.exitContainer()
+
+ return OccupancySensingClusterOccupancyChangedEvent(occupancy)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni
index 62769c99e0bb89..90d1e060b724c3 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni
@@ -205,6 +205,7 @@ matter_eventstructs_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/MessagesClusterMessageCompleteEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/MessagesClusterMessagePresentedEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/MessagesClusterMessageQueuedEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt",
diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
index b9d5e76c909135..e695cd1dc794a2 100644
--- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
@@ -7688,6 +7688,43 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader &
using namespace app::Clusters::OccupancySensing;
switch (aPath.mEventId)
{
+ case Events::OccupancyChanged::Id: {
+ Events::OccupancyChanged::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value_occupancy;
+ std::string value_occupancyClassName = "java/lang/Integer";
+ std::string value_occupancyCtorSignature = "(I)V";
+ jint jnivalue_occupancy = static_cast(cppValue.occupancy.Raw());
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ value_occupancyClassName.c_str(), value_occupancyCtorSignature.c_str(), jnivalue_occupancy, value_occupancy);
+
+ jclass occupancyChangedStructClass;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipEventStructs$OccupancySensingClusterOccupancyChangedEvent",
+ occupancyChangedStructClass);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipEventStructs$OccupancySensingClusterOccupancyChangedEvent");
+ return nullptr;
+ }
+
+ jmethodID occupancyChangedStructCtor;
+ err = chip::JniReferences::GetInstance().FindMethod(env, occupancyChangedStructClass, "",
+ "(Ljava/lang/Integer;)V", &occupancyChangedStructCtor);
+ if (err != CHIP_NO_ERROR || occupancyChangedStructCtor == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipEventStructs$OccupancySensingClusterOccupancyChangedEvent constructor");
+ return nullptr;
+ }
+
+ jobject value = env->NewObject(occupancyChangedStructClass, occupancyChangedStructCtor, value_occupancy);
+
+ return value;
+ }
default:
*aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
break;
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 9808b113f234b7..ecd84b76523bce 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -38399,6 +38399,26 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
value: 'uint' = 0
+ class Events:
+ @dataclass
+ class OccupancyChanged(ClusterEvent):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000406
+
+ @ChipUtility.classproperty
+ def event_id(cls) -> int:
+ return 0x00000000
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="occupancy", Tag=0, Type=uint),
+ ])
+
+ occupancy: 'uint' = 0
+
@dataclass
class CarbonMonoxideConcentrationMeasurement(Cluster):
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
index f15337ff56f41c..4dc89b0bb26417 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -11910,7 +11910,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
/**
* Cluster Occupancy Sensing
*
- * Attributes and commands for configuring occupancy sensing, and reporting occupancy status.
+ * The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status.
*/
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
@interface MTRBaseClusterOccupancySensing : MTRGenericBaseCluster
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
index 33251439bbc237..7d161a0b4302ed 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
@@ -7494,6 +7494,11 @@ typedef NS_ENUM(uint32_t, MTREventIDType) {
MTREventIDTypeClusterPumpConfigurationAndControlEventAirDetectionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000F,
MTREventIDTypeClusterPumpConfigurationAndControlEventTurbineOperationID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000010,
+ // Cluster OccupancySensing deprecated event names
+
+ // Cluster OccupancySensing events
+ MTREventIDTypeClusterOccupancySensingEventOccupancyChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+
// Cluster TargetNavigator deprecated event names
// Cluster TargetNavigator events
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
index d3715b49d0d250..f8450897d10522 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
@@ -10764,6 +10764,11 @@
switch (eventID) {
+ // Cluster OccupancySensing events
+ case MTREventIDTypeClusterOccupancySensingEventOccupancyChangedID:
+ result = @"OccupancyChanged";
+ break;
+
default:
result = [NSString stringWithFormat:@"", eventID];
break;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
index 9db1460dbcb609..b3f63ee7132564 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
@@ -5496,7 +5496,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
/**
* Cluster Occupancy Sensing
- * Attributes and commands for configuring occupancy sensing, and reporting occupancy status.
+ * The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status.
*/
MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
@interface MTRClusterOccupancySensing : MTRGenericCluster
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
index cb2e1800de750f..99f43ea97f0360 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
@@ -4099,6 +4099,23 @@ static id _Nullable DecodeEventPayloadForOccupancySensingCluster(EventId aEventI
{
using namespace Clusters::OccupancySensing;
switch (aEventId) {
+ case Events::OccupancyChanged::Id: {
+ Events::OccupancyChanged::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+
+ __auto_type * value = [MTROccupancySensingClusterOccupancyChangedEvent new];
+
+ do {
+ NSNumber * _Nonnull memberValue;
+ memberValue = [NSNumber numberWithUnsignedChar:cppValue.occupancy.Raw()];
+ value.occupancy = memberValue;
+ } while (0);
+
+ return value;
+ }
default: {
break;
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
index fac8e1bdf7afe8..93632e8935cbc6 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
@@ -1778,6 +1778,11 @@ MTR_PROVISIONALLY_AVAILABLE
@property (nonatomic, copy) NSNumber * _Nonnull holdTimeDefault MTR_PROVISIONALLY_AVAILABLE;
@end
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTROccupancySensingClusterOccupancyChangedEvent : NSObject
+@property (nonatomic, copy) NSNumber * _Nonnull occupancy MTR_PROVISIONALLY_AVAILABLE;
+@end
+
MTR_PROVISIONALLY_AVAILABLE
@interface MTRThreadNetworkDirectoryClusterThreadNetworkStruct : NSObject
@property (nonatomic, copy) NSData * _Nonnull extendedPanID MTR_PROVISIONALLY_AVAILABLE;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
index f24ca05abfb4eb..917332e40cff8f 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
@@ -7546,6 +7546,33 @@ - (NSString *)description
@end
+@implementation MTROccupancySensingClusterOccupancyChangedEvent
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _occupancy = @(0);
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTROccupancySensingClusterOccupancyChangedEvent alloc] init];
+
+ other.occupancy = self.occupancy;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: occupancy:%@; >", NSStringFromClass([self class]), _occupancy];
+ return descriptionString;
+}
+
+@end
+
@implementation MTRThreadNetworkDirectoryClusterThreadNetworkStruct
- (instancetype)init
{
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
index c2a25ed9477c2e..84a4c6da19a641 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
@@ -23759,7 +23759,43 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre
}
} // namespace Attributes
-namespace Events {} // namespace Events
+namespace Events {
+namespace OccupancyChanged {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOccupancy), occupancy));
+ return aWriter.EndContainer(outer);
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative(__element))
+ {
+ return std::get(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get(__element);
+
+ if (__context_tag == to_underlying(Fields::kOccupancy))
+ {
+ err = DataModel::Decode(reader, occupancy);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+} // namespace OccupancyChanged.
+} // namespace Events
} // namespace OccupancySensing
namespace CarbonMonoxideConcentrationMeasurement {
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
index fc62ada8bd3fcb..0fe76db4e0fd6e 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
@@ -34306,6 +34306,41 @@ struct TypeInfo
};
};
} // namespace Attributes
+namespace Events {
+namespace OccupancyChanged {
+static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info;
+
+enum class Fields : uint8_t
+{
+ kOccupancy = 0,
+};
+
+struct Type
+{
+public:
+ static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; }
+ static constexpr EventId GetEventId() { return Events::OccupancyChanged::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; }
+ static constexpr bool kIsFabricScoped = false;
+
+ chip::BitMask occupancy = static_cast>(0);
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; }
+ static constexpr EventId GetEventId() { return Events::OccupancyChanged::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; }
+
+ chip::BitMask occupancy = static_cast>(0);
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+} // namespace OccupancyChanged
+} // namespace Events
} // namespace OccupancySensing
namespace CarbonMonoxideConcentrationMeasurement {
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h
index 4227a6ab527ba2..01caeeadee4188 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h
@@ -637,6 +637,16 @@ static constexpr EventId Id = 0x00000010;
} // namespace Events
} // namespace PumpConfigurationAndControl
+namespace OccupancySensing {
+namespace Events {
+
+namespace OccupancyChanged {
+static constexpr EventId Id = 0x00000000;
+} // namespace OccupancyChanged
+
+} // namespace Events
+} // namespace OccupancySensing
+
namespace TargetNavigator {
namespace Events {
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
index add8258f1e9db3..f6f5f81644a9ef 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
@@ -10994,6 +10994,7 @@ class ColorControlStepColorTemperature : public ClusterCommand
| * ClusterRevision | 0xFFFD |
|------------------------------------------------------------------------------|
| Events: | |
+| * OccupancyChanged | 0x0000 |
\*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*\
@@ -24520,8 +24521,10 @@ void registerClusterOccupancySensing(Commands & commands, CredentialIssuerComman
//
// Events
//
- make_unique(Id, credsIssuerConfig), //
- make_unique(Id, credsIssuerConfig), //
+ make_unique(Id, credsIssuerConfig), //
+ make_unique(Id, "occupancy-changed", Events::OccupancyChanged::Id, credsIssuerConfig), //
+ make_unique(Id, credsIssuerConfig), //
+ make_unique(Id, "occupancy-changed", Events::OccupancyChanged::Id, credsIssuerConfig), //
};
commands.RegisterCluster(clusterName, clusterCommands);
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
index 16248a7ca4e157..6d64b9451276ed 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
@@ -7755,6 +7755,22 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
return CHIP_NO_ERROR;
}
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const OccupancySensing::Events::OccupancyChanged::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = DataModelLogger::LogValue("Occupancy", indent + 1, value.occupancy);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Occupancy'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
const TargetNavigator::Events::TargetUpdated::DecodableType & value)
{
@@ -20956,6 +20972,17 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip
}
break;
}
+ case OccupancySensing::Id: {
+ switch (header.mPath.mEventId)
+ {
+ case OccupancySensing::Events::OccupancyChanged::Id: {
+ chip::app::Clusters::OccupancySensing::Events::OccupancyChanged::DecodableType value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("OccupancyChanged", 1, value);
+ }
+ }
+ break;
+ }
case TargetNavigator::Id: {
switch (header.mPath.mEventId)
{
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
index 5646abd25a011a..c2b9cfbe337afd 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
@@ -664,6 +664,8 @@ static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::PumpConfigurationAndControl::Events::AirDetection::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::PumpConfigurationAndControl::Events::TurbineOperation::DecodableType & value);
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::OccupancySensing::Events::OccupancyChanged::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::TargetNavigator::Events::TargetUpdated::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
index dc438df840c885..b9105c44f3769d 100644
--- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
@@ -130841,6 +130841,7 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs
| * ClusterRevision | 0xFFFD |
|------------------------------------------------------------------------------|
| Events: | |
+| * OccupancyChanged | 0x0000 |
\*----------------------------------------------------------------------------*/
/*
@@ -197133,6 +197134,8 @@ void registerClusterOccupancySensing(Commands & commands)
make_unique(), //
make_unique(), //
make_unique(), //
+ make_unique(Id), //
+ make_unique(Id), //
};
commands.RegisterCluster(clusterName, clusterCommands);