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 5400a81d0fb902..0b5e94fe274fa7 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
@@ -5890,6 +5890,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -5900,9 +5911,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
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 962eed946b905a..1e0b80a7b3ab71 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
@@ -4438,6 +4438,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -4448,9 +4459,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter
index 245eb35b1dbd3b..372503cef8bad1 100644
--- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter
+++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter
@@ -1619,6 +1619,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -1629,9 +1640,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter
index 6680bcaeaa7363..a44ffef19ce24b 100644
--- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter
+++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter
@@ -1514,6 +1514,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -1524,9 +1535,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter
index 9178ac128c2268..95ccd3897c1e6f 100644
--- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter
+++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter
@@ -1663,6 +1663,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -1673,9 +1684,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter
index 0cd5fede3a5c0f..778bb2daa5e0b6 100644
--- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter
+++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter
@@ -1317,6 +1317,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -1327,9 +1338,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter
index 2e8e81f7fd3d45..f76b5208c97ceb 100644
--- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter
+++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter
@@ -1836,6 +1836,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -1846,9 +1857,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
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 59a3ead8a4e439..9b1e4ba906ea19 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
@@ -1616,6 +1616,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -1626,9 +1637,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter
index 190744f68aa6c3..4be0b2c2529409 100644
--- a/examples/lighting-app/lighting-common/lighting-app.matter
+++ b/examples/lighting-app/lighting-common/lighting-app.matter
@@ -2321,6 +2321,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -2331,9 +2342,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter
index 39f6a4b3894475..c4141255ad55f3 100644
--- a/examples/placeholder/linux/apps/app1/config.matter
+++ b/examples/placeholder/linux/apps/app1/config.matter
@@ -6324,6 +6324,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -6334,9 +6345,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter
index d3ec0ea0e26723..e5a389e2e4813d 100644
--- a/examples/placeholder/linux/apps/app2/config.matter
+++ b/examples/placeholder/linux/apps/app2/config.matter
@@ -6281,6 +6281,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -6291,9 +6302,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter
index c7962c4805d7af..fa81bdc7452213 100644
--- a/examples/pump-app/pump-common/pump-app.matter
+++ b/examples/pump-app/pump-common/pump-app.matter
@@ -1620,6 +1620,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -1630,9 +1641,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
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 736f48b70839f3..42f463b17e256e 100644
--- a/examples/pump-app/silabs/data_model/pump-thread-app.matter
+++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter
@@ -1620,6 +1620,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -1630,9 +1641,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
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 736f48b70839f3..42f463b17e256e 100644
--- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter
+++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter
@@ -1620,6 +1620,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -1630,9 +1641,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
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 effff079cda8e8..23d1e5bb3948d6 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
@@ -37,6 +37,13 @@ limitations under the License.
+
+
+
+
+
+
+
Occupancy Sensing
Measurement & Sensing
@@ -44,6 +51,33 @@ limitations under the License.
0x0406
OCCUPANCY_SENSING_CLUSTER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
true
true
@@ -53,6 +87,13 @@ limitations under the License.
OccupancySensorType
OccupancySensorTypeBitmap
+
+ HoldTime
+
+
+
+ HoldTimeLimits
+
PIROccupiedToUnoccupiedDelay
diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
index b253dd55e72831..95fa00cb7952c7 100644
--- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json
+++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
@@ -277,6 +277,7 @@
"ICDCounter",
"ClientsSupportedPerFabric"
],
+ "Occupancy Sensing": ["HoldTimeLimits"],
"Operational Credentials": [
"SupportedFabrics",
"CommissionedFabrics",
diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json
index 6b361e507a3cf3..e3ec959ff64e83 100644
--- a/src/app/zap-templates/zcl/zcl.json
+++ b/src/app/zap-templates/zcl/zcl.json
@@ -275,6 +275,7 @@
"ICDCounter",
"ClientsSupportedPerFabric"
],
+ "Occupancy Sensing": ["HoldTimeLimits"],
"Operational Credentials": [
"SupportedFabrics",
"CommissionedFabrics",
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index a8567d591b1f7a..c26aa1431ea20d 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -7363,6 +7363,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 3;
}
+ bitmap Feature : bitmap32 {
+ kOther = 0x1;
+ kPassiveInfrared = 0x2;
+ kUltrasonic = 0x4;
+ kPhysicalContact = 0x8;
+ kActiveInfrared = 0x10;
+ kRadar = 0x20;
+ kRFSensing = 0x40;
+ kVision = 0x80;
+ }
+
bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}
@@ -7373,9 +7384,17 @@ cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}
+ struct HoldTimeLimitsStruct {
+ int16u holdTimeMin = 0;
+ int16u holdTimeMax = 1;
+ int16u holdTimeDefault = 2;
+ }
+
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
+ attribute access(write: manage) optional int16u holdTime = 3;
+ readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
index 4b762e1ef39f37..067b136c8085ba 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -47598,6 +47598,8 @@ public static class OccupancySensingCluster extends BaseChipCluster {
private static final long OCCUPANCY_ATTRIBUTE_ID = 0L;
private static final long OCCUPANCY_SENSOR_TYPE_ATTRIBUTE_ID = 1L;
private static final long OCCUPANCY_SENSOR_TYPE_BITMAP_ATTRIBUTE_ID = 2L;
+ private static final long HOLD_TIME_ATTRIBUTE_ID = 3L;
+ private static final long HOLD_TIME_LIMITS_ATTRIBUTE_ID = 4L;
private static final long P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID = 16L;
private static final long P_I_R_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID = 17L;
private static final long P_I_R_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID = 18L;
@@ -47624,6 +47626,10 @@ public long initWithDevice(long devicePtr, int endpointId) {
return 0L;
}
+ public interface HoldTimeLimitsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(ChipStructs.OccupancySensingClusterHoldTimeLimitsStruct value);
+ }
+
public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
void onSuccess(List value);
}
@@ -47718,6 +47724,67 @@ public void onSuccess(byte[] tlv) {
}, OCCUPANCY_SENSOR_TYPE_BITMAP_ATTRIBUTE_ID, minInterval, maxInterval);
}
+ public void readHoldTimeAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HOLD_TIME_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, HOLD_TIME_ATTRIBUTE_ID, true);
+ }
+
+ public void writeHoldTimeAttribute(DefaultClusterCallback callback, Integer value) {
+ writeHoldTimeAttribute(callback, value, 0);
+ }
+
+ public void writeHoldTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) {
+ BaseTLVType tlvValue = new UIntType(value);
+ writeAttribute(new WriteAttributesCallbackImpl(callback), HOLD_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs);
+ }
+
+ public void subscribeHoldTimeAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HOLD_TIME_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, HOLD_TIME_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readHoldTimeLimitsAttribute(
+ HoldTimeLimitsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HOLD_TIME_LIMITS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ ChipStructs.OccupancySensingClusterHoldTimeLimitsStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, HOLD_TIME_LIMITS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeHoldTimeLimitsAttribute(
+ HoldTimeLimitsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HOLD_TIME_LIMITS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ ChipStructs.OccupancySensingClusterHoldTimeLimitsStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, HOLD_TIME_LIMITS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
public void readPIROccupiedToUnoccupiedDelayAttribute(
IntegerAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, P_I_R_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID);
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
index f78eaf9c83cd10..35a08b3e35268d 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
@@ -9748,6 +9748,82 @@ public String toString() {
return output.toString();
}
}
+public static class OccupancySensingClusterHoldTimeLimitsStruct {
+ public Integer holdTimeMin;
+ public Integer holdTimeMax;
+ public Integer holdTimeDefault;
+ private static final long HOLD_TIME_MIN_ID = 0L;
+ private static final long HOLD_TIME_MAX_ID = 1L;
+ private static final long HOLD_TIME_DEFAULT_ID = 2L;
+
+ public OccupancySensingClusterHoldTimeLimitsStruct(
+ Integer holdTimeMin,
+ Integer holdTimeMax,
+ Integer holdTimeDefault
+ ) {
+ this.holdTimeMin = holdTimeMin;
+ this.holdTimeMax = holdTimeMax;
+ this.holdTimeDefault = holdTimeDefault;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(HOLD_TIME_MIN_ID, new UIntType(holdTimeMin)));
+ values.add(new StructElement(HOLD_TIME_MAX_ID, new UIntType(holdTimeMax)));
+ values.add(new StructElement(HOLD_TIME_DEFAULT_ID, new UIntType(holdTimeDefault)));
+
+ return new StructType(values);
+ }
+
+ public static OccupancySensingClusterHoldTimeLimitsStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer holdTimeMin = null;
+ Integer holdTimeMax = null;
+ Integer holdTimeDefault = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == HOLD_TIME_MIN_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ holdTimeMin = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == HOLD_TIME_MAX_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ holdTimeMax = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == HOLD_TIME_DEFAULT_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ holdTimeDefault = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new OccupancySensingClusterHoldTimeLimitsStruct(
+ holdTimeMin,
+ holdTimeMax,
+ holdTimeDefault
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("OccupancySensingClusterHoldTimeLimitsStruct {\n");
+ output.append("\tholdTimeMin: ");
+ output.append(holdTimeMin);
+ output.append("\n");
+ output.append("\tholdTimeMax: ");
+ output.append(holdTimeMax);
+ output.append("\n");
+ output.append("\tholdTimeDefault: ");
+ output.append(holdTimeDefault);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class ThreadNetworkDirectoryClusterThreadNetworkStruct {
public Long extendedPanID;
public String networkName;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index cc2cb937c66cad..b972ba245d2c20 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -13238,6 +13238,8 @@ public enum Attribute {
Occupancy(0L),
OccupancySensorType(1L),
OccupancySensorTypeBitmap(2L),
+ HoldTime(3L),
+ HoldTimeLimits(4L),
PIROccupiedToUnoccupiedDelay(16L),
PIRUnoccupiedToOccupiedDelay(17L),
PIRUnoccupiedToOccupiedThreshold(18L),
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index 2573b42c0184f7..6210736e482684 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -15583,6 +15583,27 @@ public void onError(Exception ex) {
}
}
+ public static class DelegatedOccupancySensingClusterHoldTimeLimitsAttributeCallback implements ChipClusters.OccupancySensingCluster.HoldTimeLimitsAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(ChipStructs.OccupancySensingClusterHoldTimeLimitsStruct value) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.OccupancySensingClusterHoldTimeLimitsStruct");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
public static class DelegatedOccupancySensingClusterGeneratedCommandListAttributeCallback implements ChipClusters.OccupancySensingCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
index 18cc03aa13a99f..cbf57969d6f96f 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -14576,6 +14576,17 @@ private static Map readOccupancySensingInteractionInfo(
readOccupancySensingOccupancySensorTypeBitmapCommandParams
);
result.put("readOccupancySensorTypeBitmapAttribute", readOccupancySensingOccupancySensorTypeBitmapAttributeInteractionInfo);
+ Map readOccupancySensingHoldTimeCommandParams = new LinkedHashMap();
+ InteractionInfo readOccupancySensingHoldTimeAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.OccupancySensingCluster) cluster).readHoldTimeAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readOccupancySensingHoldTimeCommandParams
+ );
+ result.put("readHoldTimeAttribute", readOccupancySensingHoldTimeAttributeInteractionInfo);
Map readOccupancySensingPIROccupiedToUnoccupiedDelayCommandParams = new LinkedHashMap();
InteractionInfo readOccupancySensingPIROccupiedToUnoccupiedDelayAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
index bd73d50f14c538..86d5b9b7763dbc 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
@@ -3419,6 +3419,28 @@ public Map> getWriteAttributeMap() {
Map writeRelativeHumidityMeasurementInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("relativeHumidityMeasurement", writeRelativeHumidityMeasurementInteractionInfo);
Map writeOccupancySensingInteractionInfo = new LinkedHashMap<>();
+ Map writeOccupancySensingHoldTimeCommandParams = new LinkedHashMap();
+ CommandParameterInfo occupancySensingholdTimeCommandParameterInfo =
+ new CommandParameterInfo(
+ "value",
+ Integer.class,
+ Integer.class
+ );
+ writeOccupancySensingHoldTimeCommandParams.put(
+ "value",
+ occupancySensingholdTimeCommandParameterInfo
+ );
+ InteractionInfo writeOccupancySensingHoldTimeAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.OccupancySensingCluster) cluster).writeHoldTimeAttribute(
+ (DefaultClusterCallback) callback,
+ (Integer) commandArguments.get("value")
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
+ writeOccupancySensingHoldTimeCommandParams
+ );
+ writeOccupancySensingInteractionInfo.put("writeHoldTimeAttribute", writeOccupancySensingHoldTimeAttributeInteractionInfo);
Map writeOccupancySensingPIROccupiedToUnoccupiedDelayCommandParams = new LinkedHashMap();
CommandParameterInfo occupancySensingPIROccupiedToUnoccupiedDelayCommandParameterInfo =
new CommandParameterInfo(
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 c5c5d5e1adbb0d..4bcff980b6cbe6 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
@@ -92,6 +92,7 @@ structs_sources = [
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OccupancySensingClusterHoldTimeLimitsStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt",
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OccupancySensingClusterHoldTimeLimitsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OccupancySensingClusterHoldTimeLimitsStruct.kt
new file mode 100644
index 00000000000000..d84009ea5fd25a
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OccupancySensingClusterHoldTimeLimitsStruct.kt
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class OccupancySensingClusterHoldTimeLimitsStruct(
+ val holdTimeMin: UInt,
+ val holdTimeMax: UInt,
+ val holdTimeDefault: UInt,
+) {
+ override fun toString(): String = buildString {
+ append("OccupancySensingClusterHoldTimeLimitsStruct {\n")
+ append("\tholdTimeMin : $holdTimeMin\n")
+ append("\tholdTimeMax : $holdTimeMax\n")
+ append("\tholdTimeDefault : $holdTimeDefault\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_HOLD_TIME_MIN), holdTimeMin)
+ put(ContextSpecificTag(TAG_HOLD_TIME_MAX), holdTimeMax)
+ put(ContextSpecificTag(TAG_HOLD_TIME_DEFAULT), holdTimeDefault)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_HOLD_TIME_MIN = 0
+ private const val TAG_HOLD_TIME_MAX = 1
+ private const val TAG_HOLD_TIME_DEFAULT = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OccupancySensingClusterHoldTimeLimitsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val holdTimeMin = tlvReader.getUInt(ContextSpecificTag(TAG_HOLD_TIME_MIN))
+ val holdTimeMax = tlvReader.getUInt(ContextSpecificTag(TAG_HOLD_TIME_MAX))
+ val holdTimeDefault = tlvReader.getUInt(ContextSpecificTag(TAG_HOLD_TIME_DEFAULT))
+
+ tlvReader.exitContainer()
+
+ return OccupancySensingClusterHoldTimeLimitsStruct(holdTimeMin, holdTimeMax, holdTimeDefault)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/OccupancySensingCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/OccupancySensingCluster.kt
index 89979d73838f4b..bb54163f860ad0 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/clusters/OccupancySensingCluster.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/OccupancySensingCluster.kt
@@ -43,6 +43,17 @@ class OccupancySensingCluster(
private val controller: MatterController,
private val endpointId: UShort,
) {
+ class HoldTimeLimitsAttribute(val value: OccupancySensingClusterHoldTimeLimitsStruct?)
+
+ sealed class HoldTimeLimitsAttributeSubscriptionState {
+ data class Success(val value: OccupancySensingClusterHoldTimeLimitsStruct?) :
+ HoldTimeLimitsAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : HoldTimeLimitsAttributeSubscriptionState()
+
+ object SubscriptionEstablished : HoldTimeLimitsAttributeSubscriptionState()
+ }
+
class GeneratedCommandListAttribute(val value: List)
sealed class GeneratedCommandListAttributeSubscriptionState {
@@ -330,6 +341,230 @@ class OccupancySensingCluster(
}
}
+ suspend fun readHoldTimeAttribute(): UShort? {
+ val ATTRIBUTE_ID: UInt = 3u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Holdtime attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort? =
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ tlvReader.getUShort(AnonymousTag)
+ } else {
+ null
+ }
+
+ return decodedValue
+ }
+
+ suspend fun writeHoldTimeAttribute(value: UShort, timedWriteTimeout: Duration? = null) {
+ val ATTRIBUTE_ID: UInt = 3u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.put(AnonymousTag, value)
+
+ val writeRequests: WriteRequests =
+ WriteRequests(
+ requests =
+ listOf(
+ WriteRequest(
+ attributePath =
+ AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID),
+ tlvPayload = tlvWriter.getEncoded(),
+ )
+ ),
+ timedRequest = timedWriteTimeout,
+ )
+
+ val response: WriteResponse = controller.write(writeRequests)
+
+ when (response) {
+ is WriteResponse.Success -> {
+ logger.log(Level.FINE, "Write command succeeded")
+ }
+ is WriteResponse.PartialWriteFailure -> {
+ val aggregatedErrorMessage =
+ response.failures.joinToString("\n") { failure ->
+ "Error at ${failure.attributePath}: ${failure.ex.message}"
+ }
+
+ response.failures.forEach { failure ->
+ logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}")
+ }
+
+ throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage")
+ }
+ }
+ }
+
+ suspend fun subscribeHoldTimeAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 3u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UShortSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Holdtime attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort? =
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ tlvReader.getUShort(AnonymousTag)
+ } else {
+ null
+ }
+
+ decodedValue?.let { emit(UShortSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UShortSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readHoldTimeLimitsAttribute(): HoldTimeLimitsAttribute {
+ val ATTRIBUTE_ID: UInt = 4u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Holdtimelimits attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: OccupancySensingClusterHoldTimeLimitsStruct? =
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ OccupancySensingClusterHoldTimeLimitsStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ null
+ }
+
+ return HoldTimeLimitsAttribute(decodedValue)
+ }
+
+ suspend fun subscribeHoldTimeLimitsAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 4u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ HoldTimeLimitsAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Holdtimelimits attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: OccupancySensingClusterHoldTimeLimitsStruct? =
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ OccupancySensingClusterHoldTimeLimitsStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ null
+ }
+
+ decodedValue?.let { emit(HoldTimeLimitsAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(HoldTimeLimitsAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
suspend fun readPIROccupiedToUnoccupiedDelayAttribute(): UShort? {
val ATTRIBUTE_ID: UInt = 16u
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 4485a760e2b427..7c11cb00b0aceb 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni
@@ -92,6 +92,7 @@ matter_structs_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/OccupancySensingClusterHoldTimeLimitsStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/OperationalStateClusterErrorStateStruct.kt",
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/OccupancySensingClusterHoldTimeLimitsStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/OccupancySensingClusterHoldTimeLimitsStruct.kt
new file mode 100644
index 00000000000000..be70d3b11ccbb3
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/OccupancySensingClusterHoldTimeLimitsStruct.kt
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class OccupancySensingClusterHoldTimeLimitsStruct(
+ val holdTimeMin: UShort,
+ val holdTimeMax: UShort,
+ val holdTimeDefault: UShort,
+) {
+ override fun toString(): String = buildString {
+ append("OccupancySensingClusterHoldTimeLimitsStruct {\n")
+ append("\tholdTimeMin : $holdTimeMin\n")
+ append("\tholdTimeMax : $holdTimeMax\n")
+ append("\tholdTimeDefault : $holdTimeDefault\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_HOLD_TIME_MIN), holdTimeMin)
+ put(ContextSpecificTag(TAG_HOLD_TIME_MAX), holdTimeMax)
+ put(ContextSpecificTag(TAG_HOLD_TIME_DEFAULT), holdTimeDefault)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_HOLD_TIME_MIN = 0
+ private const val TAG_HOLD_TIME_MAX = 1
+ private const val TAG_HOLD_TIME_DEFAULT = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OccupancySensingClusterHoldTimeLimitsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val holdTimeMin = tlvReader.getUShort(ContextSpecificTag(TAG_HOLD_TIME_MIN))
+ val holdTimeMax = tlvReader.getUShort(ContextSpecificTag(TAG_HOLD_TIME_MAX))
+ val holdTimeDefault = tlvReader.getUShort(ContextSpecificTag(TAG_HOLD_TIME_DEFAULT))
+
+ tlvReader.exitContainer()
+
+ return OccupancySensingClusterHoldTimeLimitsStruct(holdTimeMin, holdTimeMax, holdTimeDefault)
+ }
+ }
+}
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index 4cebe9ea5a1829..66797f78118dd1 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -33993,6 +33993,77 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR
value);
return value;
}
+ case Attributes::HoldTime::Id: {
+ using TypeInfo = Attributes::HoldTime::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ case Attributes::HoldTimeLimits::Id: {
+ using TypeInfo = Attributes::HoldTimeLimits::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ jobject value_holdTimeMin;
+ std::string value_holdTimeMinClassName = "java/lang/Integer";
+ std::string value_holdTimeMinCtorSignature = "(I)V";
+ jint jnivalue_holdTimeMin = static_cast(cppValue.holdTimeMin);
+ chip::JniReferences::GetInstance().CreateBoxedObject(value_holdTimeMinClassName.c_str(),
+ value_holdTimeMinCtorSignature.c_str(), jnivalue_holdTimeMin,
+ value_holdTimeMin);
+ jobject value_holdTimeMax;
+ std::string value_holdTimeMaxClassName = "java/lang/Integer";
+ std::string value_holdTimeMaxCtorSignature = "(I)V";
+ jint jnivalue_holdTimeMax = static_cast(cppValue.holdTimeMax);
+ chip::JniReferences::GetInstance().CreateBoxedObject(value_holdTimeMaxClassName.c_str(),
+ value_holdTimeMaxCtorSignature.c_str(), jnivalue_holdTimeMax,
+ value_holdTimeMax);
+ jobject value_holdTimeDefault;
+ std::string value_holdTimeDefaultClassName = "java/lang/Integer";
+ std::string value_holdTimeDefaultCtorSignature = "(I)V";
+ jint jnivalue_holdTimeDefault = static_cast(cppValue.holdTimeDefault);
+ chip::JniReferences::GetInstance().CreateBoxedObject(value_holdTimeDefaultClassName.c_str(),
+ value_holdTimeDefaultCtorSignature.c_str(),
+ jnivalue_holdTimeDefault, value_holdTimeDefault);
+
+ jclass holdTimeLimitsStructStructClass_0;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$OccupancySensingClusterHoldTimeLimitsStruct",
+ holdTimeLimitsStructStructClass_0);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$OccupancySensingClusterHoldTimeLimitsStruct");
+ return nullptr;
+ }
+
+ jmethodID holdTimeLimitsStructStructCtor_0;
+ err = chip::JniReferences::GetInstance().FindMethod(env, holdTimeLimitsStructStructClass_0, "",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V",
+ &holdTimeLimitsStructStructCtor_0);
+ if (err != CHIP_NO_ERROR || holdTimeLimitsStructStructCtor_0 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$OccupancySensingClusterHoldTimeLimitsStruct constructor");
+ return nullptr;
+ }
+
+ value = env->NewObject(holdTimeLimitsStructStructClass_0, holdTimeLimitsStructStructCtor_0, value_holdTimeMin,
+ value_holdTimeMax, value_holdTimeDefault);
+ return value;
+ }
case Attributes::PIROccupiedToUnoccupiedDelay::Id: {
using TypeInfo = Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo;
TypeInfo::DecodableType cppValue;
diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py
index 37ead8e634611a..e9725a29c44445 100644
--- a/src/controller/python/chip/clusters/CHIPClusters.py
+++ b/src/controller/python/chip/clusters/CHIPClusters.py
@@ -10428,6 +10428,19 @@ class ChipClusters:
"type": "int",
"reportable": True,
},
+ 0x00000003: {
+ "attributeName": "HoldTime",
+ "attributeId": 0x00000003,
+ "type": "int",
+ "reportable": True,
+ "writable": True,
+ },
+ 0x00000004: {
+ "attributeName": "HoldTimeLimits",
+ "attributeId": 0x00000004,
+ "type": "",
+ "reportable": True,
+ },
0x00000010: {
"attributeName": "PIROccupiedToUnoccupiedDelay",
"attributeId": 0x00000010,
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 4c17fd99af2d21..cc87deb607248e 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -36884,6 +36884,8 @@ def descriptor(cls) -> ClusterObjectDescriptor:
ClusterObjectFieldDescriptor(Label="occupancy", Tag=0x00000000, Type=uint),
ClusterObjectFieldDescriptor(Label="occupancySensorType", Tag=0x00000001, Type=OccupancySensing.Enums.OccupancySensorTypeEnum),
ClusterObjectFieldDescriptor(Label="occupancySensorTypeBitmap", Tag=0x00000002, Type=uint),
+ ClusterObjectFieldDescriptor(Label="holdTime", Tag=0x00000003, Type=typing.Optional[uint]),
+ ClusterObjectFieldDescriptor(Label="holdTimeLimits", Tag=0x00000004, Type=typing.Optional[OccupancySensing.Structs.HoldTimeLimitsStruct]),
ClusterObjectFieldDescriptor(Label="PIROccupiedToUnoccupiedDelay", Tag=0x00000010, Type=typing.Optional[uint]),
ClusterObjectFieldDescriptor(Label="PIRUnoccupiedToOccupiedDelay", Tag=0x00000011, Type=typing.Optional[uint]),
ClusterObjectFieldDescriptor(Label="PIRUnoccupiedToOccupiedThreshold", Tag=0x00000012, Type=typing.Optional[uint]),
@@ -36904,6 +36906,8 @@ def descriptor(cls) -> ClusterObjectDescriptor:
occupancy: 'uint' = None
occupancySensorType: 'OccupancySensing.Enums.OccupancySensorTypeEnum' = None
occupancySensorTypeBitmap: 'uint' = None
+ holdTime: 'typing.Optional[uint]' = None
+ holdTimeLimits: 'typing.Optional[OccupancySensing.Structs.HoldTimeLimitsStruct]' = None
PIROccupiedToUnoccupiedDelay: 'typing.Optional[uint]' = None
PIRUnoccupiedToOccupiedDelay: 'typing.Optional[uint]' = None
PIRUnoccupiedToOccupiedThreshold: 'typing.Optional[uint]' = None
@@ -36933,6 +36937,16 @@ class OccupancySensorTypeEnum(MatterIntEnum):
kUnknownEnumValue = 4,
class Bitmaps:
+ class Feature(IntFlag):
+ kOther = 0x1
+ kPassiveInfrared = 0x2
+ kUltrasonic = 0x4
+ kPhysicalContact = 0x8
+ kActiveInfrared = 0x10
+ kRadar = 0x20
+ kRFSensing = 0x40
+ kVision = 0x80
+
class OccupancyBitmap(IntFlag):
kOccupied = 0x1
@@ -36941,6 +36955,22 @@ class OccupancySensorTypeBitmap(IntFlag):
kUltrasonic = 0x2
kPhysicalContact = 0x4
+ class Structs:
+ @dataclass
+ class HoldTimeLimitsStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="holdTimeMin", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="holdTimeMax", Tag=1, Type=uint),
+ ClusterObjectFieldDescriptor(Label="holdTimeDefault", Tag=2, Type=uint),
+ ])
+
+ holdTimeMin: 'uint' = 0
+ holdTimeMax: 'uint' = 0
+ holdTimeDefault: 'uint' = 0
+
class Attributes:
@dataclass
class Occupancy(ClusterAttributeDescriptor):
@@ -36990,6 +37020,38 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
value: 'uint' = 0
+ @dataclass
+ class HoldTime(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000406
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000003
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Optional[uint])
+
+ value: 'typing.Optional[uint]' = None
+
+ @dataclass
+ class HoldTimeLimits(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000406
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000004
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Optional[OccupancySensing.Structs.HoldTimeLimitsStruct])
+
+ value: 'typing.Optional[OccupancySensing.Structs.HoldTimeLimitsStruct]' = None
+
@dataclass
class PIROccupiedToUnoccupiedDelay(ClusterAttributeDescriptor):
@ChipUtility.classproperty
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
index 4200cb1dccd108..7785a04b904fa8 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
@@ -4683,6 +4683,12 @@ static BOOL AttributeIsSpecifiedInOccupancySensingCluster(AttributeId aAttribute
case Attributes::OccupancySensorTypeBitmap::Id: {
return YES;
}
+ case Attributes::HoldTime::Id: {
+ return YES;
+ }
+ case Attributes::HoldTimeLimits::Id: {
+ return YES;
+ }
case Attributes::PIROccupiedToUnoccupiedDelay::Id: {
return YES;
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
index 1feae62ea18928..d3780c91cf9eb4 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -13817,6 +13817,31 @@ static id _Nullable DecodeAttributeValueForOccupancySensingCluster(AttributeId a
value = [NSNumber numberWithUnsignedChar:cppValue.Raw()];
return value;
}
+ case Attributes::HoldTime::Id: {
+ using TypeInfo = Attributes::HoldTime::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nonnull value;
+ value = [NSNumber numberWithUnsignedShort:cppValue];
+ return value;
+ }
+ case Attributes::HoldTimeLimits::Id: {
+ using TypeInfo = Attributes::HoldTimeLimits::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ MTROccupancySensingClusterHoldTimeLimitsStruct * _Nonnull value;
+ value = [MTROccupancySensingClusterHoldTimeLimitsStruct new];
+ value.holdTimeMin = [NSNumber numberWithUnsignedShort:cppValue.holdTimeMin];
+ value.holdTimeMax = [NSNumber numberWithUnsignedShort:cppValue.holdTimeMax];
+ value.holdTimeDefault = [NSNumber numberWithUnsignedShort:cppValue.holdTimeDefault];
+ return value;
+ }
case Attributes::PIROccupiedToUnoccupiedDelay::Id: {
using TypeInfo = Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo;
TypeInfo::DecodableType cppValue;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
index 1513b8c0f54540..a41139554f54ad 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -11706,6 +11706,20 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));
+ (void)readAttributeOccupancySensorTypeBitmapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));
+- (void)readAttributeHoldTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)writeAttributeHoldTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)writeAttributeHoldTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeHoldTimeWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeHoldTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeHoldTimeLimitsWithCompletion:(void (^)(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeHoldTimeLimitsWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeHoldTimeLimitsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
- (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));
- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));
- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));
@@ -19775,6 +19789,17 @@ typedef NS_ENUM(uint8_t, MTROccupancySensingOccupancySensorType) {
MTROccupancySensingOccupancySensorTypePhysicalContact MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03,
} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
+typedef NS_OPTIONS(uint32_t, MTROccupancySensingFeature) {
+ MTROccupancySensingFeatureOther MTR_PROVISIONALLY_AVAILABLE = 0x1,
+ MTROccupancySensingFeaturePassiveInfrared MTR_PROVISIONALLY_AVAILABLE = 0x2,
+ MTROccupancySensingFeatureUltrasonic MTR_PROVISIONALLY_AVAILABLE = 0x4,
+ MTROccupancySensingFeaturePhysicalContact MTR_PROVISIONALLY_AVAILABLE = 0x8,
+ MTROccupancySensingFeatureActiveInfrared MTR_PROVISIONALLY_AVAILABLE = 0x10,
+ MTROccupancySensingFeatureRadar MTR_PROVISIONALLY_AVAILABLE = 0x20,
+ MTROccupancySensingFeatureRFSensing MTR_PROVISIONALLY_AVAILABLE = 0x40,
+ MTROccupancySensingFeatureVision MTR_PROVISIONALLY_AVAILABLE = 0x80,
+} MTR_PROVISIONALLY_AVAILABLE;
+
typedef NS_OPTIONS(uint8_t, MTROccupancySensingOccupancyBitmap) {
MTROccupancySensingOccupancyBitmapOccupied MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1,
} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5));
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
index 694f35228a4701..34fcdd5a41e314 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
@@ -85751,6 +85751,106 @@ + (void)readAttributeOccupancySensorTypeBitmapWithClusterStateCache:(MTRClusterS
completion:completion];
}
+- (void)readAttributeHoldTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = OccupancySensing::Attributes::HoldTime::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)writeAttributeHoldTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion
+{
+ [self writeAttributeHoldTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion];
+}
+- (void)writeAttributeHoldTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion
+{
+ // Make a copy of params before we go async.
+ params = [params copy];
+ value = [value copy];
+
+ auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) {
+ chip::Optional timedWriteTimeout;
+ if (params != nil) {
+ if (params.timedWriteTimeout != nil){
+ timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue);
+ }
+ }
+
+ ListFreer listFreer;
+ using TypeInfo = OccupancySensing::Attributes::HoldTime::TypeInfo;
+ TypeInfo::Type cppValue;
+ cppValue = value.unsignedShortValue;
+
+ chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue);
+ return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); });
+ std::move(*bridge).DispatchAction(self.device);
+}
+
+- (void)subscribeAttributeHoldTimeWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = OccupancySensing::Attributes::HoldTime::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeHoldTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = OccupancySensing::Attributes::HoldTime::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeHoldTimeLimitsWithCompletion:(void (^)(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = OccupancySensing::Attributes::HoldTimeLimits::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeHoldTimeLimitsWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = OccupancySensing::Attributes::HoldTimeLimits::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeHoldTimeLimitsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = OccupancySensing::Attributes::HoldTimeLimits::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
- (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
{
using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
index b6c6dc2aba2dc2..cbc789d9be120c 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
@@ -4173,6 +4173,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) {
MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancyID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000,
MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001,
MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002,
+ MTRAttributeIDTypeClusterOccupancySensingAttributeHoldTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003,
+ MTRAttributeIDTypeClusterOccupancySensingAttributeHoldTimeLimitsID MTR_PROVISIONALLY_AVAILABLE = 0x00000004,
MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000010,
MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000011,
MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000012,
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
index c320e8c06e8dea..48b47328a79ebb 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
@@ -6437,6 +6437,14 @@
result = @"OccupancySensorTypeBitmap";
break;
+ case MTRAttributeIDTypeClusterOccupancySensingAttributeHoldTimeID:
+ result = @"HoldTime";
+ break;
+
+ case MTRAttributeIDTypeClusterOccupancySensingAttributeHoldTimeLimitsID:
+ result = @"HoldTimeLimits";
+ break;
+
case MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID:
result = @"PIROccupiedToUnoccupiedDelay";
break;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
index c47d2bf28caa4c..f340e998fc2496 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
@@ -5401,6 +5401,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
- (NSDictionary * _Nullable)readAttributeOccupancySensorTypeBitmapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));
+- (NSDictionary * _Nullable)readAttributeHoldTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+- (void)writeAttributeHoldTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE;
+- (void)writeAttributeHoldTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeHoldTimeLimitsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
- (NSDictionary * _Nullable)readAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));
- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));
- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
index f04fd07262ea1f..e7d0ef97faecd3 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
@@ -15779,6 +15779,27 @@ @implementation MTRClusterOccupancySensing
return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID) params:params];
}
+- (NSDictionary * _Nullable)readAttributeHoldTimeWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeHoldTimeID) params:params];
+}
+
+- (void)writeAttributeHoldTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs
+{
+ [self writeAttributeHoldTimeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil];
+}
+- (void)writeAttributeHoldTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params
+{
+ NSNumber * timedWriteTimeout = params.timedWriteTimeout;
+
+ [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeHoldTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout];
+}
+
+- (NSDictionary * _Nullable)readAttributeHoldTimeLimitsWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeHoldTimeLimitsID) params:params];
+}
+
- (NSDictionary * _Nullable)readAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params
{
return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) params:params];
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
index 8ea03ce1fd2a9d..74a621dd01df9c 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
@@ -1680,6 +1680,13 @@ MTR_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct",
@property (nonatomic, copy) NSNumber * _Nullable coolSetpoint MTR_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4));
@end
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTROccupancySensingClusterHoldTimeLimitsStruct : NSObject
+@property (nonatomic, copy) NSNumber * _Nonnull holdTimeMin MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nonnull holdTimeMax MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nonnull holdTimeDefault MTR_PROVISIONALLY_AVAILABLE;
+@end
+
MTR_PROVISIONALLY_AVAILABLE
@interface MTRThreadNetworkDirectoryClusterThreadNetworkStruct : NSObject
@property (nonatomic, copy) NSNumber * _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 1ff604e5469e36..5dca49be4900cf 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
@@ -7085,6 +7085,39 @@ @implementation MTRThermostatClusterThermostatScheduleTransition : MTRThermostat
@dynamic coolSetpoint;
@end
+@implementation MTROccupancySensingClusterHoldTimeLimitsStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _holdTimeMin = @(0);
+
+ _holdTimeMax = @(0);
+
+ _holdTimeDefault = @(0);
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTROccupancySensingClusterHoldTimeLimitsStruct alloc] init];
+
+ other.holdTimeMin = self.holdTimeMin;
+ other.holdTimeMax = self.holdTimeMax;
+ other.holdTimeDefault = self.holdTimeDefault;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: holdTimeMin:%@; holdTimeMax:%@; holdTimeDefault:%@; >", NSStringFromClass([self class]), _holdTimeMin, _holdTimeMax, _holdTimeDefault];
+ return descriptionString;
+}
+
+@end
+
@implementation MTRThreadNetworkDirectoryClusterThreadNetworkStruct
- (instancetype)init
{
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
index c16c4d688e2744..e349271c1d9ed5 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
@@ -33800,6 +33800,52 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint,
} // namespace OccupancySensorTypeBitmap
+namespace HoldTime {
+
+Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value)
+{
+ using Traits = NumericAttributeTraits;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty);
+}
+
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value)
+{
+ using Traits = NumericAttributeTraits;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+}
+
+} // namespace HoldTime
+
namespace PIROccupiedToUnoccupiedDelay {
Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value)
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
index 4d0c6c1d97ad9a..acf4ff18b97443 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
@@ -5167,6 +5167,12 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint,
MarkAttributeDirty markDirty);
} // namespace OccupancySensorTypeBitmap
+namespace HoldTime {
+Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value);
+Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty);
+} // namespace HoldTime
+
namespace PIROccupiedToUnoccupiedDelay {
Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u
Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value);
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h
index a7c433848df662..52e953741808d1 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h
@@ -4396,6 +4396,19 @@ enum class OccupancySensorTypeEnum : uint8_t
kUnknownEnumValue = 4,
};
+// Bitmap for Feature
+enum class Feature : uint32_t
+{
+ kOther = 0x1,
+ kPassiveInfrared = 0x2,
+ kUltrasonic = 0x4,
+ kPhysicalContact = 0x8,
+ kActiveInfrared = 0x10,
+ kRadar = 0x20,
+ kRFSensing = 0x40,
+ kVision = 0x80,
+};
+
// Bitmap for OccupancyBitmap
enum class OccupancyBitmap : uint8_t
{
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 54bcec37353ef1..e4a73259cf2ca9 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
@@ -22758,6 +22758,54 @@ namespace Events {} // namespace Events
} // namespace RelativeHumidityMeasurement
namespace OccupancySensing {
+namespace Structs {
+
+namespace HoldTimeLimitsStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kHoldTimeMin), holdTimeMin);
+ encoder.Encode(to_underlying(Fields::kHoldTimeMax), holdTimeMax);
+ encoder.Encode(to_underlying(Fields::kHoldTimeDefault), holdTimeDefault);
+ return encoder.Finalize();
+}
+
+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::kHoldTimeMin))
+ {
+ err = DataModel::Decode(reader, holdTimeMin);
+ }
+ else if (__context_tag == to_underlying(Fields::kHoldTimeMax))
+ {
+ err = DataModel::Decode(reader, holdTimeMax);
+ }
+ else if (__context_tag == to_underlying(Fields::kHoldTimeDefault))
+ {
+ err = DataModel::Decode(reader, holdTimeDefault);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace HoldTimeLimitsStruct
+} // namespace Structs
namespace Commands {} // namespace Commands
@@ -22772,6 +22820,10 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre
return DataModel::Decode(reader, occupancySensorType);
case Attributes::OccupancySensorTypeBitmap::TypeInfo::GetAttributeId():
return DataModel::Decode(reader, occupancySensorTypeBitmap);
+ case Attributes::HoldTime::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, holdTime);
+ case Attributes::HoldTimeLimits::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, holdTimeLimits);
case Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo::GetAttributeId():
return DataModel::Decode(reader, PIROccupiedToUnoccupiedDelay);
case Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo::GetAttributeId():
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 84f19b11e4f105..4af1e3eb1d5a3b 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
@@ -33039,6 +33039,33 @@ struct TypeInfo
} // namespace Attributes
} // namespace RelativeHumidityMeasurement
namespace OccupancySensing {
+namespace Structs {
+namespace HoldTimeLimitsStruct {
+enum class Fields : uint8_t
+{
+ kHoldTimeMin = 0,
+ kHoldTimeMax = 1,
+ kHoldTimeDefault = 2,
+};
+
+struct Type
+{
+public:
+ uint16_t holdTimeMin = static_cast(0);
+ uint16_t holdTimeMax = static_cast(0);
+ uint16_t holdTimeDefault = static_cast(0);
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace HoldTimeLimitsStruct
+} // namespace Structs
namespace Attributes {
@@ -33078,6 +33105,30 @@ struct TypeInfo
static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace OccupancySensorTypeBitmap
+namespace HoldTime {
+struct TypeInfo
+{
+ using Type = uint16_t;
+ using DecodableType = uint16_t;
+ using DecodableArgType = uint16_t;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::HoldTime::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace HoldTime
+namespace HoldTimeLimits {
+struct TypeInfo
+{
+ using Type = chip::app::Clusters::OccupancySensing::Structs::HoldTimeLimitsStruct::Type;
+ using DecodableType = chip::app::Clusters::OccupancySensing::Structs::HoldTimeLimitsStruct::DecodableType;
+ using DecodableArgType = const chip::app::Clusters::OccupancySensing::Structs::HoldTimeLimitsStruct::DecodableType &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::HoldTimeLimits::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace HoldTimeLimits
namespace PIROccupiedToUnoccupiedDelay {
struct TypeInfo
{
@@ -33237,6 +33288,8 @@ struct TypeInfo
static_cast(0);
Attributes::OccupancySensorTypeBitmap::TypeInfo::DecodableType occupancySensorTypeBitmap =
static_cast>(0);
+ Attributes::HoldTime::TypeInfo::DecodableType holdTime = static_cast(0);
+ Attributes::HoldTimeLimits::TypeInfo::DecodableType holdTimeLimits;
Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo::DecodableType PIROccupiedToUnoccupiedDelay = static_cast(0);
Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo::DecodableType PIRUnoccupiedToOccupiedDelay = static_cast(0);
Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType PIRUnoccupiedToOccupiedThreshold =
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h
index 03ddaed214890c..7bfad24bf56998 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h
@@ -5834,6 +5834,14 @@ namespace OccupancySensorTypeBitmap {
static constexpr AttributeId Id = 0x00000002;
} // namespace OccupancySensorTypeBitmap
+namespace HoldTime {
+static constexpr AttributeId Id = 0x00000003;
+} // namespace HoldTime
+
+namespace HoldTimeLimits {
+static constexpr AttributeId Id = 0x00000004;
+} // namespace HoldTimeLimits
+
namespace PIROccupiedToUnoccupiedDelay {
static constexpr AttributeId Id = 0x00000010;
} // namespace PIROccupiedToUnoccupiedDelay
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
index 2cdd59a303bb63..6dd6f6be909e10 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
@@ -10833,6 +10833,8 @@ class ColorControlStepColorTemperature : public ClusterCommand
| * Occupancy | 0x0000 |
| * OccupancySensorType | 0x0001 |
| * OccupancySensorTypeBitmap | 0x0002 |
+| * HoldTime | 0x0003 |
+| * HoldTimeLimits | 0x0004 |
| * PIROccupiedToUnoccupiedDelay | 0x0010 |
| * PIRUnoccupiedToOccupiedDelay | 0x0011 |
| * PIRUnoccupiedToOccupiedThreshold | 0x0012 |
@@ -23875,7 +23877,9 @@ void registerClusterOccupancySensing(Commands & commands, CredentialIssuerComman
make_unique(Id, "occupancy", Attributes::Occupancy::Id, credsIssuerConfig), //
make_unique(Id, "occupancy-sensor-type", Attributes::OccupancySensorType::Id, credsIssuerConfig), //
make_unique(Id, "occupancy-sensor-type-bitmap", Attributes::OccupancySensorTypeBitmap::Id,
- credsIssuerConfig), //
+ credsIssuerConfig), //
+ make_unique(Id, "hold-time", Attributes::HoldTime::Id, credsIssuerConfig), //
+ make_unique(Id, "hold-time-limits", Attributes::HoldTimeLimits::Id, credsIssuerConfig), //
make_unique(Id, "piroccupied-to-unoccupied-delay", Attributes::PIROccupiedToUnoccupiedDelay::Id,
credsIssuerConfig), //
make_unique(Id, "pirunoccupied-to-occupied-delay", Attributes::PIRUnoccupiedToOccupiedDelay::Id,
@@ -23909,6 +23913,10 @@ void registerClusterOccupancySensing(Commands & commands, CredentialIssuerComman
make_unique>>(
Id, "occupancy-sensor-type-bitmap", 0, UINT8_MAX, Attributes::OccupancySensorTypeBitmap::Id,
WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique>(Id, "hold-time", 0, UINT16_MAX, Attributes::HoldTime::Id, WriteCommandType::kWrite,
+ credsIssuerConfig), //
+ make_unique>(
+ Id, "hold-time-limits", Attributes::HoldTimeLimits::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
make_unique>(Id, "piroccupied-to-unoccupied-delay", 0, UINT16_MAX,
Attributes::PIROccupiedToUnoccupiedDelay::Id, WriteCommandType::kWrite,
credsIssuerConfig), //
@@ -23953,7 +23961,9 @@ void registerClusterOccupancySensing(Commands & commands, CredentialIssuerComman
make_unique(Id, "occupancy", Attributes::Occupancy::Id, credsIssuerConfig), //
make_unique(Id, "occupancy-sensor-type", Attributes::OccupancySensorType::Id, credsIssuerConfig), //
make_unique(Id, "occupancy-sensor-type-bitmap", Attributes::OccupancySensorTypeBitmap::Id,
- credsIssuerConfig), //
+ credsIssuerConfig), //
+ make_unique(Id, "hold-time", Attributes::HoldTime::Id, credsIssuerConfig), //
+ make_unique(Id, "hold-time-limits", Attributes::HoldTimeLimits::Id, credsIssuerConfig), //
make_unique(Id, "piroccupied-to-unoccupied-delay", Attributes::PIROccupiedToUnoccupiedDelay::Id,
credsIssuerConfig), //
make_unique(Id, "pirunoccupied-to-occupied-delay", Attributes::PIRUnoccupiedToOccupiedDelay::Id,
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
index 6a73b61ce13720..c094853ab71712 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
@@ -4229,6 +4229,45 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::W
ComplexArgumentParser::Finalize(request.coolSetpoint);
}
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::OccupancySensing::Structs::HoldTimeLimitsStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("HoldTimeLimitsStruct.holdTimeMin", "holdTimeMin", value.isMember("holdTimeMin")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("HoldTimeLimitsStruct.holdTimeMax", "holdTimeMax", value.isMember("holdTimeMax")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("HoldTimeLimitsStruct.holdTimeDefault", "holdTimeDefault",
+ value.isMember("holdTimeDefault")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "holdTimeMin");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.holdTimeMin, value["holdTimeMin"]));
+ valueCopy.removeMember("holdTimeMin");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "holdTimeMax");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.holdTimeMax, value["holdTimeMax"]));
+ valueCopy.removeMember("holdTimeMax");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "holdTimeDefault");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.holdTimeDefault, value["holdTimeDefault"]));
+ valueCopy.removeMember("holdTimeDefault");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::OccupancySensing::Structs::HoldTimeLimitsStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.holdTimeMin);
+ ComplexArgumentParser::Finalize(request.holdTimeMax);
+ ComplexArgumentParser::Finalize(request.holdTimeDefault);
+}
+
CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
chip::app::Clusters::ThreadNetworkDirectory::Structs::ThreadNetworkStruct::Type & request,
Json::Value & value)
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
index 4d7544b92daa32..f2893064ebafe0 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
@@ -486,6 +486,11 @@ static CHIP_ERROR Setup(const char * label,
static void Finalize(chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::Type & request);
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::OccupancySensing::Structs::HoldTimeLimitsStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::OccupancySensing::Structs::HoldTimeLimitsStruct::Type & request);
+
static CHIP_ERROR Setup(const char * label,
chip::app::Clusters::ThreadNetworkDirectory::Structs::ThreadNetworkStruct::Type & request,
Json::Value & value);
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 a9d3f942abcd7c..a20fee214aad14 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
@@ -3735,6 +3735,40 @@ DataModelLogger::LogValue(const char * label, size_t indent,
return CHIP_NO_ERROR;
}
+CHIP_ERROR
+DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::OccupancySensing::Structs::HoldTimeLimitsStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("HoldTimeMin", indent + 1, value.holdTimeMin);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'HoldTimeMin'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("HoldTimeMax", indent + 1, value.holdTimeMax);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'HoldTimeMax'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("HoldTimeDefault", indent + 1, value.holdTimeDefault);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'HoldTimeDefault'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
CHIP_ERROR
DataModelLogger::LogValue(const char * label, size_t indent,
const chip::app::Clusters::ThreadNetworkDirectory::Structs::ThreadNetworkStruct::DecodableType & value)
@@ -15470,6 +15504,16 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP
ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
return DataModelLogger::LogValue("OccupancySensorTypeBitmap", 1, value);
}
+ case OccupancySensing::Attributes::HoldTime::Id: {
+ uint16_t value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("HoldTime", 1, value);
+ }
+ case OccupancySensing::Attributes::HoldTimeLimits::Id: {
+ chip::app::Clusters::OccupancySensing::Structs::HoldTimeLimitsStruct::DecodableType value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("HoldTimeLimits", 1, value);
+ }
case OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id: {
uint16_t value;
ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
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 ab1040c7069e3b..a43195fcc99924 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
@@ -303,6 +303,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent,
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::DecodableType & value);
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::OccupancySensing::Structs::HoldTimeLimitsStruct::DecodableType & value);
+
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ThreadNetworkDirectory::Structs::ThreadNetworkStruct::DecodableType & value);
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 dfac8e499e1449..d2db71da4f5102 100644
--- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
@@ -128108,6 +128108,8 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs
| * Occupancy | 0x0000 |
| * OccupancySensorType | 0x0001 |
| * OccupancySensorTypeBitmap | 0x0002 |
+| * HoldTime | 0x0003 |
+| * HoldTimeLimits | 0x0004 |
| * PIROccupiedToUnoccupiedDelay | 0x0010 |
| * PIRUnoccupiedToOccupiedDelay | 0x0011 |
| * PIRUnoccupiedToOccupiedThreshold | 0x0012 |
@@ -128373,6 +128375,218 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc
}
};
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute HoldTime
+ */
+class ReadOccupancySensingHoldTime : public ReadAttribute {
+public:
+ ReadOccupancySensingHoldTime()
+ : ReadAttribute("hold-time")
+ {
+ }
+
+ ~ReadOccupancySensingHoldTime()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTime::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
+ __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeHoldTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"OccupancySensing.HoldTime response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("OccupancySensing HoldTime read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class WriteOccupancySensingHoldTime : public WriteAttribute {
+public:
+ WriteOccupancySensingHoldTime()
+ : WriteAttribute("hold-time")
+ {
+ AddArgument("attr-name", "hold-time");
+ AddArgument("attr-value", 0, UINT16_MAX, &mValue);
+ WriteAttribute::AddArguments();
+ }
+
+ ~WriteOccupancySensingHoldTime()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTime::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
+ __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRWriteParams alloc] init];
+ params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
+ params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil;
+ NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue];
+
+ [cluster writeAttributeHoldTimeWithValue:value params:params completion:^(NSError * _Nullable error) {
+ if (error != nil) {
+ LogNSError("OccupancySensing HoldTime write Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+
+private:
+ uint16_t mValue;
+};
+
+class SubscribeAttributeOccupancySensingHoldTime : public SubscribeAttribute {
+public:
+ SubscribeAttributeOccupancySensingHoldTime()
+ : SubscribeAttribute("hold-time")
+ {
+ }
+
+ ~SubscribeAttributeOccupancySensingHoldTime()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTime::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
+ __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeHoldTimeWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"OccupancySensing.HoldTime response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute HoldTimeLimits
+ */
+class ReadOccupancySensingHoldTimeLimits : public ReadAttribute {
+public:
+ ReadOccupancySensingHoldTimeLimits()
+ : ReadAttribute("hold-time-limits")
+ {
+ }
+
+ ~ReadOccupancySensingHoldTimeLimits()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTimeLimits::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
+ __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeHoldTimeLimitsWithCompletion:^(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"OccupancySensing.HoldTimeLimits response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("OccupancySensing HoldTimeLimits read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeOccupancySensingHoldTimeLimits : public SubscribeAttribute {
+public:
+ SubscribeAttributeOccupancySensingHoldTimeLimits()
+ : SubscribeAttribute("hold-time-limits")
+ {
+ }
+
+ ~SubscribeAttributeOccupancySensingHoldTimeLimits()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTimeLimits::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
+ __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeHoldTimeLimitsWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"OccupancySensing.HoldTimeLimits response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+
/*
* Attribute PIROccupiedToUnoccupiedDelay
*/
@@ -191444,6 +191658,15 @@ void registerClusterOccupancySensing(Commands & commands)
make_unique(), //
make_unique(), //
make_unique(), //
+#if MTR_ENABLE_PROVISIONAL
+ make_unique(), //
+ make_unique(), //
+ make_unique(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique(), //
+ make_unique(), //
+#endif // MTR_ENABLE_PROVISIONAL
make_unique(), //
make_unique(), //
make_unique(), //