From ad36628870b34bb710989d83551b19e8fe1033dd Mon Sep 17 00:00:00 2001 From: greens Date: Fri, 11 Oct 2019 10:50:45 -0700 Subject: [PATCH 1/3] ONEAPP-17643 Read IAS Zone status sooner on startup for smartsense multi --- .../smartsense-multi-sensor.src/smartsense-multi-sensor.groovy | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy index 411497804f4..e0ed17fa2f8 100755 --- a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy +++ b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy @@ -402,6 +402,7 @@ def configure() { def configCmds = [zigbee.readAttribute(zigbee.TEMPERATURE_MEASUREMENT_CLUSTER, 0x0000), zigbee.readAttribute(0xFC02, 0x0010, [mfgCode: manufacturerCode])] def batteryAttr = device.getDataValue("manufacturer") == "Samjin" ? 0x0021 : 0x0020 configCmds += zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, batteryAttr) + configCmds += zigbee.readAttribute(zigbee.IAS_ZONE_CLUSTER, zigbee.ATTRIBUTE_IAS_ZONE_STATUS) configCmds += zigbee.enrollResponse() if (device.getDataValue("manufacturer") == "SmartThings") { @@ -441,8 +442,6 @@ def configure() { zigbee.configureReporting(0xFC02, 0x0013, DataType.INT16, 1, 3600, 0x0001, [mfgCode: manufacturerCode]) + zigbee.configureReporting(0xFC02, 0x0014, DataType.INT16, 1, 3600, 0x0001, [mfgCode: manufacturerCode]) } - configCmds += zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, batteryAttr) - configCmds += zigbee.readAttribute(zigbee.IAS_ZONE_CLUSTER, zigbee.ATTRIBUTE_IAS_ZONE_STATUS) return configCmds } From ebb484597bb6957cac5089d1e650cf436b766c54 Mon Sep 17 00:00:00 2001 From: greens Date: Fri, 11 Oct 2019 13:09:43 -0700 Subject: [PATCH 2/3] add back in second battery read send inactive acceleration event on join --- .../smartsense-multi-sensor.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy index e0ed17fa2f8..0b03384619c 100755 --- a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy +++ b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy @@ -397,13 +397,14 @@ def configure() { // Device-Watch allows 2 check-in misses from device + ping (plus 1 min lag time) // enrolls with default periodic reporting until newer 5 min interval is confirmed sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"]) + sendEvent(name: "acceleration", value: "inactive", descriptionText: "{{ device.displayName }} was $value", isStateChange: false, displayed: false) log.debug "Configuring Reporting" def configCmds = [zigbee.readAttribute(zigbee.TEMPERATURE_MEASUREMENT_CLUSTER, 0x0000), zigbee.readAttribute(0xFC02, 0x0010, [mfgCode: manufacturerCode])] def batteryAttr = device.getDataValue("manufacturer") == "Samjin" ? 0x0021 : 0x0020 configCmds += zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, batteryAttr) - configCmds += zigbee.readAttribute(zigbee.IAS_ZONE_CLUSTER, zigbee.ATTRIBUTE_IAS_ZONE_STATUS) configCmds += zigbee.enrollResponse() + configCmds += zigbee.readAttribute(zigbee.IAS_ZONE_CLUSTER, zigbee.ATTRIBUTE_IAS_ZONE_STATUS) if (device.getDataValue("manufacturer") == "SmartThings") { log.debug "Refreshing Values for manufacturer: SmartThings " @@ -443,6 +444,8 @@ def configure() { zigbee.configureReporting(0xFC02, 0x0014, DataType.INT16, 1, 3600, 0x0001, [mfgCode: manufacturerCode]) } + configCmds += zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, batteryAttr) + return configCmds } From b854884a23d984221d67c25051dec891690c578d Mon Sep 17 00:00:00 2001 From: greens Date: Mon, 14 Oct 2019 15:32:16 -0700 Subject: [PATCH 3/3] change isStateChange flag --- .../smartsense-multi-sensor.src/smartsense-multi-sensor.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy index 0b03384619c..38148219a5b 100755 --- a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy +++ b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy @@ -397,7 +397,7 @@ def configure() { // Device-Watch allows 2 check-in misses from device + ping (plus 1 min lag time) // enrolls with default periodic reporting until newer 5 min interval is confirmed sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"]) - sendEvent(name: "acceleration", value: "inactive", descriptionText: "{{ device.displayName }} was $value", isStateChange: false, displayed: false) + sendEvent(name: "acceleration", value: "inactive", descriptionText: "{{ device.displayName }} was $value", displayed: false) log.debug "Configuring Reporting" def configCmds = [zigbee.readAttribute(zigbee.TEMPERATURE_MEASUREMENT_CLUSTER, 0x0000), zigbee.readAttribute(0xFC02, 0x0010, [mfgCode: manufacturerCode])]