From 09c9a9cc6f711da72e22b8978c89254cd89d86e7 Mon Sep 17 00:00:00 2001
From: Przemyslaw Kacprowicz
Date: Fri, 4 Oct 2019 07:15:48 +0200
Subject: [PATCH 1/4] Configuration change to enable temperature alarm.
---
.../fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy b/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy
index 6b7bc10e430..6fcfc268dc7 100644
--- a/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy
+++ b/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy
@@ -124,8 +124,8 @@ def configure() {
sendEvent(name: "coLevel", unit: "ppm", value: 0, displayed: true)
sendEvent(name: "carbonMonoxide", value: "clear", displayed: "true")
sendEvent(name: "tamper", value: "clear", displayed: "true")
- // turn on tamper reporting
- cmds << zwave.configurationV2.configurationSet(scaledConfigurationValue: 1, parameterNumber: 2, size: 1)
+ // turn on tamper and temperature alarm reporting
+ cmds << zwave.configurationV2.configurationSet(scaledConfigurationValue: 3, parameterNumber: 2, size: 1)
cmds << zwave.batteryV1.batteryGet()
cmds << zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1)
cmds << zwave.wakeUpV1.wakeUpNoMoreInformation()
From ca949c60f564b6c2773995a08098f35494e70096 Mon Sep 17 00:00:00 2001
From: Przemyslaw Kacprowicz
Date: Mon, 21 Oct 2019 13:19:42 +0200
Subject: [PATCH 2/4] Changed default value in parameter map.
---
.../fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy b/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy
index 6fcfc268dc7..5e430b64f74 100644
--- a/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy
+++ b/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy
@@ -386,7 +386,7 @@ private parameterMap() {[
2: "Exceeding the temperature",
3: "Both actions enabled"
],
- def: "1", title: "Z-Wave notifications",
+ def: "3", title: "Z-Wave notifications",
descr: "This parameter allows to set actions which result in sending notifications to the HUB"],
[key: "highTempTreshold", num: 22, size: 1, type: "enum", options: [
50: "120 °F / 50°C",
From 43f5e4d88ea9ad0bc557599bb8b95f6ad3697403 Mon Sep 17 00:00:00 2001
From: PKacprowiczS
Date: Mon, 28 Oct 2019 13:04:46 +0100
Subject: [PATCH 3/4] Battery report fix and set temperatureAlarm event
'cleared' to be send by default
---
.../fibaro-co-sensor-zw5.groovy | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy b/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy
index 5e430b64f74..847c6efe749 100644
--- a/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy
+++ b/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy
@@ -109,7 +109,7 @@ def updated() {
if ( state.lastUpdated && (now() - state.lastUpdated) < 500 ) return
logging("${device.displayName} - Executing updated()","info")
- if ( (settings.zwaveNotifications as Integer) >= 2 ) {
+ if ( (settings.zwaveNotifications as Integer) >= 2 || !settings.zwaveNotifications) { //before any configuration change, settings have 'null' values
sendEvent(name: "temperatureAlarm", value: "cleared", displayed: false)
} else {
sendEvent(name: "temperatureAlarm", value: null, displayed: false)
@@ -291,7 +291,15 @@ def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv5.SensorMultilevelR
def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
logging("${device.displayName} - BatteryReport received, value: ${cmd.batteryLevel}", "info")
- sendEvent(name: "battery", value: cmd.batteryLevel.toString(), unit: "%", displayed: true)
+ def map = [name: "battery", unit: "%"]
+ if (cmd.batteryLevel == 0xFF) {
+ map.value = 1
+ map.descriptionText = "${device.displayName} has a low battery"
+ map.isStateChange = true
+ } else {
+ map.value = cmd.batteryLevel
+ }
+ sendEvent(map)
}
def parse(String description) {
From 68082a84a7fa433f66f77eb1fdbb9b84e956fa08 Mon Sep 17 00:00:00 2001
From: Przemyslaw Kacprowicz
Date: Thu, 31 Oct 2019 07:02:53 +0100
Subject: [PATCH 4/4] Changed configuration to enable acoustic on exceeding the
temperature alarm.
---
.../fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy | 3 +++
1 file changed, 3 insertions(+)
diff --git a/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy b/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy
index 847c6efe749..94b62ca5e89 100644
--- a/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy
+++ b/devicetypes/fibargroup/fibaro-co-sensor-zw5.src/fibaro-co-sensor-zw5.groovy
@@ -124,8 +124,11 @@ def configure() {
sendEvent(name: "coLevel", unit: "ppm", value: 0, displayed: true)
sendEvent(name: "carbonMonoxide", value: "clear", displayed: "true")
sendEvent(name: "tamper", value: "clear", displayed: "true")
+ sendEvent(name: "temperatureAlarm", value: "cleared", displayed: false)
// turn on tamper and temperature alarm reporting
cmds << zwave.configurationV2.configurationSet(scaledConfigurationValue: 3, parameterNumber: 2, size: 1)
+ // turn on acoustic signal on exceeding the temperature alarm
+ cmds << zwave.configurationV2.configurationSet(scaledConfigurationValue: 2, parameterNumber: 4, size: 1)
cmds << zwave.batteryV1.batteryGet()
cmds << zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1)
cmds << zwave.wakeUpV1.wakeUpNoMoreInformation()