From ec85974ecdd23a1441d6152b1ae5a69fa5ed16f9 Mon Sep 17 00:00:00 2001 From: "k.klimczuk2" Date: Wed, 26 Aug 2020 14:44:42 +0200 Subject: [PATCH 1/3] ICP-11574 - query device for current status in response to WakeUpNotification --- .../zwave-smoke-alarm.src/zwave-smoke-alarm.groovy | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy b/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy index 2ea02b249d9..449349dbbe9 100644 --- a/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy +++ b/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy @@ -192,12 +192,18 @@ def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd, res results << createEvent(descriptionText: "$device.displayName woke up", isStateChange: false) if (!state.lastbatt || (now() - state.lastbatt) >= 56*60*60*1000) { results << response([ + zwave.notificationV3.notificationGet(notificationType: 0x01).format(), + "delay 2000", zwave.batteryV1.batteryGet().format(), "delay 2000", zwave.wakeUpV1.wakeUpNoMoreInformation().format() ]) } else { - results << response(zwave.wakeUpV1.wakeUpNoMoreInformation()) + results << response([ + zwave.notificationV3.notificationGet(notificationType: 0x01).format(), + "delay 2000", + zwave.wakeUpV1.wakeUpNoMoreInformation().format() + ]) } } From abc82598ca0a82f01d86338017707b3c5d96fa30 Mon Sep 17 00:00:00 2001 From: "k.klimczuk2" Date: Thu, 27 Aug 2020 10:39:17 +0200 Subject: [PATCH 2/3] ICP-11574 - query device for current status in response to WakeUpNotification --- .../zwave-basic-smoke-alarm.groovy | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/devicetypes/smartthings/zwave-basic-smoke-alarm.src/zwave-basic-smoke-alarm.groovy b/devicetypes/smartthings/zwave-basic-smoke-alarm.src/zwave-basic-smoke-alarm.groovy index a2153b19da9..82a58bd844f 100644 --- a/devicetypes/smartthings/zwave-basic-smoke-alarm.src/zwave-basic-smoke-alarm.groovy +++ b/devicetypes/smartthings/zwave-basic-smoke-alarm.src/zwave-basic-smoke-alarm.groovy @@ -192,12 +192,18 @@ def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd, res results << createEvent(descriptionText: "$device.displayName woke up", isStateChange: false) if (!state.lastbatt || (now() - state.lastbatt) >= 56*60*60*1000) { results << response([ + zwave.notificationV3.notificationGet(notificationType: 0x01).format(), + "delay 2000", zwave.batteryV1.batteryGet().format(), "delay 2000", zwave.wakeUpV1.wakeUpNoMoreInformation().format() - ]) + ]) } else { - results << response(zwave.wakeUpV1.wakeUpNoMoreInformation()) + results << response([ + zwave.notificationV3.notificationGet(notificationType: 0x01).format(), + "delay 2000", + zwave.wakeUpV1.wakeUpNoMoreInformation().format() + ]) } } From 5cbc4c8fedf18e89dfafea4a42c3c3f1ae890236 Mon Sep 17 00:00:00 2001 From: Konrad Klimczuk Date: Fri, 28 Aug 2020 08:43:22 +0200 Subject: [PATCH 3/3] ICP-11574 - query device for current status in response to WakeUpNotification --- .../zwave-basic-smoke-alarm.groovy | 11 ++++------- .../zwave-smoke-alarm.src/zwave-smoke-alarm.groovy | 11 ++++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/devicetypes/smartthings/zwave-basic-smoke-alarm.src/zwave-basic-smoke-alarm.groovy b/devicetypes/smartthings/zwave-basic-smoke-alarm.src/zwave-basic-smoke-alarm.groovy index 82a58bd844f..3d4dd97e472 100644 --- a/devicetypes/smartthings/zwave-basic-smoke-alarm.src/zwave-basic-smoke-alarm.groovy +++ b/devicetypes/smartthings/zwave-basic-smoke-alarm.src/zwave-basic-smoke-alarm.groovy @@ -191,19 +191,16 @@ def zwaveEvent(physicalgraph.zwave.commands.sensoralarmv1.SensorAlarmReport cmd, def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd, results) { results << createEvent(descriptionText: "$device.displayName woke up", isStateChange: false) if (!state.lastbatt || (now() - state.lastbatt) >= 56*60*60*1000) { - results << response([ + results << response(delayBetween([ zwave.notificationV3.notificationGet(notificationType: 0x01).format(), - "delay 2000", zwave.batteryV1.batteryGet().format(), - "delay 2000", zwave.wakeUpV1.wakeUpNoMoreInformation().format() - ]) + ]), 2000 ) } else { - results << response([ + results << response(delayBetween([ zwave.notificationV3.notificationGet(notificationType: 0x01).format(), - "delay 2000", zwave.wakeUpV1.wakeUpNoMoreInformation().format() - ]) + ]), 2000 ) } } diff --git a/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy b/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy index 449349dbbe9..ab720ea56c3 100644 --- a/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy +++ b/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy @@ -191,19 +191,16 @@ def zwaveEvent(physicalgraph.zwave.commands.sensoralarmv1.SensorAlarmReport cmd, def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd, results) { results << createEvent(descriptionText: "$device.displayName woke up", isStateChange: false) if (!state.lastbatt || (now() - state.lastbatt) >= 56*60*60*1000) { - results << response([ + results << response(delayBetween([ zwave.notificationV3.notificationGet(notificationType: 0x01).format(), - "delay 2000", zwave.batteryV1.batteryGet().format(), - "delay 2000", zwave.wakeUpV1.wakeUpNoMoreInformation().format() - ]) + ]), 2000 ) } else { - results << response([ + results << response(delayBetween([ zwave.notificationV3.notificationGet(notificationType: 0x01).format(), - "delay 2000", zwave.wakeUpV1.wakeUpNoMoreInformation().format() - ]) + ]), 2000 ) } }