From e8d90a492fe65e8b91b74dd9239f46cbb802d042 Mon Sep 17 00:00:00 2001 From: borristhecat Date: Sat, 27 Mar 2021 16:52:18 +0000 Subject: [PATCH 1/4] Update konnected-co-sensor.groovy added text logging toggle --- drivers/konnected-co-sensor.groovy | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/konnected-co-sensor.groovy b/drivers/konnected-co-sensor.groovy index 8e0c904..fd30522 100644 --- a/drivers/konnected-co-sensor.groovy +++ b/drivers/konnected-co-sensor.groovy @@ -1,5 +1,5 @@ /** - * Konnected CO Sensor + * Konnected Contact Sensor * * Copyright 2018 Konnected Inc (https://konnected.io) * @@ -14,33 +14,32 @@ * */ metadata { - definition (name: "Konnected CO Sensor", namespace: "konnected-io", author: "konnected.io", mnmn: "SmartThings", vid: "generic-carbon-monoxide") { - capability "Smoke Detector" - capability "Carbon Monoxide Detector" + definition (name: "Konnected Contact Sensor", namespace: "konnected-io", author: "konnected.io", mnmn: "SmartThings", vid: "generic-contact") { + capability "Contact Sensor" capability "Sensor" } preferences { input name: "normalState", type: "enum", title: "Normal State", - options: ["Normally Closed", "Normally Open"], - defaultValue: "Normally Closed", - description: "By default, the alarm state is triggered when the sensor circuit is open (NC). Select Normally Open (NO) when a closed circuit indicates an alarm." + options: ["Normally Closed", "Normally Open"], + defaultValue: "Normally Open", + description: "Most door & window sensors are Normally Open (NO), meaning that the circuit closes when the door/window is closed. To reverse this logic, select Normally Closed (NC)." + input name: "txtEnable", type: "bool", title: "Enable descriptionText logging", defaultValue: true } } def isClosed() { - normalState == "Normally Open" ? "detected" : "clear" + normalState == "Normally Closed" ? "open" : "closed" } def isOpen() { - normalState == "Normally Open" ? "clear" : "detected" + normalState == "Normally Closed" ? "closed" : "open" } // Update state sent from parent app def setStatus(state) { def stateValue = state == "1" ? isOpen() : isClosed() - sendEvent(name: "carbonMonoxide", value: stateValue) - log.info "$device.label is $stateValue" + sendEvent(name: "contact", value: stateValue) + if (txtEnable) log.info "$device.label is $stateValue" } - From 0ea1d4ef21e15700fb526aff13dee53720e02f7d Mon Sep 17 00:00:00 2001 From: borristhecat Date: Sat, 27 Mar 2021 16:53:34 +0000 Subject: [PATCH 2/4] Update konnected-motion-sensor.groovy added Hubitat standard text logging toggle --- drivers/konnected-motion-sensor.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/konnected-motion-sensor.groovy b/drivers/konnected-motion-sensor.groovy index fd5d413..81a5a37 100644 --- a/drivers/konnected-motion-sensor.groovy +++ b/drivers/konnected-motion-sensor.groovy @@ -24,6 +24,8 @@ metadata { options: ["Normally Closed", "Normally Open"], defaultValue: "Normally Closed", description: "Most motion sensors are Normally Closed (NC), meaning that the circuit opens when motion is detected. To reverse this logic, select Normally Open (NO)." + input name: "txtEnable", type: "bool", title: "Enable descriptionText logging", defaultValue: true + } } @@ -40,5 +42,5 @@ def isOpen() { def setStatus(state) { def stateValue = state == "1" ? isOpen() : isClosed() sendEvent(name: "motion", value: stateValue) - log.info "$device.label is $stateValue" + if (txtEnable) log.info "$device.label is $stateValue" } From 57d76b05836c4c6ab808944d5a7346b611b31808 Mon Sep 17 00:00:00 2001 From: borristhecat Date: Sat, 27 Mar 2021 16:54:40 +0000 Subject: [PATCH 3/4] Update konnected-panic-button.groovy Added standard Hubitat text logging toggle. --- drivers/konnected-panic-button.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/konnected-panic-button.groovy b/drivers/konnected-panic-button.groovy index 547932a..ecda9be 100644 --- a/drivers/konnected-panic-button.groovy +++ b/drivers/konnected-panic-button.groovy @@ -24,6 +24,7 @@ metadata { options: ["Normally Closed", "Normally Open"], defaultValue: "Normally Closed", description: "By default, the alarm state is triggered when the sensor circuit is open (NC). Select Normally Open (NO) when a closed circuit indicates an alarm." + input name: "txtEnable", type: "bool", title: "Enable descriptionText logging", defaultValue: true } } @@ -40,5 +41,5 @@ def isOpen() { def setStatus(state) { def stateValue = state == "1" ? isOpen() : isClosed() sendEvent(name: "contact", value: stateValue) - log.info "$device.label is $stateValue" + if (txtEnable) log.info "$device.label is $stateValue" } From 0dca89032b06e216f4ff56302500dfa902a6dcc7 Mon Sep 17 00:00:00 2001 From: borristhecat Date: Sat, 27 Mar 2021 16:58:38 +0000 Subject: [PATCH 4/4] Update konnected-temperature-probe-ds18b20.groovy Added standard Hubitat text logging toggle --- drivers/konnected-temperature-probe-ds18b20.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/konnected-temperature-probe-ds18b20.groovy b/drivers/konnected-temperature-probe-ds18b20.groovy index 50e34db..af81b0d 100644 --- a/drivers/konnected-temperature-probe-ds18b20.groovy +++ b/drivers/konnected-temperature-probe-ds18b20.groovy @@ -18,6 +18,9 @@ metadata { definition (name: "Konnected Temperature Probe (DS18B20)", namespace: "konnected-io", author: "konnected.io", mnmn: "SmartThings", vid: "generic-humidity") { capability "Temperature Measurement" } + preferences { + input name: "txtEnable", type: "bool", title: "Enable descriptionText logging", defaultValue: true + } } @@ -32,5 +35,5 @@ def updateStates(states) { temperature = temperature * 9 / 5 + 32 } sendEvent(name: "temperature", value: temperature.setScale(1, BigDecimal.ROUND_HALF_UP), unit: location.getTemperatureScale()) - log.info "Temperature: $temperature" + if (txtEnable) log.info "Temperature: $temperature" }