diff --git a/com.zsmartsystems.zigbee.autocode/src/main/resources/0406_OccupancySensing.xml b/com.zsmartsystems.zigbee.autocode/src/main/resources/0406_OccupancySensing.xml
index 0e565f66db..493d275f16 100644
--- a/com.zsmartsystems.zigbee.autocode/src/main/resources/0406_OccupancySensing.xml
+++ b/com.zsmartsystems.zigbee.autocode/src/main/resources/0406_OccupancySensing.xml
@@ -7,7 +7,7 @@
* Code is auto-generated. Modifications may be overwritten!
*/
-@Generated(value = "com.zsmartsystems.zigbee.autocode.ZigBeeCodeGenerator", date = "2024-05-18T20:27:57Z")
+@Generated(value = "com.zsmartsystems.zigbee.autocode.ZigBeeCodeGenerator", date = "2024-10-12T13:08:25Z")
public class ZclOccupancySensingCluster extends ZclCluster {
/**
* The ZigBee Cluster Library Cluster ID
@@ -79,7 +79,7 @@ public class ZclOccupancySensingCluster extends ZclCluster {
*/
public static final int ATTR_PIRUNOCCUPIEDTOOCCUPIEDTHRESHOLD = 0x0012;
/**
- * The UltraSonicOccupiedToUnoccupiedTime attribute specifies the time delay, in
+ * The UltrasonicOccupiedToUnoccupiedTime attribute specifies the time delay, in
* seconds, before the ultrasonic sensor changes to its occupied state when the sensed
* area becomes unoccupied. This attribute, along with
* UltraSonicUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' when
@@ -87,7 +87,7 @@ public class ZclOccupancySensingCluster extends ZclCluster {
*/
public static final int ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY = 0x0020;
/**
- * The UltraSonicUnoccupiedToOccupiedTime attribute specifies the time delay, in
+ * The UltrsonicUnoccupiedToOccupiedTime attribute specifies the time delay, in
* seconds, before the ultrasonic sensor changes to its unoccupied state when the sensed
* area becomes occupied.
*/
@@ -100,6 +100,27 @@ public class ZclOccupancySensingCluster extends ZclCluster {
* UltrasonicUnoccupiedToOccupiedDelay attribute is implemented.
*/
public static final int ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD = 0x0022;
+ /**
+ * The PhysicalContactOccupiedToUnoccupiedDelay attribute is 16 bits in length and
+ * specifies the time delay, in seconds, before the physical contact occupancy sensor
+ * changes to its unoccupied state after detecting the unoccupied event. The value of
+ * 0xffff indicates the sensor does not report occupied to unoccupied transition.
+ */
+ public static final int ATTR_PHYSICALCONTACTOCCUPIEDTOUNOCCUPIEDDELAY = 0x0030;
+ /**
+ * The PhysicalContactUnoccupiedToOccupiedDelay attribute is 16 bits in length and
+ * specifies the time delay, in seconds, before the physical contact sensor changes to its
+ * occupied state after the detection of the occupied event.
+ */
+ public static final int ATTR_PHYSICALCONTACTUNOCCUPIEDTOOCCUPIEDDELAY = 0x0031;
+ /**
+ * The PhysicalContactUnoccupiedToOccupiedThreshold attribute is 8 bits in length and
+ * specifies the number of movement detection events that must occur in the period
+ * PhysicalContactUnoccupiedToOccupiedDelay, before the PIR sensor changes to its
+ * occupied state. This attribute is mandatory if the
+ * PhysicalContactUnoccupiedToOccupiedDelay attribute is implemented.
+ */
+ public static final int ATTR_PHYSICALCONTACTUNOCCUPIEDTOOCCUPIEDTHRESHOLD = 0x0032;
@Override
protected Map
- * The UltraSonicOccupiedToUnoccupiedTime attribute specifies the time delay, in
+ * The UltrasonicOccupiedToUnoccupiedTime attribute specifies the time delay, in
* seconds, before the ultrasonic sensor changes to its occupied state when the sensed
* area becomes unoccupied. This attribute, along with
* UltraSonicUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' when
@@ -577,19 +601,19 @@ public Integer getPirUnoccupiedToOccupiedThreshold(final long refreshPeriod) {
*
* The implementation of this attribute by a device is OPTIONAL
*
- * @param ultraSonicOccupiedToUnoccupiedDelay the {@link Integer} attribute value to be set
+ * @param ultrasonicOccupiedToUnoccupiedDelay the {@link Integer} attribute value to be set
* @return the {@link Future
- * The UltraSonicOccupiedToUnoccupiedTime attribute specifies the time delay, in
+ * The UltrasonicOccupiedToUnoccupiedTime attribute specifies the time delay, in
* seconds, before the ultrasonic sensor changes to its occupied state when the sensed
* area becomes unoccupied. This attribute, along with
* UltraSonicUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' when
@@ -603,14 +627,14 @@ public Future
- * The UltraSonicOccupiedToUnoccupiedTime attribute specifies the time delay, in
+ * The UltrasonicOccupiedToUnoccupiedTime attribute specifies the time delay, in
* seconds, before the ultrasonic sensor changes to its occupied state when the sensed
* area becomes unoccupied. This attribute, along with
* UltraSonicUnoccupiedToOccupiedTime, may be used to reduce sensor 'chatter' when
@@ -632,7 +656,7 @@ public Future
- * The UltraSonicUnoccupiedToOccupiedTime attribute specifies the time delay, in
+ * The UltrsonicUnoccupiedToOccupiedTime attribute specifies the time delay, in
* seconds, before the ultrasonic sensor changes to its unoccupied state when the sensed
* area becomes occupied.
*
@@ -651,19 +675,19 @@ public Integer getUltraSonicOccupiedToUnoccupiedDelay(final long refreshPeriod)
*
* The implementation of this attribute by a device is OPTIONAL
*
- * @param ultraSonicUnoccupiedToOccupiedDelay the {@link Integer} attribute value to be set
+ * @param ultrasonicUnoccupiedToOccupiedDelay the {@link Integer} attribute value to be set
* @return the {@link Future
- * The UltraSonicUnoccupiedToOccupiedTime attribute specifies the time delay, in
+ * The UltrsonicUnoccupiedToOccupiedTime attribute specifies the time delay, in
* seconds, before the ultrasonic sensor changes to its unoccupied state when the sensed
* area becomes occupied.
*
@@ -675,14 +699,14 @@ public Future
- * The UltraSonicUnoccupiedToOccupiedTime attribute specifies the time delay, in
+ * The UltrsonicUnoccupiedToOccupiedTime attribute specifies the time delay, in
* seconds, before the ultrasonic sensor changes to its unoccupied state when the sensed
* area becomes occupied.
*
@@ -702,7 +726,7 @@ public Future
+ * The PhysicalContactOccupiedToUnoccupiedDelay attribute is 16 bits in length and
+ * specifies the time delay, in seconds, before the physical contact occupancy sensor
+ * changes to its unoccupied state after detecting the unoccupied event. The value of
+ * 0xffff indicates the sensor does not report occupied to unoccupied transition.
+ *
+ * The attribute is of type {@link Integer}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @param physicalContactOccupiedToUnoccupiedDelay the {@link Integer} attribute value to be set
+ * @return the {@link Future
+ * The PhysicalContactOccupiedToUnoccupiedDelay attribute is 16 bits in length and
+ * specifies the time delay, in seconds, before the physical contact occupancy sensor
+ * changes to its unoccupied state after detecting the unoccupied event. The value of
+ * 0xffff indicates the sensor does not report occupied to unoccupied transition.
+ *
+ * The attribute is of type {@link Integer}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @return the {@link Future
+ * The PhysicalContactOccupiedToUnoccupiedDelay attribute is 16 bits in length and
+ * specifies the time delay, in seconds, before the physical contact occupancy sensor
+ * changes to its unoccupied state after detecting the unoccupied event. The value of
+ * 0xffff indicates the sensor does not report occupied to unoccupied transition.
+ *
+ * This method can return cached data if the attribute has already been received.
+ * The parameter refreshPeriod is used to control this. If the attribute has been received
+ * within refreshPeriod milliseconds, then the method will immediately return the last value
+ * received. If refreshPeriod is set to 0, then the attribute will always be updated.
+ *
+ * This method will block until the response is received or a timeout occurs unless the current value is returned.
+ *
+ * The attribute is of type {@link Integer}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed
+ * @return the {@link Integer} attribute value, or null on error
+ * @deprecated As of release 1.2.0, replaced by {@link #ZclAttribute#readValue(long refreshPeriod)}
+ */
+ @Deprecated
+ public Integer getPhysicalContactOccupiedToUnoccupiedDelay(final long refreshPeriod) {
+ if (serverAttributes.get(ATTR_PHYSICALCONTACTOCCUPIEDTOUNOCCUPIEDDELAY).isLastValueCurrent(refreshPeriod)) {
+ return (Integer) serverAttributes.get(ATTR_PHYSICALCONTACTOCCUPIEDTOUNOCCUPIEDDELAY).getLastValue();
+ }
+
+ return (Integer) readSync(serverAttributes.get(ATTR_PHYSICALCONTACTOCCUPIEDTOUNOCCUPIEDDELAY));
+ }
+
+ /**
+ * Set the Physical Contact Unoccupied To Occupied Delay attribute [attribute ID 0x0031].
+ *
+ * The PhysicalContactUnoccupiedToOccupiedDelay attribute is 16 bits in length and
+ * specifies the time delay, in seconds, before the physical contact sensor changes to its
+ * occupied state after the detection of the occupied event.
+ *
+ * The attribute is of type {@link Integer}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @param physicalContactUnoccupiedToOccupiedDelay the {@link Integer} attribute value to be set
+ * @return the {@link Future
+ * The PhysicalContactUnoccupiedToOccupiedDelay attribute is 16 bits in length and
+ * specifies the time delay, in seconds, before the physical contact sensor changes to its
+ * occupied state after the detection of the occupied event.
+ *
+ * The attribute is of type {@link Integer}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @return the {@link Future
+ * The PhysicalContactUnoccupiedToOccupiedDelay attribute is 16 bits in length and
+ * specifies the time delay, in seconds, before the physical contact sensor changes to its
+ * occupied state after the detection of the occupied event.
+ *
+ * This method can return cached data if the attribute has already been received.
+ * The parameter refreshPeriod is used to control this. If the attribute has been received
+ * within refreshPeriod milliseconds, then the method will immediately return the last value
+ * received. If refreshPeriod is set to 0, then the attribute will always be updated.
+ *
+ * This method will block until the response is received or a timeout occurs unless the current value is returned.
+ *
+ * The attribute is of type {@link Integer}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed
+ * @return the {@link Integer} attribute value, or null on error
+ * @deprecated As of release 1.2.0, replaced by {@link #ZclAttribute#readValue(long refreshPeriod)}
+ */
+ @Deprecated
+ public Integer getPhysicalContactUnoccupiedToOccupiedDelay(final long refreshPeriod) {
+ if (serverAttributes.get(ATTR_PHYSICALCONTACTUNOCCUPIEDTOOCCUPIEDDELAY).isLastValueCurrent(refreshPeriod)) {
+ return (Integer) serverAttributes.get(ATTR_PHYSICALCONTACTUNOCCUPIEDTOOCCUPIEDDELAY).getLastValue();
+ }
+
+ return (Integer) readSync(serverAttributes.get(ATTR_PHYSICALCONTACTUNOCCUPIEDTOOCCUPIEDDELAY));
+ }
+
+ /**
+ * Set the Physical Contact Unoccupied To Occupied Threshold attribute [attribute ID 0x0032].
+ *
+ * The PhysicalContactUnoccupiedToOccupiedThreshold attribute is 8 bits in length and
+ * specifies the number of movement detection events that must occur in the period
+ * PhysicalContactUnoccupiedToOccupiedDelay, before the PIR sensor changes to its
+ * occupied state. This attribute is mandatory if the
+ * PhysicalContactUnoccupiedToOccupiedDelay attribute is implemented.
+ *
+ * The attribute is of type {@link Integer}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @param physicalContactUnoccupiedToOccupiedThreshold the {@link Integer} attribute value to be set
+ * @return the {@link Future
+ * The PhysicalContactUnoccupiedToOccupiedThreshold attribute is 8 bits in length and
+ * specifies the number of movement detection events that must occur in the period
+ * PhysicalContactUnoccupiedToOccupiedDelay, before the PIR sensor changes to its
+ * occupied state. This attribute is mandatory if the
+ * PhysicalContactUnoccupiedToOccupiedDelay attribute is implemented.
+ *
+ * The attribute is of type {@link Integer}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @return the {@link Future
+ * The PhysicalContactUnoccupiedToOccupiedThreshold attribute is 8 bits in length and
+ * specifies the number of movement detection events that must occur in the period
+ * PhysicalContactUnoccupiedToOccupiedDelay, before the PIR sensor changes to its
+ * occupied state. This attribute is mandatory if the
+ * PhysicalContactUnoccupiedToOccupiedDelay attribute is implemented.
+ *
+ * This method can return cached data if the attribute has already been received.
+ * The parameter refreshPeriod is used to control this. If the attribute has been received
+ * within refreshPeriod milliseconds, then the method will immediately return the last value
+ * received. If refreshPeriod is set to 0, then the attribute will always be updated.
+ *
+ * This method will block until the response is received or a timeout occurs unless the current value is returned.
+ *
+ * The attribute is of type {@link Integer}.
+ *
+ * The implementation of this attribute by a device is OPTIONAL
+ *
+ * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed
+ * @return the {@link Integer} attribute value, or null on error
+ * @deprecated As of release 1.2.0, replaced by {@link #ZclAttribute#readValue(long refreshPeriod)}
+ */
+ @Deprecated
+ public Integer getPhysicalContactUnoccupiedToOccupiedThreshold(final long refreshPeriod) {
+ if (serverAttributes.get(ATTR_PHYSICALCONTACTUNOCCUPIEDTOOCCUPIEDTHRESHOLD).isLastValueCurrent(refreshPeriod)) {
+ return (Integer) serverAttributes.get(ATTR_PHYSICALCONTACTUNOCCUPIEDTOOCCUPIEDTHRESHOLD).getLastValue();
+ }
+
+ return (Integer) readSync(serverAttributes.get(ATTR_PHYSICALCONTACTUNOCCUPIEDTOOCCUPIEDTHRESHOLD));
+ }
}
diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/occupancysensing/OccupancySensorTypeEnum.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/occupancysensing/OccupancySensorTypeEnum.java
new file mode 100644
index 0000000000..9a525c57ba
--- /dev/null
+++ b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/occupancysensing/OccupancySensorTypeEnum.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) 2016-2024 by the respective copyright holders.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package com.zsmartsystems.zigbee.zcl.clusters.occupancysensing;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+/**
+ * Occupancy Sensor Type value enumeration.
+ *
+ * Code is auto-generated. Modifications may be overwritten!
+ */
+@Generated(value = "com.zsmartsystems.zigbee.autocode.ZigBeeCodeGenerator", date = "2024-10-12T13:08:25Z")
+public enum OccupancySensorTypeEnum {
+
+ /**
+ * PIR, 0, 0x0000
+ */
+ PIR(0x0000),
+
+ /**
+ * Ultrasonic, 1, 0x0001
+ */
+ ULTRASONIC(0x0001),
+
+ /**
+ * PIR and Ultrasonic, 2, 0x0002
+ */
+ PIR_AND_ULTRASONIC(0x0002),
+
+ /**
+ * Physical Contact, 3, 0x0003
+ */
+ PHYSICAL_CONTACT(0x0003);
+
+ /**
+ * A mapping between the integer code and its corresponding OccupancySensorTypeEnum type to facilitate lookup by value.
+ */
+ private static Map