From 648dee90b654f62565997e506f0b66b631e078ae Mon Sep 17 00:00:00 2001 From: "piyush.c" Date: Fri, 16 Dec 2016 15:19:11 +0530 Subject: [PATCH 01/32] [CHF-480] Health Check implementation for Z-Wave Thermostat --- .../zwave-thermostat.src/zwave-thermostat.groovy | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/devicetypes/smartthings/zwave-thermostat.src/zwave-thermostat.groovy b/devicetypes/smartthings/zwave-thermostat.src/zwave-thermostat.groovy index 404882a..8d9f117 100644 --- a/devicetypes/smartthings/zwave-thermostat.src/zwave-thermostat.groovy +++ b/devicetypes/smartthings/zwave-thermostat.src/zwave-thermostat.groovy @@ -20,6 +20,7 @@ metadata { capability "Configuration" capability "Polling" capability "Sensor" + capability "Health Check" attribute "thermostatFanState", "string" @@ -30,6 +31,7 @@ metadata { fingerprint deviceId: "0x08" fingerprint inClusters: "0x43,0x40,0x44,0x31" + fingerprint mfr:"0039", prod:"0011", model:"0001", deviceJoinName: "Honeywell Z-Wave Thermostat" } // simulator metadata @@ -123,6 +125,11 @@ metadata { } } +def updated(){ + // Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) +} + def parse(String description) { def map = createEvent(zwaveEvent(zwave.parse(description, [0x42:1, 0x43:2, 0x31: 3]))) @@ -393,6 +400,14 @@ def setCoolingSetpoint(Double degrees, Integer delay = 30000) { ], delay) } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + log.debug "ping() called" + poll() +} + def configure() { delayBetween([ zwave.thermostatModeV2.thermostatModeSupportedGet().format(), From ce52af037661faf0a2c6fb40ed66df562147a13a Mon Sep 17 00:00:00 2001 From: bflorian Date: Tue, 21 Mar 2017 14:15:20 -0700 Subject: [PATCH 02/32] DVCSMP-2528 Added app setting for OAuth callback URL --- .../smartthings/lifx-connect.src/lifx-connect.groovy | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/smartapps/smartthings/lifx-connect.src/lifx-connect.groovy b/smartapps/smartthings/lifx-connect.src/lifx-connect.groovy index 974561e..dd17429 100644 --- a/smartapps/smartthings/lifx-connect.src/lifx-connect.groovy +++ b/smartapps/smartthings/lifx-connect.src/lifx-connect.groovy @@ -19,8 +19,15 @@ definition( singleInstance: true) { appSetting "clientId" appSetting "clientSecret" + appSetting "serverUrl" // See note below } +// NOTE regarding OAuth settings. On NA01 (i.e. graph.api), NA01S, and NA01D the serverUrl app setting can be left +// Blank. For other shards is should be set to the callback URL registered with LIFX, which is: +// +// Production -- https://graph.api.smartthings.com +// Staging -- https://graph-na01s-useast1.smartthingsgdev.com +// Development -- https://graph-na01d-useast1.smartthingsgdev.com preferences { page(name: "Credentials", title: "LIFX", content: "authPage", install: true) @@ -35,8 +42,8 @@ mappings { path("/test") { action: [ GET: "oauthSuccess" ] } } -def getServerUrl() { return "https://graph.api.smartthings.com" } -def getCallbackUrl() { return "https://graph.api.smartthings.com/oauth/callback"} +def getServerUrl() { return appSettings.serverUrl ?: apiServerUrl } +def getCallbackUrl() { return "${getServerUrl()}/oauth/callback" } def apiURL(path = '/') { return "https://api.lifx.com/v1${path}" } def getSecretKey() { return appSettings.secretKey } def getClientId() { return appSettings.clientId } From b5e1d652fd85b30520c3dd2b68ccce7e20a50cea Mon Sep 17 00:00:00 2001 From: "sushant.k1" Date: Thu, 22 Dec 2016 12:37:58 +0530 Subject: [PATCH 03/32] [CHF-493] Added Health Check Implementation for Micro Smart Switch 2E. --- .../zwave-metering-switch.groovy | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy b/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy index 21ceb1b..5f3db81 100644 --- a/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy +++ b/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy @@ -21,10 +21,13 @@ metadata { capability "Refresh" capability "Configuration" capability "Sensor" + capability "Light" + capability "Health Check" command "reset" fingerprint inClusters: "0x25,0x32" + fingerprint mfr:"0086", prod:"0003", model:"0012", deviceJoinName: "Aeon Labs Micro Smart Switch 2E" } // simulator metadata @@ -72,6 +75,8 @@ metadata { } def updated() { + // Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) try { if (!state.MSR) { response(zwave.manufacturerSpecificV2.manufacturerSpecificGet().format()) @@ -178,6 +183,14 @@ def poll() { ]) } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + log.debug "ping() called" + refresh() +} + def refresh() { delayBetween([ zwave.switchBinaryV1.switchBinaryGet().format(), From 9b4f6974de595bfd0c7839bbd3edbf3b1a7ed8f9 Mon Sep 17 00:00:00 2001 From: rappleg Date: Wed, 22 Mar 2017 11:21:04 -0500 Subject: [PATCH 04/32] DVCSMP-2533 Fix backgroundColor on SmartSense Multi --- .../smartthings/smartsense-multi.src/smartsense-multi.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devicetypes/smartthings/smartsense-multi.src/smartsense-multi.groovy b/devicetypes/smartthings/smartsense-multi.src/smartsense-multi.groovy index 328c9a7..c22162b 100644 --- a/devicetypes/smartthings/smartsense-multi.src/smartsense-multi.groovy +++ b/devicetypes/smartthings/smartsense-multi.src/smartsense-multi.groovy @@ -52,7 +52,7 @@ metadata { tiles(scale: 2) { multiAttributeTile(name:"contact", type: "generic", width: 6, height: 4){ tileAttribute ("device.contact", key: "PRIMARY_CONTROL") { - attributeState "open", label:'${name}', icon:"st.contact.contact.open", backgroundColor:"##e86d13" + attributeState "open", label:'${name}', icon:"st.contact.contact.open", backgroundColor:"#e86d13" attributeState "closed", label:'${name}', icon:"st.contact.contact.closed", backgroundColor:"#00a0dc" } } From cbd15ae9ccfae79e25e70b14b2918542379ed3de Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Wed, 22 Mar 2017 16:57:11 -0700 Subject: [PATCH 05/32] Added health-check for Logitech Harmony Hub --- .../logitech-harmony-hub-c2c.groovy | 15 +++++++++++++++ .../logitech-harmony-connect.groovy | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/devicetypes/smartthings/logitech-harmony-hub-c2c.src/logitech-harmony-hub-c2c.groovy b/devicetypes/smartthings/logitech-harmony-hub-c2c.src/logitech-harmony-hub-c2c.groovy index 8395f80..e287e94 100644 --- a/devicetypes/smartthings/logitech-harmony-hub-c2c.src/logitech-harmony-hub-c2c.groovy +++ b/devicetypes/smartthings/logitech-harmony-hub-c2c.src/logitech-harmony-hub-c2c.groovy @@ -7,6 +7,7 @@ metadata { definition (name: "Logitech Harmony Hub C2C", namespace: "smartthings", author: "SmartThings") { capability "Media Controller" capability "Refresh" + capability "Health Check" command "activityoff" command "alloff" @@ -38,6 +39,16 @@ metadata { } } +def installed() { + log.debug "installed()" + sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "cloud", scheme:"untracked"]), displayed: false) +} + +def updated() { + log.debug "updated()" + sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "cloud", scheme:"untracked"]), displayed: false) +} + def startActivity(String activityId) { log.debug "Executing 'Start Activity'" log.trace parent.activity("$device.deviceNetworkId-$activityId","start") @@ -58,6 +69,10 @@ def poll() { log.trace parent.poll() } +def ping() { + refresh() +} + def refresh() { log.debug "Executing 'Refresh'" log.trace parent.poll() diff --git a/smartapps/smartthings/logitech-harmony-connect.src/logitech-harmony-connect.groovy b/smartapps/smartthings/logitech-harmony-connect.src/logitech-harmony-connect.groovy index 43c55fa..72763ef 100644 --- a/smartapps/smartthings/logitech-harmony-connect.src/logitech-harmony-connect.groovy +++ b/smartapps/smartthings/logitech-harmony-connect.src/logitech-harmony-connect.groovy @@ -511,6 +511,10 @@ def pollResponse(response, data) { if (ResponseValues) { def map = [:] ResponseValues.hubs.each { + // Device-Watch relies on the Logitech Harmony Cloud to get the Device state. + def isAlive = it.value.status + def d = getChildDevice("harmony-${it.key}") + d?.sendEvent(name: "DeviceWatch-DeviceStatus", value: isAlive!=504? "online":"offline", displayed: false, isStateChange: true) if (it.value.message == "OK") { map["${it.key}"] = "${it.value.response.data.currentAvActivity},${it.value.response.data.activityStatus}" def hub = getChildDevice("harmony-${it.key}") From 343ec9d856836337db361d33b1fa993e6eb3f6b7 Mon Sep 17 00:00:00 2001 From: bflorian Date: Tue, 21 Mar 2017 15:38:51 -0700 Subject: [PATCH 06/32] DVCSMP-2399 Added Zooz ZEN20 DTH --- .../zooz-power-strip-outlet.groovy | 41 ++++ .../zooz-power-strip.groovy | 210 ++++++++++++++++++ 2 files changed, 251 insertions(+) create mode 100644 devicetypes/smartthings/zooz-power-strip-outlet.src/zooz-power-strip-outlet.groovy create mode 100644 devicetypes/smartthings/zooz-power-strip.src/zooz-power-strip.groovy diff --git a/devicetypes/smartthings/zooz-power-strip-outlet.src/zooz-power-strip-outlet.groovy b/devicetypes/smartthings/zooz-power-strip-outlet.src/zooz-power-strip-outlet.groovy new file mode 100644 index 0000000..0fd103c --- /dev/null +++ b/devicetypes/smartthings/zooz-power-strip-outlet.src/zooz-power-strip-outlet.groovy @@ -0,0 +1,41 @@ +/** + * Zooz Power Strip Outlet + * + * Copyright 2017 SmartThings + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License + * for the specific language governing permissions and limitations under the License. + * + */ +metadata { + definition (name: "Zooz Power Strip Outlet", namespace: "smartthings", author: "SmartThings") { + capability "Switch" + capability "Actuator" + capability "Sensor" + } + + tiles { + multiAttributeTile(name:"switch", type: "lighting", width: 6, height: 4, canChangeIcon: true){ + tileAttribute ("device.switch", key: "PRIMARY_CONTROL") { + attributeState "off", label: '${name}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff", nextState:"turningOn" + attributeState "on", label: '${name}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#00A0DC", nextState:"turningOff" + attributeState "turningOn", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#00A0DC", nextState:"turningOff" + attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn" + } + } + } +} + +void on() { + parent.childOn(device.deviceNetworkId) +} + +void off() { + parent.childOff(device.deviceNetworkId) +} diff --git a/devicetypes/smartthings/zooz-power-strip.src/zooz-power-strip.groovy b/devicetypes/smartthings/zooz-power-strip.src/zooz-power-strip.groovy new file mode 100644 index 0000000..a6ee0ea --- /dev/null +++ b/devicetypes/smartthings/zooz-power-strip.src/zooz-power-strip.groovy @@ -0,0 +1,210 @@ +/** + * Zooz ZEN20 Power Strip Outlet + * + * Implementation of the Zooz ZEN20 power strip that uses the new composite device capabilities to provide individual + * control of each outlet from SmartApps as well as the mobile app. Incorporates contributions from: + * + * Eric Maycock (https://github.com/erocm123/SmartThingsPublic/blob/master/devicetypes/erocm123/zooz-power-strip.src/zooz-power-strip.groovy) + * Robert Vandervoort (https://github.com/robertvandervoort/SmartThings/blob/master/zooZ-Strip-ZEN20/device_type-zooZ-strip-ZEN20_v1.0) + * + * Copyright 2017 SmartThings + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License + * for the specific language governing permissions and limitations under the License. + * + */ +metadata { + definition (name: "Zooz Power Strip", namespace: "smartthings", author: "SmartThings") { + capability "Switch" + capability "Refresh" + capability "Actuator" + capability "Sensor" + + fingerprint manufacturer: "015D", prod: "0651", model: "F51C", deviceJoinName: "Zooz ZEN 20 Power Strip" + } + + tiles { + multiAttributeTile(name:"switch", type: "lighting", width: 6, height: 4, canChangeIcon: true){ + tileAttribute ("device.switch", key: "PRIMARY_CONTROL") { + attributeState "off", label: '${name}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff", nextState:"turningOn" + attributeState "on", label: '${name}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#00A0DC", nextState:"turningOff" + attributeState "turningOn", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#00A0DC", nextState:"turningOff" + attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn" + } + } + childDeviceTiles("outlets") + standardTile("refresh", "device.switch", width: 1, height: 1, inactiveLabel: false, decoration: "flat") { + state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh" + } + } +} + +///////////////////////////// +// Installation and update // +///////////////////////////// +def installed() { + createChildDevices() +} + +def updated() { + if (!childDevices) { + createChildDevices() + } + else if (device.label != state.oldLabel) { + childDevices.each { + def newLabel = "${device.displayName} (CH${channelNumber(it.deviceNetworkId)})" + it.setLabel(newLabel) + } + state.oldLabel = device.label + } +} + + +////////////////////// +// Event Generation // +////////////////////// +def parse(String description) { + trace "parse('$description')" + def result = [] + if (description.startsWith("Err")) { + result = createEvent(descriptionText:description, isStateChange:true) + } else if (description != "updated") { + def cmd = zwave.parse(description, [0x60: 3, 0x32: 3, 0x25: 1, 0x20: 1]) + if (cmd) { + result += zwaveEvent(cmd, 1) + } + else { + log.warn "Unparsed description $description" + } + } + result +} + +def zwaveEvent(physicalgraph.zwave.commands.multichannelv3.MultiChannelCmdEncap cmd, ep) { + def encapsulatedCommand = cmd.encapsulatedCommand([0x32: 3, 0x25: 1, 0x20: 1]) + if (encapsulatedCommand) { + zwaveEvent(encapsulatedCommand, cmd.sourceEndPoint as Integer) + } +} + +def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd, endpoint) { + trace "zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport $cmd, $endpoint)" + zwaveBinaryEvent(cmd, endpoint) +} + +def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd, endpoint) { + trace "zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport $cmd, $endpoint)" + zwaveBinaryEvent(cmd, endpoint) +} + +def zwaveBinaryEvent(cmd, endpoint) { + def result = [] + def children = childDevices + def childDevice = children.find{it.deviceNetworkId.endsWith("$endpoint")} + childDevice.sendEvent(name: "switch", value: cmd.value ? "on" : "off") + + if (cmd.value) { + // One on and the strip is on + result << createEvent(name: "switch", value: "on") + } else { + // All off and the strip is off + if (! children.any { it.currentValue("switch") == "on" }) { + result << createEvent(name: "switch", value: "off") + } + } + result +} + +def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd, ep) { + updateDataValue("MSR", String.format("%04X-%04X-%04X", cmd.manufacturerId, cmd.productTypeId, cmd.productId)) + return null +} + +def zwaveEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd, ep) { + trace "applicationVersion $cmd.applicationVersion" +} + +def zwaveEvent(physicalgraph.zwave.Command cmd, ep) { + log.warn("${device.displayName}: Unhandled ${cmd}" + (ep ? " from endpoint $ep" : "")) +} + +///////////////////////////// +// Installation and update // +///////////////////////////// +def on() { + def cmds = [] + def cmd = zwave.switchBinaryV1.switchBinarySet(switchValue: 0xFF) + cmds << zwave.multiChannelV3.multiChannelCmdEncap(bitAddress: true, destinationEndPoint:0x1F).encapsulate(cmd).format() + cmds << "delay 400" + cmds.addAll(refresh()) + return cmds +} + +def off() { + def cmds = [] + def cmd = zwave.switchBinaryV1.switchBinarySet(switchValue: 0x00) + cmds << zwave.multiChannelV3.multiChannelCmdEncap(bitAddress: true, destinationEndPoint:0x1F).encapsulate(cmd).format() + cmds << "delay 400" + cmds.addAll(refresh()) + return cmds +} + +////////////////////// +// Child Device API // +////////////////////// +void childOn(String dni) { + onOffCmd(0xFF, channelNumber(dni)) +} + +void childOff(String dni) { + onOffCmd(0, channelNumber(dni)) +} + +def refresh() { + def cmds = (1..5).collect { endpoint -> + encap(zwave.switchBinaryV1.switchBinaryGet(), endpoint) + } + delayBetween(cmds, 100) +} + +/////////////////// +// Local Methods // +/////////////////// +private channelNumber(String dni) { + dni.split("-ep")[-1] as Integer +} + +private void onOffCmd(value, endpoint = null) { + def actions = [ + new physicalgraph.device.HubAction(encap(zwave.basicV1.basicSet(value: value), endpoint)), + new physicalgraph.device.HubAction(encap(zwave.switchBinaryV1.switchBinaryGet(), endpoint)), + ] + sendHubCommand(actions, 500) +} + +private void createChildDevices() { + state.oldLabel = device.label + for (i in 1..5) { + addChildDevice("Zooz Power Strip Outlet", "${device.deviceNetworkId}-ep${i}", null, + [completedSetup: true, label: "${device.displayName} (CH${i})", + isComponent: true, componentName: "ch$i", componentLabel: "Channel $i"]) + } +} + +private encap(cmd, endpoint) { + if (endpoint) { + zwave.multiChannelV3.multiChannelCmdEncap(destinationEndPoint:endpoint).encapsulate(cmd).format() + } else { + cmd.format() + } +} + +private trace(msg) { + //log.trace(msg) +} From 32eb95f7d77e2c5a80cb9914392286f323979be6 Mon Sep 17 00:00:00 2001 From: "piyush.c" Date: Thu, 23 Mar 2017 16:09:27 +0530 Subject: [PATCH 07/32] [CHF-561] Health Check Plant Link Sensor --- .../smartthings/plant-link.src/.st-ignore | 2 ++ .../smartthings/plant-link.src/README.md | 35 +++++++++++++++++++ .../plant-link.src/plant-link.groovy | 7 ++++ 3 files changed, 44 insertions(+) create mode 100644 devicetypes/smartthings/plant-link.src/.st-ignore create mode 100644 devicetypes/smartthings/plant-link.src/README.md diff --git a/devicetypes/smartthings/plant-link.src/.st-ignore b/devicetypes/smartthings/plant-link.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/plant-link.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/plant-link.src/README.md b/devicetypes/smartthings/plant-link.src/README.md new file mode 100644 index 0000000..170f02a --- /dev/null +++ b/devicetypes/smartthings/plant-link.src/README.md @@ -0,0 +1,35 @@ +# Plant Link + +Cloud Execution + +Works with: + +* [OSO Technologies PlantLink Soil Moisture Sensor](https://www.smartthings.com/works-with-smartthings/oso-technologies/oso-technologies-plantlink-soil-moisture-sensor) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Relative Humidity Measurement** - allows reading the relative humidity from devices that support it +* **Sensor** - detects sensor events +* **Battery** - defines device uses a battery +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Plant Link sensor is a Z-wave sleepy device and checks in every 15 minutes. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*15 + 2)mins = 32 mins. + +* __122min__ checkInterval + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the sensor is out of range. +Pairing needs to be tried again by placing the sensor closer to the hub. +Instructions related to pairing, resetting and removing the different motion sensors from SmartThings can be found in the following links +for the different models: +* [OSO Technologies PlantLink Soil Moisture Sensor Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/206868986-PlantLink-Soil-Moisture-Sensor) diff --git a/devicetypes/smartthings/plant-link.src/plant-link.groovy b/devicetypes/smartthings/plant-link.src/plant-link.groovy index 275880b..e3114e3 100644 --- a/devicetypes/smartthings/plant-link.src/plant-link.groovy +++ b/devicetypes/smartthings/plant-link.src/plant-link.groovy @@ -21,8 +21,10 @@ metadata { capability "Relative Humidity Measurement" capability "Battery" capability "Sensor" + capability "Health Check" fingerprint profileId: "0104", inClusters: "0000,0003,0405,FC08", outClusters: "0003" + fingerprint endpoint: "1", profileId: "0104", inClusters: "0000,0001,0003,0B04", outClusters: "0003", manufacturer: "", model: "", deviceJoinName: "OSO Technologies PlantLink Soil Moisture Sensor" } tiles { @@ -48,6 +50,11 @@ metadata { } } +def updated() { + // Device-Watch allows 2 check-in misses from device + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID]) +} + // Parse incoming device messages to generate events def parse(String description) { log.debug "Parse description $description" From 03b9f08eedc6a1f999754289a99e5df2364dcefc Mon Sep 17 00:00:00 2001 From: "piyush.c" Date: Fri, 24 Mar 2017 17:23:29 +0530 Subject: [PATCH 08/32] [CHF-561] Fixing Typo Error in Plant Link Readme --- devicetypes/smartthings/plant-link.src/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devicetypes/smartthings/plant-link.src/README.md b/devicetypes/smartthings/plant-link.src/README.md index 170f02a..8ec24e4 100644 --- a/devicetypes/smartthings/plant-link.src/README.md +++ b/devicetypes/smartthings/plant-link.src/README.md @@ -24,7 +24,7 @@ Works with: Plant Link sensor is a Z-wave sleepy device and checks in every 15 minutes. Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*15 + 2)mins = 32 mins. -* __122min__ checkInterval +* __32min__ checkInterval ## Troubleshooting From 36b4d48056d4540f72c90f907a1b943abf27007b Mon Sep 17 00:00:00 2001 From: "sushant.k1" Date: Wed, 22 Mar 2017 19:52:32 +0530 Subject: [PATCH 09/32] [CHF-571] Added Health Check Implementation for EcoNet Vent. --- .../smartthings/econet-vent.src/.st-ignore | 2 + .../smartthings/econet-vent.src/README.md | 43 +++++++++++++++++++ .../econet-vent.src/econet-vent.groovy | 11 +++++ 3 files changed, 56 insertions(+) create mode 100644 devicetypes/smartthings/econet-vent.src/.st-ignore create mode 100644 devicetypes/smartthings/econet-vent.src/README.md diff --git a/devicetypes/smartthings/econet-vent.src/.st-ignore b/devicetypes/smartthings/econet-vent.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/econet-vent.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/econet-vent.src/README.md b/devicetypes/smartthings/econet-vent.src/README.md new file mode 100644 index 0000000..b680629 --- /dev/null +++ b/devicetypes/smartthings/econet-vent.src/README.md @@ -0,0 +1,43 @@ +# EcoNet Vent + +Cloud Execution + +Works with: + +* [EcoNet Controls Z-Wave Vent](https://www.smartthings.com/works-with-smartthings/econet-controls/econet-controls-z-wave-vent) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Switch Level** - allows for the control of the level attribute of a light +* **Actuator** - represents that a Device has commands +* **Switch** - allows for the control of a switch device +* **Battery** - defines that the device has a battery +* **Refresh** - _refresh()_ command for status updates +* **Sensor** - detects sensor events +* **Polling** - allows for the polling of devices that support it +* **Configuration** - allow configuration of devices that support it +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +EcoNet Controls Z-Wave Vent is polled by the hub. +As of hubCore version 0.14.38 the hub sends up reports every 15 minutes regardless of whether the state changed. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*15 + 2)mins = 32 mins. +Not to mention after going OFFLINE when the device is plugged back in, it might take a considerable amount of time for +the device to appear as ONLINE again. This is because if this listening device does not respond to two poll requests in a row, +it is not polled for 5 minutes by the hub. This can delay up the process of being marked ONLINE by quite some time. + +* __32min__ checkInterval + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Instructions related to pairing, resetting and removing the device from SmartThings can be found in the following link: +* [EcoNet Controls Z-Wave Vent Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/204556420-EcoNet-EV100-Vent) \ No newline at end of file diff --git a/devicetypes/smartthings/econet-vent.src/econet-vent.groovy b/devicetypes/smartthings/econet-vent.src/econet-vent.groovy index 56a3249..f441beb 100644 --- a/devicetypes/smartthings/econet-vent.src/econet-vent.groovy +++ b/devicetypes/smartthings/econet-vent.src/econet-vent.groovy @@ -26,11 +26,13 @@ metadata { capability "Sensor" capability "Polling" capability "Configuration" + capability "Health Check" command "open" command "close" fingerprint deviceId: "0x1100", inClusters: "0x26,0x72,0x86,0x77,0x80,0x20" + fingerprint mfr:"0157", prod:"0100", model:"0100", deviceJoinName: "EcoNet Controls Z-Wave Vent" } simulator { @@ -85,6 +87,8 @@ def parse(String description) { //send the command to stop polling def updated() { + // Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) response("poll stop") } @@ -169,6 +173,13 @@ def setLevel(value, duration) { setLevel(value) } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + refresh() +} + def refresh() { delayBetween([ zwave.switchMultilevelV1.switchMultilevelGet().format(), From 5e7ded1f7372a6c58f46ceb5c04625241b060fff Mon Sep 17 00:00:00 2001 From: "sushant.k1" Date: Wed, 22 Mar 2017 18:40:07 +0530 Subject: [PATCH 10/32] [CHF-572] Added Health Check Implementation for Zen Thermostat. --- .../zenwithin/zen-thermostat.src/.st-ignore | 2 + .../zenwithin/zen-thermostat.src/README.md | 37 +++++++++++++++++++ .../zen-thermostat.src/zen-thermostat.groovy | 16 +++++--- 3 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 devicetypes/zenwithin/zen-thermostat.src/.st-ignore create mode 100644 devicetypes/zenwithin/zen-thermostat.src/README.md diff --git a/devicetypes/zenwithin/zen-thermostat.src/.st-ignore b/devicetypes/zenwithin/zen-thermostat.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/zenwithin/zen-thermostat.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/zenwithin/zen-thermostat.src/README.md b/devicetypes/zenwithin/zen-thermostat.src/README.md new file mode 100644 index 0000000..8864ff4 --- /dev/null +++ b/devicetypes/zenwithin/zen-thermostat.src/README.md @@ -0,0 +1,37 @@ +# Zen Thermostat + +Cloud Execution + +Works with: + +* [Zen Thermostat](https://www.smartthings.com/works-with-smartthings/zen/zen-thermostat) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) + +## Capabilities + +* **Actuator** - represents that a Device has commands +* **Thermostat** - allows for the control of a thermostat device +* **Temperature Measurement** - get the temperature from a Device that reports current temperature +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Refresh** - _refresh()_ command for status updates +* **Sensor** - it represents that a Device has attributes +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Zen Thermostat with reporting interval of 5 mins. +SmartThings platform will ping the device after `checkInterval` seconds of inactivity in last attempt to reach the device before marking it `OFFLINE` + +* __12min__ checkInterval + + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Other troubleshooting tips are listed as follows: +* [Zen Thermostat Troubleshooting:](https://support.smartthings.com/hc/en-us/articles/204356564-Zen-Thermostat) diff --git a/devicetypes/zenwithin/zen-thermostat.src/zen-thermostat.groovy b/devicetypes/zenwithin/zen-thermostat.src/zen-thermostat.groovy index 2e046da..a3e54a9 100644 --- a/devicetypes/zenwithin/zen-thermostat.src/zen-thermostat.groovy +++ b/devicetypes/zenwithin/zen-thermostat.src/zen-thermostat.groovy @@ -12,8 +12,9 @@ metadata { capability "Configuration" capability "Refresh" capability "Sensor" - - fingerprint profileId: "0104", endpointId: "01", inClusters: "0000,0001,0003,0004,0005,0020,0201,0202,0204,0B05", outClusters: "000A, 0019" + capability "Health Check" + + fingerprint profileId: "0104", endpointId: "01", inClusters: "0000,0001,0003,0004,0005,0020,0201,0202,0204,0B05", outClusters: "000A, 0019", manufacturer: "Zen Within", model: "Zen-01", deviceJoinName: "Zen Thermostat" //attribute "temperatureUnit", "number" @@ -467,8 +468,12 @@ def fanAuto() { "st wattr 0x${device.deviceNetworkId} 1 0x202 0 0x30 {05}" } - - +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + refresh() +} // =============== SmartThings Default Fucntions: refresh, configure, poll =============== def refresh() @@ -502,6 +507,7 @@ def poll() def configure() { + sendEvent(name: "checkInterval", value: 60 * 12, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID]) log.debug "configure() - binding & attribute report" [ //Set long poll interval to 2 qs @@ -511,7 +517,7 @@ def configure() //Thermostat - Cluster 201 "zdo bind 0x${device.deviceNetworkId} 1 1 0x201 {${device.zigbeeId}} {}", "delay 500", - "zcl global send-me-a-report 0x201 0 0x29 5 300 {3200}", + "zcl global send-me-a-report 0x201 0 0x29 5 300 {3200}", "send 0x${device.deviceNetworkId} 1 1", "delay 500", "zcl global send-me-a-report 0x201 0x0011 0x29 5 300 {3200}", From 364154e8a7ffac7b86b8655edc1f955ed4963a1d Mon Sep 17 00:00:00 2001 From: CosmicPuppy Date: Mon, 27 Mar 2017 01:08:16 -0700 Subject: [PATCH 11/32] To Tyco Door-Window Sensor DTH, added Capability "Sensor" per http://docs.smartthings.com/en/latest/device-type-developers-guide/overview.html?highlight=sensor%20actuator#actuator-and-sensor. --- .../tyco-door-window-sensor.src/tyco-door-window-sensor.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/devicetypes/smartthings/tyco-door-window-sensor.src/tyco-door-window-sensor.groovy b/devicetypes/smartthings/tyco-door-window-sensor.src/tyco-door-window-sensor.groovy index 305d3fe..8bc2cfa 100644 --- a/devicetypes/smartthings/tyco-door-window-sensor.src/tyco-door-window-sensor.groovy +++ b/devicetypes/smartthings/tyco-door-window-sensor.src/tyco-door-window-sensor.groovy @@ -23,6 +23,7 @@ metadata { capability "Refresh" capability "Temperature Measurement" capability "Health Check" + capability "Sensor" command "enrollResponse" From b7288b5bebc42ba7096543a3563a5912cb4f64de Mon Sep 17 00:00:00 2001 From: "piyush.c" Date: Wed, 22 Mar 2017 18:25:42 +0530 Subject: [PATCH 12/32] [CHF-568] Health Check keen-home-smart-vent --- .../keen-home-smart-vent.src/.st-ignore | 2 + .../keen-home-smart-vent.src/README.md | 39 +++++++++++++++++++ .../keen-home-smart-vent.groovy | 23 ++++++++--- 3 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 devicetypes/keen-home/keen-home-smart-vent.src/.st-ignore create mode 100644 devicetypes/keen-home/keen-home-smart-vent.src/README.md diff --git a/devicetypes/keen-home/keen-home-smart-vent.src/.st-ignore b/devicetypes/keen-home/keen-home-smart-vent.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/keen-home/keen-home-smart-vent.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/keen-home/keen-home-smart-vent.src/README.md b/devicetypes/keen-home/keen-home-smart-vent.src/README.md new file mode 100644 index 0000000..808ca0a --- /dev/null +++ b/devicetypes/keen-home/keen-home-smart-vent.src/README.md @@ -0,0 +1,39 @@ +# Keen Home Smart Vent + +Cloud Execution + +Works with: + +* [Keen Home Smart Vent](https://www.smartthings.com/works-with-smartthings/keen-home/keen-home-smart-vent) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#Troubleshooting) + +## Capabilities + +* **Switch** - can detect state (possible values: on/off) +* **Switch Level** - represents current light level, usually 0-100 in percent +* **Sensor** - detects sensor events +* **Temperature Measurement** - represents capability to measure temperature +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Battery** - defines device uses a battery +* **Refresh** - _refresh()_ command for status updates +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Keen Home Smart Vent with reporting interval of 5 mins. +SmartThings platform will ping the device after `checkInterval` seconds of inactivity in last attempt to reach the device before marking it `OFFLINE` + +* __12min__ checkInterval + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the sensor is out of range. +Pairing needs to be tried again by placing the sensor closer to the hub. +Instructions related to pairing, resetting and removing the different motion sensors from SmartThings can be found in the following links +for the different models: +* [Keen Home Smart Vent Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/205302050-Keen-Home-Smart-Vent) diff --git a/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy b/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy index 93703ef..2b18b8f 100644 --- a/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy +++ b/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy @@ -11,6 +11,7 @@ metadata { capability "Sensor" capability "Temperature Measurement" capability "Battery" + capability "Health Check" command "getLevel" command "getOnOff" @@ -20,10 +21,8 @@ metadata { command "setZigBeeIdTile" command "clearObstruction" - fingerprint endpoint: "1", - profileId: "0104", - inClusters: "0000,0001,0003,0004,0005,0006,0008,0020,0402,0403,0B05,FC01,FC02", - outClusters: "0019" + fingerprint endpoint: "1", profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0006,0008,0020,0402,0403,0B05,FC01,FC02", outClusters: "0019" + fingerprint endpoint: "1", profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0006,0008,0020,0402,0403,0B05,FC01,FC02", outClusters: "0019", manufacturer: "Keen Home Inc", model: "SV01-410-DV-1.0", deviceJoinName: "Keen Home Smart Vent" } // simulator metadata @@ -466,15 +465,27 @@ def refresh() { getBattery() } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + return refresh() +} + def configure() { log.debug "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 * 10 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID]) + // get ZigBee ID by hidden tile because that's the only way we can do it setZigBeeIdTile() def configCmds = [ // bind reporting clusters to hub - "zdo bind 0x${device.deviceNetworkId} 1 1 0x0006 {${device.zigbeeId}} {}", "delay 500", + //commenting out switch cluster bind as using wrapper onOffConfig of zigbee class + //"zdo bind 0x${device.deviceNetworkId} 1 1 0x0006 {${device.zigbeeId}} {}", "delay 500", "zdo bind 0x${device.deviceNetworkId} 1 1 0x0008 {${device.zigbeeId}} {}", "delay 500", "zdo bind 0x${device.deviceNetworkId} 1 1 0x0402 {${device.zigbeeId}} {}", "delay 500", "zdo bind 0x${device.deviceNetworkId} 1 1 0x0403 {${device.zigbeeId}} {}", "delay 500", @@ -510,5 +521,5 @@ def configure() { // "send 0x${device.deviceNetworkId} 1 1", "delay 1500", ] - return configCmds + refresh() + return configCmds + zigbee.onOffConfig() + refresh() } From 8c7cb54934a67a5c21affffd302a22857852d929 Mon Sep 17 00:00:00 2001 From: "piyush.c" Date: Wed, 22 Mar 2017 18:46:11 +0530 Subject: [PATCH 13/32] [CHF-562] Health Check zwave-door-window-sensor --- .../zwave-door-window-sensor.src/.st-ignore | 2 ++ .../zwave-door-window-sensor.src/README.md | 36 +++++++++++++++++++ .../zwave-door-window-sensor.groovy | 4 +++ 3 files changed, 42 insertions(+) create mode 100644 devicetypes/smartthings/zwave-door-window-sensor.src/.st-ignore create mode 100644 devicetypes/smartthings/zwave-door-window-sensor.src/README.md diff --git a/devicetypes/smartthings/zwave-door-window-sensor.src/.st-ignore b/devicetypes/smartthings/zwave-door-window-sensor.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/zwave-door-window-sensor.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/zwave-door-window-sensor.src/README.md b/devicetypes/smartthings/zwave-door-window-sensor.src/README.md new file mode 100644 index 0000000..d97e2ae --- /dev/null +++ b/devicetypes/smartthings/zwave-door-window-sensor.src/README.md @@ -0,0 +1,36 @@ +# Z-Wave Door Window Sensor + +Cloud Execution + +Works with: + +* [Aeon Labs Door/Window Sensor (Gen 5)](https://www.smartthings.com/works-with-smartthings/aeon-labs/aeon-labs-doorwindow-sensor-gen-5) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#Troubleshooting) + +## Capabilities + +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Health Check** - indicates ability to get device health notifications +* **Sensor** - detects sensor events +* **Battery** - defines that the device has a battery +* **Contact Sensor** - allows reading the value of a contact sensor device + +## Device Health + +Z-Wave Door Window Sensor is a Z-wave sleepy device and checks in every 4 hours. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*4*60 + 2)mins = 482 mins. + +* __482min__ checkInterval + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Instructions related to pairing, resetting and removing the device from SmartThings can be found in the following links +for the different models: +* [Aeon Labs Door/Window Sensor (Gen 5) Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/211834163-How-to-connect-Aeon-Labs-door-window-sensors) \ No newline at end of file diff --git a/devicetypes/smartthings/zwave-door-window-sensor.src/zwave-door-window-sensor.groovy b/devicetypes/smartthings/zwave-door-window-sensor.src/zwave-door-window-sensor.groovy index ff8491d..0f751e9 100644 --- a/devicetypes/smartthings/zwave-door-window-sensor.src/zwave-door-window-sensor.groovy +++ b/devicetypes/smartthings/zwave-door-window-sensor.src/zwave-door-window-sensor.groovy @@ -22,12 +22,14 @@ metadata { capability "Sensor" capability "Battery" capability "Configuration" + capability "Health Check" fingerprint deviceId: "0x2001", inClusters: "0x30,0x80,0x84,0x85,0x86,0x72" fingerprint deviceId: "0x07", inClusters: "0x30" fingerprint deviceId: "0x0701", inClusters: "0x5E,0x98" fingerprint deviceId: "0x0701", inClusters: "0x5E,0x86,0x72,0x98", outClusters: "0x5A,0x82" fingerprint deviceId: "0x0701", inClusters: "0x5E,0x80,0x71,0x85,0x70,0x72,0x86,0x30,0x31,0x84,0x59,0x73,0x5A,0x8F,0x98,0x7A", outClusters:"0x20" // Philio multi+ + fingerprint mfr:"0086", prod:"0002", model:"001D", deviceJoinName: "Aeon Labs Door/Window Sensor (Gen 5)" } // simulator metadata @@ -78,6 +80,8 @@ def parse(String description) { } def updated() { + // Device-Watch simply pings if no device events received for 482min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 4 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) def cmds = [] if (!state.MSR) { cmds = [ From 237e226697723df53a1edc36eed5577426248ff2 Mon Sep 17 00:00:00 2001 From: "sushant.k1" Date: Wed, 22 Mar 2017 19:32:41 +0530 Subject: [PATCH 14/32] [CHF-577] Added Health Check Implementation for Spruce Controller. --- .../spruce-controller.src/.st-ignore | 2 + .../spruce-controller.src/README.md | 37 +++++++++++++++++++ .../spruce-controller.groovy | 29 +++++++++------ 3 files changed, 56 insertions(+), 12 deletions(-) create mode 100644 devicetypes/plaidsystems/spruce-controller.src/.st-ignore create mode 100644 devicetypes/plaidsystems/spruce-controller.src/README.md diff --git a/devicetypes/plaidsystems/spruce-controller.src/.st-ignore b/devicetypes/plaidsystems/spruce-controller.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/plaidsystems/spruce-controller.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/plaidsystems/spruce-controller.src/README.md b/devicetypes/plaidsystems/spruce-controller.src/README.md new file mode 100644 index 0000000..1ace86e --- /dev/null +++ b/devicetypes/plaidsystems/spruce-controller.src/README.md @@ -0,0 +1,37 @@ +# Spruce Controller + +Cloud Execution + +Works with: + +* [Spruce Irrigation Controller](https://www.smartthings.com/works-with-smartthings/spruce/spruce-irrigation-controller) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Switch** - can detect state (possible values: on/off) +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Refresh** - _refresh()_ command for status updates +* **Actuator** - represents that a Device has commands +* **Valve** - allows for the control of a valve device +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Spruce Controller with reporting interval of 10 mins. +SmartThings platform will ping the device after `checkInterval` seconds of inactivity in last attempt to reach the device before marking it `OFFLINE` + +* __22min__ checkInterval + + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Other troubleshooting tips are listed as follows: +* [Spruce Irrigation Controller Troubleshooting:](https://support.smartthings.com/hc/en-us/articles/208053773-Spruce-Irrigation-Controller-Sensor) diff --git a/devicetypes/plaidsystems/spruce-controller.src/spruce-controller.groovy b/devicetypes/plaidsystems/spruce-controller.src/spruce-controller.groovy index baf2f1a..bdde1b1 100644 --- a/devicetypes/plaidsystems/spruce-controller.src/spruce-controller.groovy +++ b/devicetypes/plaidsystems/spruce-controller.src/spruce-controller.groovy @@ -26,7 +26,8 @@ metadata { capability "Configuration" capability "Refresh" capability "Actuator" - capability "Valve" + capability "Valve" + capability "Health Check" attribute "switch", "string" attribute "switch1", "string" @@ -96,7 +97,7 @@ metadata { command "notify" command "updated" - fingerprint endpointId: "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18", profileId: "0104", deviceId: "0002", deviceVersion: "00", inClusters: "0000,0003,0004,0005,0006,000F", outClusters: "0003, 0019", manufacturer: "PLAID SYSTEMS", model: "PS-SPRZ16-01" + fingerprint endpointId: "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18", profileId: "0104", deviceId: "0002", deviceVersion: "00", inClusters: "0000,0003,0004,0005,0006,000F", outClusters: "0003, 0019", manufacturer: "PLAID SYSTEMS", model: "PS-SPRZ16-01", deviceJoinName: "Spruce Irrigation Controller" } @@ -248,8 +249,8 @@ def parse(String description) { log.debug "Alarm" map = getAlarm(descMap) } - } - + } + if (map) { result = createEvent(map) } @@ -366,14 +367,14 @@ def writeTime(wEP, runTime){ //set reporting and binding def configure() { - + // Device-Watch allows 2 check-in misses from device (plus 2 mins lag time) + sendEvent(name: "checkInterval", value: 2 * 10 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID]) String zigbeeId = swapEndianHex(device.hub.zigbeeId) log.debug "Confuguring Reporting and Bindings ${device.deviceNetworkId} ${device.zigbeeId}" sendEvent(name: 'configuration',value: 100, descriptionText: "Configuration initialized") def configCmds = [ //program on/off - "zdo bind 0x${device.deviceNetworkId} 1 1 6 {${device.zigbeeId}} {}", "delay 1000", "zdo bind 0x${device.deviceNetworkId} 1 1 0x09 {${device.zigbeeId}} {}", "delay 1000", "zdo bind 0x${device.deviceNetworkId} 1 1 0x0F {${device.zigbeeId}} {}", "delay 1000", //zones 1-8 @@ -396,10 +397,7 @@ def configure() { "zdo bind 0x${device.deviceNetworkId} 17 1 0x0F {${device.zigbeeId}} {}", "delay 1000", //rain sensor "zdo bind 0x${device.deviceNetworkId} 18 1 0x0F {${device.zigbeeId}} {}", - - "zcl global send-me-a-report 6 0 0x10 1 0 {01}", "delay 500", - "send 0x${device.deviceNetworkId} 1 1", "delay 500", - + "zcl global send-me-a-report 0x0F 0x55 0x10 1 0 {01}", "delay 500", "send 0x${device.deviceNetworkId} 1 1", "delay 500", @@ -458,7 +456,7 @@ def configure() { "zcl global send-me-a-report 0x09 0x00 0x21 1 0 {00}", "delay 500", "send 0x${device.deviceNetworkId} 1 1", "delay 500" ] - return configCmds + rain() + manual() + return configCmds + zigbee.onOffConfig() + rain() + manual() } @@ -483,7 +481,14 @@ private byte[] reverseArray(byte[] array) { i++; } return array -} +} + +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + refresh() +} def refresh() { From 0e9abb0cd2ab9ec2e5e7c2a3ba8bd284becb5ff0 Mon Sep 17 00:00:00 2001 From: "piyush.c" Date: Mon, 27 Mar 2017 23:34:30 +0530 Subject: [PATCH 15/32] [CHF-558] Health Check ZigBee Switch --- .../keen-home-smart-vent.src/README.md | 4 +-- .../smartthings/zigbee-switch.src/.st-ignore | 2 ++ .../smartthings/zigbee-switch.src/README.md | 35 +++++++++++++++++++ .../zigbee-switch.src/zigbee-switch.groovy | 10 ++++++ 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 devicetypes/smartthings/zigbee-switch.src/.st-ignore create mode 100644 devicetypes/smartthings/zigbee-switch.src/README.md diff --git a/devicetypes/keen-home/keen-home-smart-vent.src/README.md b/devicetypes/keen-home/keen-home-smart-vent.src/README.md index 808ca0a..355c2b2 100644 --- a/devicetypes/keen-home/keen-home-smart-vent.src/README.md +++ b/devicetypes/keen-home/keen-home-smart-vent.src/README.md @@ -25,10 +25,10 @@ Works with: ## Device Health -Keen Home Smart Vent with reporting interval of 5 mins. +Keen Home Smart Vent with reporting interval of 10 mins. SmartThings platform will ping the device after `checkInterval` seconds of inactivity in last attempt to reach the device before marking it `OFFLINE` -* __12min__ checkInterval +* __22min__ checkInterval ## Troubleshooting diff --git a/devicetypes/smartthings/zigbee-switch.src/.st-ignore b/devicetypes/smartthings/zigbee-switch.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/zigbee-switch.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/zigbee-switch.src/README.md b/devicetypes/smartthings/zigbee-switch.src/README.md new file mode 100644 index 0000000..be8c067 --- /dev/null +++ b/devicetypes/smartthings/zigbee-switch.src/README.md @@ -0,0 +1,35 @@ +# Leviton Switch (ZigBee) + +Cloud Execution + +Works with: + +* [Leviton Switch (ZigBee)](https://www.smartthings.com/works-with-smartthings/leviton/leviton-switch) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#Troubleshooting) + +## Capabilities + +* **Actuator** - represents that a Device has commands +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Refresh** - _refresh()_ command for status updates +* **Switch** - can detect state (possible values: on/off) +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +A Zigbee Switch with reporting interval of 10 mins. +SmartThings platform will ping the device after `checkInterval` seconds of inactivity in last attempt to reach the device before marking it `OFFLINE` + +* __22min__ checkInterval + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Instructions related to pairing, resetting and removing the device from SmartThings can be found in the following link: +* [Leviton Switch Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/209686003-How-to-connect-Leviton-ZigBee-devices) diff --git a/devicetypes/smartthings/zigbee-switch.src/zigbee-switch.groovy b/devicetypes/smartthings/zigbee-switch.src/zigbee-switch.groovy index 34192de..20637eb 100644 --- a/devicetypes/smartthings/zigbee-switch.src/zigbee-switch.groovy +++ b/devicetypes/smartthings/zigbee-switch.src/zigbee-switch.groovy @@ -18,6 +18,7 @@ metadata { capability "Configuration" capability "Refresh" capability "Switch" + capability "Health Check" fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006" fingerprint profileId: "0104", inClusters: "0000, 0003, 0006", outClusters: "0003, 0006, 0019, 0406", manufacturer: "Leviton", model: "ZSS-10", deviceJoinName: "Leviton Switch" @@ -75,11 +76,20 @@ def on() { zigbee.on() } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + return refresh() +} + def refresh() { zigbee.onOffRefresh() + zigbee.onOffConfig() } def configure() { + // Device-Watch allows 2 check-in misses from device + ping (plus 2 min lag time) + sendEvent(name: "checkInterval", value: 2 * 10 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID]) log.debug "Configuring Reporting and Bindings." zigbee.onOffRefresh() + zigbee.onOffConfig() } From 74ae369143f7307ff929f4ef15755852e212303d Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Mon, 27 Mar 2017 15:05:39 -0700 Subject: [PATCH 16/32] Added health-check for Fibaro Door Window Sensor --- .../fibaro-door-window-sensor.src/.st-ignore | 2 + .../fibaro-door-window-sensor.src/README.md | 40 +++++++++++++++++++ .../fibaro-door-window-sensor.groovy | 6 ++- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 devicetypes/smartthings/fibaro-door-window-sensor.src/.st-ignore create mode 100644 devicetypes/smartthings/fibaro-door-window-sensor.src/README.md diff --git a/devicetypes/smartthings/fibaro-door-window-sensor.src/.st-ignore b/devicetypes/smartthings/fibaro-door-window-sensor.src/.st-ignore new file mode 100644 index 0000000..71af75c --- /dev/null +++ b/devicetypes/smartthings/fibaro-door-window-sensor.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md \ No newline at end of file diff --git a/devicetypes/smartthings/fibaro-door-window-sensor.src/README.md b/devicetypes/smartthings/fibaro-door-window-sensor.src/README.md new file mode 100644 index 0000000..b425636 --- /dev/null +++ b/devicetypes/smartthings/fibaro-door-window-sensor.src/README.md @@ -0,0 +1,40 @@ +# Fibaro Door Window Sensor + +Cloud Execution + +Works with: + +* [Fibaro Door/Window Sensor](https://www.smartthings.com/works-with-smartthings/sensors/fibaro-doorwindow-sensor) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery-specification) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Contact Sensor** - can detect contact (possible values: open,closed) +* **Sensor** - detects sensor events +* **Battery** - defines device uses a battery +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Fibaro Door/Window Sensor is a Z-wave sleepy device and wakes up every 4 hours. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*4*60 + 2)mins = 482 mins. + +* __482min__ checkInterval + +## Battery Specification + +One 1/2AA 3.6V battery is required. + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Instructions related to pairing, resetting and removing the device from SmartThings can be found in the following link: +* [Fibaro Door/Window Sensor Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/204075194-Fibaro-Door-Window-Sensor) \ No newline at end of file diff --git a/devicetypes/smartthings/fibaro-door-window-sensor.src/fibaro-door-window-sensor.groovy b/devicetypes/smartthings/fibaro-door-window-sensor.src/fibaro-door-window-sensor.groovy index 8970554..4ece9ab 100644 --- a/devicetypes/smartthings/fibaro-door-window-sensor.src/fibaro-door-window-sensor.groovy +++ b/devicetypes/smartthings/fibaro-door-window-sensor.src/fibaro-door-window-sensor.groovy @@ -39,7 +39,8 @@ capability "Contact Sensor" capability "Sensor" capability "Battery" - capability "Configuration" + capability "Configuration" + capability "Health Check" command "resetParams2StDefaults" command "listCurrentParams" @@ -266,6 +267,9 @@ def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerS */ def configure() { log.debug "Configuring Device..." + // Device wakes up every 4 hours, this interval allows us to miss one wakeup notification before marking offline + sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) + def cmds = [] cmds << zwave.configurationV1.configurationSet(configurationValue: [0,0], parameterNumber: 1, size: 2).format() // send associate to group 3 to get sensor data reported only to hub From 693f2c10605c5149a904e645d508f4e1b6baaf30 Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Mon, 27 Mar 2017 15:29:33 -0700 Subject: [PATCH 17/32] Added health-check for Zwave Motion Sensor --- .../zwave-motion-sensor.src/.st-ignore | 2 + .../zwave-motion-sensor.src/README.md | 39 +++++++++++++++++++ .../zwave-motion-sensor.groovy | 6 +++ 3 files changed, 47 insertions(+) create mode 100644 devicetypes/smartthings/zwave-motion-sensor.src/.st-ignore create mode 100644 devicetypes/smartthings/zwave-motion-sensor.src/README.md diff --git a/devicetypes/smartthings/zwave-motion-sensor.src/.st-ignore b/devicetypes/smartthings/zwave-motion-sensor.src/.st-ignore new file mode 100644 index 0000000..71af75c --- /dev/null +++ b/devicetypes/smartthings/zwave-motion-sensor.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md \ No newline at end of file diff --git a/devicetypes/smartthings/zwave-motion-sensor.src/README.md b/devicetypes/smartthings/zwave-motion-sensor.src/README.md new file mode 100644 index 0000000..f698d03 --- /dev/null +++ b/devicetypes/smartthings/zwave-motion-sensor.src/README.md @@ -0,0 +1,39 @@ +# Z-wave Motion Sensor + +Cloud Execution + +Works with: + +* [Ecolink PIR Motion Detector with Pet Immunity](https://www.smartthings.com/works-with-smartthings/sensors/ecolink-pir-motion-detector-with-pet-immunity) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery-specification) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Motion Sensor** - can detect motion +* **Sensor** - detects sensor events +* **Battery** - defines device uses a battery +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Ecolink PIR Motion Detector with Pet Immunity is a Z-wave sleepy device and wakes up every 4 hours. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*4*60 + 2)mins = 482 mins. + +* __482min__ checkInterval + +## Battery Specification + +One CR123A Lithium 3V battery is required. + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Instructions related to pairing, resetting and removing the device from SmartThings can be found in the following link: +* [Ecolink PIR Motion Detector with Pet Immunity Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/202294400-Ecolink-PIR-Motion-Detector-PIRZWAVE2-ECO-) \ No newline at end of file diff --git a/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy b/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy index a5003c3..2395602 100644 --- a/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy +++ b/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy @@ -21,6 +21,7 @@ metadata { capability "Motion Sensor" capability "Sensor" capability "Battery" + capability "Health Check" fingerprint mfr: "011F", prod: "0001", model: "0001", deviceJoinName: "Schlage Motion Sensor" // Schlage motion fingerprint mfr: "014A", prod: "0001", model: "0001", deviceJoinName: "Ecolink Motion Sensor" // Ecolink motion @@ -50,6 +51,11 @@ metadata { } } +def updated(){ +// Device wakes up every 4 hours, this interval allows us to miss one wakeup notification before marking offline + sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) +} + def parse(String description) { def result = null if (description.startsWith("Err")) { From 2fb3294ce141caf7152dbe04eaebebaca149aa81 Mon Sep 17 00:00:00 2001 From: Terry Gauchat Date: Mon, 27 Mar 2017 16:16:57 -0700 Subject: [PATCH 18/32] To Bose Soundtouch DTHs, added Capability "Sensor" & Capability "Actuator" (#1800) * To Bose Soundtouch DTH, added Capability "Sensor" & Capability "Actuator" per http://docs.smartthings.com/en/latest/device-type-developers-guide/overview.html?highlight=sensor%20actuator#actuator-and-sensor. * Replaced Tabs with Spaces for capability Sensor / Actuator lines per request of @WorkingMonk. --- .../smartthings/bose-soundtouch.src/bose-soundtouch.groovy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devicetypes/smartthings/bose-soundtouch.src/bose-soundtouch.groovy b/devicetypes/smartthings/bose-soundtouch.src/bose-soundtouch.groovy index 5aafc08..ff6a8ee 100644 --- a/devicetypes/smartthings/bose-soundtouch.src/bose-soundtouch.groovy +++ b/devicetypes/smartthings/bose-soundtouch.src/bose-soundtouch.groovy @@ -28,6 +28,8 @@ metadata { capability "Refresh" capability "Music Player" capability "Health Check" + capability "Sensor" + capability "Actuator" /** * Define all commands, ie, if you have a custom action not From 10c1d6f7153f8f6d796373af2f760284bf8270dd Mon Sep 17 00:00:00 2001 From: "piyush.c" Date: Tue, 28 Mar 2017 22:06:51 +0530 Subject: [PATCH 19/32] [CHF-560] Health Check Smartsense Moisture --- .../smartsense-moisture.src/.st-ignore | 2 ++ .../smartsense-moisture.src/README.md | 36 +++++++++++++++++++ .../smartsense-moisture.groovy | 7 ++++ 3 files changed, 45 insertions(+) create mode 100644 devicetypes/smartthings/smartsense-moisture.src/.st-ignore create mode 100644 devicetypes/smartthings/smartsense-moisture.src/README.md diff --git a/devicetypes/smartthings/smartsense-moisture.src/.st-ignore b/devicetypes/smartthings/smartsense-moisture.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/smartsense-moisture.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/smartsense-moisture.src/README.md b/devicetypes/smartthings/smartsense-moisture.src/README.md new file mode 100644 index 0000000..35f05aa --- /dev/null +++ b/devicetypes/smartthings/smartsense-moisture.src/README.md @@ -0,0 +1,36 @@ +# Smartsense Moisture + +Cloud Execution + +Works with: + +* [FortrezZ Moisture Sensor](https://www.smartthings.com/works-with-smartthings/fortrezz/fortrezz-moisture-sensor) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Water Sensor** - can detect presence of water (dry or wet) +* **Sensor** - detects sensor events +* **Battery** - defines device uses a battery +* **Temperature Measurement** - represents capability to measure temperature +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Smartsense Moisture is a Z-wave sleepy device type and checks in every 4 hours. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*4*60 + 2)mins = 482 mins. + +* __482min__ checkInterval + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the sensor is out of range. +Pairing needs to be tried again by placing the sensor closer to the hub. +Instructions related to pairing, resetting and removing the different motion sensors from SmartThings can be found in the following links +for the different models: +* [FortrezZ Moisture Sensor Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/200930740-FortrezZ-Moisture-Sensor) diff --git a/devicetypes/smartthings/smartsense-moisture.src/smartsense-moisture.groovy b/devicetypes/smartthings/smartsense-moisture.src/smartsense-moisture.groovy index ebd5888..e2d78f4 100644 --- a/devicetypes/smartthings/smartsense-moisture.src/smartsense-moisture.groovy +++ b/devicetypes/smartthings/smartsense-moisture.src/smartsense-moisture.groovy @@ -17,9 +17,11 @@ metadata { capability "Sensor" capability "Battery" capability "Temperature Measurement" + capability "Health Check" fingerprint deviceId: "0x2001", inClusters: "0x30,0x9C,0x9D,0x85,0x80,0x72,0x31,0x84,0x86" fingerprint deviceId: "0x2101", inClusters: "0x71,0x70,0x85,0x80,0x72,0x31,0x84,0x86" + fingerprint mfr:"0084", prod:"0063", model:"010C", deviceJoinName: "FortrezZ Moisture Sensor" } simulator { @@ -89,6 +91,11 @@ def parse(String description) { return result } +def updated() { + // Device-Watch simply pings if no device events received for 482min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 4 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) +} + def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd) { [descriptionText: "${device.displayName} woke up", isStateChange: false] From 44facec5dfa8a3c3ebe102e9078ca54e881f416c Mon Sep 17 00:00:00 2001 From: Vinay Rao Date: Tue, 28 Mar 2017 14:13:37 -0700 Subject: [PATCH 20/32] Revert "[CHF-577] Added Health Check Implementation for Spruce Controller." --- .../spruce-controller.src/.st-ignore | 2 - .../spruce-controller.src/README.md | 37 ------------------- .../spruce-controller.groovy | 29 ++++++--------- 3 files changed, 12 insertions(+), 56 deletions(-) delete mode 100644 devicetypes/plaidsystems/spruce-controller.src/.st-ignore delete mode 100644 devicetypes/plaidsystems/spruce-controller.src/README.md diff --git a/devicetypes/plaidsystems/spruce-controller.src/.st-ignore b/devicetypes/plaidsystems/spruce-controller.src/.st-ignore deleted file mode 100644 index f78b46e..0000000 --- a/devicetypes/plaidsystems/spruce-controller.src/.st-ignore +++ /dev/null @@ -1,2 +0,0 @@ -.st-ignore -README.md diff --git a/devicetypes/plaidsystems/spruce-controller.src/README.md b/devicetypes/plaidsystems/spruce-controller.src/README.md deleted file mode 100644 index 1ace86e..0000000 --- a/devicetypes/plaidsystems/spruce-controller.src/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Spruce Controller - -Cloud Execution - -Works with: - -* [Spruce Irrigation Controller](https://www.smartthings.com/works-with-smartthings/spruce/spruce-irrigation-controller) - -## Table of contents - -* [Capabilities](#capabilities) -* [Health](#device-health) -* [Troubleshooting](#troubleshooting) - -## Capabilities - -* **Switch** - can detect state (possible values: on/off) -* **Configuration** - _configure()_ command called when device is installed or device preferences updated -* **Refresh** - _refresh()_ command for status updates -* **Actuator** - represents that a Device has commands -* **Valve** - allows for the control of a valve device -* **Health Check** - indicates ability to get device health notifications - -## Device Health - -Spruce Controller with reporting interval of 10 mins. -SmartThings platform will ping the device after `checkInterval` seconds of inactivity in last attempt to reach the device before marking it `OFFLINE` - -* __22min__ checkInterval - - -## Troubleshooting - -If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. -Pairing needs to be tried again by placing the device closer to the hub. -Other troubleshooting tips are listed as follows: -* [Spruce Irrigation Controller Troubleshooting:](https://support.smartthings.com/hc/en-us/articles/208053773-Spruce-Irrigation-Controller-Sensor) diff --git a/devicetypes/plaidsystems/spruce-controller.src/spruce-controller.groovy b/devicetypes/plaidsystems/spruce-controller.src/spruce-controller.groovy index bdde1b1..baf2f1a 100644 --- a/devicetypes/plaidsystems/spruce-controller.src/spruce-controller.groovy +++ b/devicetypes/plaidsystems/spruce-controller.src/spruce-controller.groovy @@ -26,8 +26,7 @@ metadata { capability "Configuration" capability "Refresh" capability "Actuator" - capability "Valve" - capability "Health Check" + capability "Valve" attribute "switch", "string" attribute "switch1", "string" @@ -97,7 +96,7 @@ metadata { command "notify" command "updated" - fingerprint endpointId: "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18", profileId: "0104", deviceId: "0002", deviceVersion: "00", inClusters: "0000,0003,0004,0005,0006,000F", outClusters: "0003, 0019", manufacturer: "PLAID SYSTEMS", model: "PS-SPRZ16-01", deviceJoinName: "Spruce Irrigation Controller" + fingerprint endpointId: "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18", profileId: "0104", deviceId: "0002", deviceVersion: "00", inClusters: "0000,0003,0004,0005,0006,000F", outClusters: "0003, 0019", manufacturer: "PLAID SYSTEMS", model: "PS-SPRZ16-01" } @@ -249,8 +248,8 @@ def parse(String description) { log.debug "Alarm" map = getAlarm(descMap) } - } - + } + if (map) { result = createEvent(map) } @@ -367,14 +366,14 @@ def writeTime(wEP, runTime){ //set reporting and binding def configure() { - // Device-Watch allows 2 check-in misses from device (plus 2 mins lag time) - sendEvent(name: "checkInterval", value: 2 * 10 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID]) + String zigbeeId = swapEndianHex(device.hub.zigbeeId) log.debug "Confuguring Reporting and Bindings ${device.deviceNetworkId} ${device.zigbeeId}" sendEvent(name: 'configuration',value: 100, descriptionText: "Configuration initialized") def configCmds = [ //program on/off + "zdo bind 0x${device.deviceNetworkId} 1 1 6 {${device.zigbeeId}} {}", "delay 1000", "zdo bind 0x${device.deviceNetworkId} 1 1 0x09 {${device.zigbeeId}} {}", "delay 1000", "zdo bind 0x${device.deviceNetworkId} 1 1 0x0F {${device.zigbeeId}} {}", "delay 1000", //zones 1-8 @@ -397,7 +396,10 @@ def configure() { "zdo bind 0x${device.deviceNetworkId} 17 1 0x0F {${device.zigbeeId}} {}", "delay 1000", //rain sensor "zdo bind 0x${device.deviceNetworkId} 18 1 0x0F {${device.zigbeeId}} {}", - + + "zcl global send-me-a-report 6 0 0x10 1 0 {01}", "delay 500", + "send 0x${device.deviceNetworkId} 1 1", "delay 500", + "zcl global send-me-a-report 0x0F 0x55 0x10 1 0 {01}", "delay 500", "send 0x${device.deviceNetworkId} 1 1", "delay 500", @@ -456,7 +458,7 @@ def configure() { "zcl global send-me-a-report 0x09 0x00 0x21 1 0 {00}", "delay 500", "send 0x${device.deviceNetworkId} 1 1", "delay 500" ] - return configCmds + zigbee.onOffConfig() + rain() + manual() + return configCmds + rain() + manual() } @@ -481,14 +483,7 @@ private byte[] reverseArray(byte[] array) { i++; } return array -} - -/** - * PING is used by Device-Watch in attempt to reach the Device - * */ -def ping() { - refresh() -} +} def refresh() { From 7aa8be43225904caa32858b19314283842589874 Mon Sep 17 00:00:00 2001 From: marstorp Date: Tue, 28 Mar 2017 16:14:49 -0700 Subject: [PATCH 21/32] ICP-448 Thermostat resource works weirdly. Mapping between ST and SC fails at times due to improper implementation of capability attributes. Some violates the attribute types, others are not initialized to a valid value, most due to not having one. However, mapping requires right type and values. This PR fixes Ecobee thermostats attributes. --- .../ecobee-thermostat.groovy | 60 +++++++++++++------ 1 file changed, 41 insertions(+), 19 deletions(-) diff --git a/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy b/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy index 0f281a2..3926473 100644 --- a/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy +++ b/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy @@ -32,7 +32,7 @@ metadata { command "switchMode" command "switchFanMode" - attribute "thermostatSetpoint", "number" + attribute "displayThermostatSetpoint", "string" // Added to be able to show "Auto"/"Off" keeping attribute thermostatSetpoint a number attribute "thermostatStatus", "string" attribute "maxHeatingSetpoint", "number" attribute "minHeatingSetpoint", "number" @@ -70,7 +70,7 @@ metadata { state "heat", action:"switchMode", nextState: "updating", icon: "st.thermostat.heat" state "cool", action:"switchMode", nextState: "updating", icon: "st.thermostat.cool" state "auto", action:"switchMode", nextState: "updating", icon: "st.thermostat.auto" - state "auxHeatOnly", action:"switchMode", icon: "st.thermostat.emergency-heat" + state "emergency heat", label:"auxHeatOnly", action:"switchMode", icon: "st.thermostat.emergency-heat" // emergency heat = auxHeatOnly state "updating", label:"Working", icon: "st.secondary.secondary" } standardTile("fanMode", "device.thermostatFanMode", inactiveLabel: false, decoration: "flat") { @@ -81,8 +81,8 @@ metadata { standardTile("upButtonControl", "device.thermostatSetpoint", inactiveLabel: false, decoration: "flat") { state "setpoint", action:"raiseSetpoint", icon:"st.thermostat.thermostat-up" } - valueTile("thermostatSetpoint", "device.thermostatSetpoint", width: 1, height: 1, decoration: "flat") { - state "thermostatSetpoint", label:'${currentValue}' + valueTile("displayThermostatSetpoint", "device.displayThermostatSetpoint", width: 1, height: 1, decoration: "flat") { + state "displayThermostatSetpoint", label:'${currentValue}' } valueTile("currentStatus", "device.thermostatStatus", height: 1, width: 2, decoration: "flat") { state "thermostatStatus", label:'${currentValue}', backgroundColor:"#ffffff" @@ -113,7 +113,7 @@ metadata { state "humidity", label:'${currentValue}%' } main "temperature" - details(["temperature", "upButtonControl", "thermostatSetpoint", "currentStatus", "downButtonControl", "mode", "fanMode","humidity", "resumeProgram", "refresh"]) + details(["temperature", "upButtonControl", "displayThermostatSetpoint", "currentStatus", "downButtonControl", "mode", "fanMode","humidity", "resumeProgram", "refresh"]) } preferences { @@ -452,10 +452,10 @@ def emergencyHeat() { } def auxHeatOnly() { - log.debug "auxHeatOnly" + log.debug "auxHeatOnly = emergency heat" def deviceId = device.deviceNetworkId.split(/\./).last() if (parent.setMode ("auxHeatOnly", deviceId)) - generateModeEvent("auxHeatOnly") + generateModeEvent("emergency heat") // emergency heat = auxHeatOnly else { log.debug "Error setting new mode." def currentMode = device.currentState("thermostatMode")?.value @@ -574,17 +574,23 @@ def generateSetpointEvent() { sendEvent("name":"heatingSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale) sendEvent("name":"coolingSetpoint", "value":coolingSetpoint, "unit":location.temperatureScale) + def averageSetpoint = roundC((heatingSetpoint + coolingSetpoint) / 2) if (mode == "heat") { sendEvent("name":"thermostatSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale) + sendEvent("name":"displayThermostatSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale, displayed: false) } else if (mode == "cool") { sendEvent("name":"thermostatSetpoint", "value":coolingSetpoint, "unit":location.temperatureScale) + sendEvent("name":"displayThermostatSetpoint", "value":coolingSetpoint, "unit":location.temperatureScale, displayed: false) } else if (mode == "auto") { - sendEvent("name":"thermostatSetpoint", "value":"Auto") + sendEvent("name":"thermostatSetpoint", "value":averageSetpoint, "unit":location.temperatureScale) + sendEvent("name":"displayThermostatSetpoint", "value":"Auto", displayed: false) } else if (mode == "off") { - sendEvent("name":"thermostatSetpoint", "value":"Off") - } else if (mode == "auxHeatOnly") { + sendEvent("name":"thermostatSetpoint", "value":averageSetpoint, "unit":location.temperatureScale) + sendEvent("name":"displayThermostatSetpoint", "value":"Off", displayed: false) + } else if (mode == "emergency heat") { // emergency heat = auxHeatOnly sendEvent("name":"thermostatSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale) + sendEvent("name":"displayThermostatSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale, displayed: false) } } @@ -621,13 +627,14 @@ void raiseSetpoint() { targetvalue = thermostatSetpoint ? thermostatSetpoint : 0 targetvalue = location.temperatureScale == "F"? targetvalue + 1 : targetvalue + 0.5 - if ((mode == "heat" || mode == "auxHeatOnly") && targetvalue > maxHeatingSetpoint) { + if ((mode == "heat" || mode == "emergency heat") && targetvalue > maxHeatingSetpoint) { // emergency heat = auxHeatOnly targetvalue = maxHeatingSetpoint } else if (mode == "cool" && targetvalue > maxCoolingSetpoint) { targetvalue = maxCoolingSetpoint } sendEvent("name":"thermostatSetpoint", "value":targetvalue, "unit":location.temperatureScale, displayed: false) + sendEvent("name":"displayThermostatSetpoint", "value":targetvalue, "unit":location.temperatureScale, displayed: false) log.info "In mode $mode raiseSetpoint() to $targetvalue" runIn(3, "alterSetpoint", [data: [value:targetvalue], overwrite: true]) //when user click button this runIn will be overwrite @@ -666,13 +673,14 @@ void lowerSetpoint() { targetvalue = thermostatSetpoint ? thermostatSetpoint : 0 targetvalue = location.temperatureScale == "F"? targetvalue - 1 : targetvalue - 0.5 - if ((mode == "heat" || mode == "auxHeatOnly") && targetvalue < minHeatingSetpoint) { + if ((mode == "heat" || mode == "emergency heat") && targetvalue < minHeatingSetpoint) { // emergency heat = auxHeatOnly targetvalue = minHeatingSetpoint } else if (mode == "cool" && targetvalue < minCoolingSetpoint) { targetvalue = minCoolingSetpoint } sendEvent("name":"thermostatSetpoint", "value":targetvalue, "unit":location.temperatureScale, displayed: false) + sendEvent("name":"displayThermostatSetpoint", "value":targetvalue, "unit":location.temperatureScale, displayed: false) log.info "In mode $mode lowerSetpoint() to $targetvalue" runIn(3, "alterSetpoint", [data: [value:targetvalue], overwrite: true]) //when user click button this runIn will be overwrite @@ -706,7 +714,7 @@ void alterSetpoint(temp) { } //step1: check thermostatMode, enforce limits before sending request to cloud - if (mode == "heat" || mode == "auxHeatOnly"){ + if (mode == "heat" || mode == "emergency heat"){ // emergency heat = auxHeatOnly if (temp.value > coolingSetpoint){ targetHeatingSetpoint = temp.value targetCoolingSetpoint = temp.value @@ -735,15 +743,18 @@ void alterSetpoint(temp) { if (parent.setHold(heatingValue, coolingValue, deviceId, sendHoldType)) { sendEvent("name": "thermostatSetpoint", "value": temp.value, displayed: false) + sendEvent("name": "displayThermostatSetpoint", "value": temp.value, displayed: false) sendEvent("name": "heatingSetpoint", "value": targetHeatingSetpoint, "unit": location.temperatureScale) sendEvent("name": "coolingSetpoint", "value": targetCoolingSetpoint, "unit": location.temperatureScale) log.debug "alterSetpoint in mode $mode succeed change setpoint to= ${temp.value}" } else { log.error "Error alterSetpoint()" - if (mode == "heat" || mode == "auxHeatOnly"){ + if (mode == "heat" || mode == "emergency heat"){ // emergency heat = auxHeatOnly sendEvent("name": "thermostatSetpoint", "value": heatingSetpoint.toString(), displayed: false) + sendEvent("name": "displayThermostatSetpoint", "value": heatingSetpoint.toString(), displayed: false) } else if (mode == "cool") { sendEvent("name": "thermostatSetpoint", "value": coolingSetpoint.toString(), displayed: false) + sendEvent("name": "displayThermostatSetpoint", "value": heatingSetpoint.toString(), displayed: false) } } @@ -759,6 +770,7 @@ def generateStatusEvent() { def coolingSetpoint = device.currentValue("coolingSetpoint") def temperature = device.currentValue("temperature") def statusText + def operatingState = "idle" log.debug "Generate Status Event for Mode = ${mode}" log.debug "Temperature = ${temperature}" @@ -767,20 +779,29 @@ def generateStatusEvent() { log.debug "HVAC Mode = ${mode}" if (mode == "heat") { - if (temperature >= heatingSetpoint) + if (temperature >= heatingSetpoint) { statusText = "Right Now: Idle" - else + } else { statusText = "Heating to ${heatingSetpoint} ${location.temperatureScale}" + operatingState = "heating" + } } else if (mode == "cool") { - if (temperature <= coolingSetpoint) + if (temperature <= coolingSetpoint) { statusText = "Right Now: Idle" - else + } else { statusText = "Cooling to ${coolingSetpoint} ${location.temperatureScale}" + operatingState = "cooling" + } } else if (mode == "auto") { statusText = "Right Now: Auto" + if (temperature < heatingSetpoint) { + operatingState = "heating" + } else if (temperature > coolingSetpoint) { + operatingState = "cooling" + } } else if (mode == "off") { statusText = "Right Now: Off" - } else if (mode == "auxHeatOnly") { + } else if (mode == "emergency heat") { // emergency heat = auxHeatOnly statusText = "Emergency Heat" } else { statusText = "?" @@ -788,6 +809,7 @@ def generateStatusEvent() { log.debug "Generate Status Event = ${statusText}" sendEvent("name":"thermostatStatus", "value":statusText, "description":statusText, displayed: true) + sendEvent("name":"thermostatOperatingState", "value":operatingState, "description":operatingState, displayed: false) } def generateActivityFeedsEvent(notificationMessage) { From ed40ca7017da038c6dbcb97a05d16cdb62af350b Mon Sep 17 00:00:00 2001 From: jackchi Date: Tue, 28 Mar 2017 23:34:38 -0700 Subject: [PATCH 22/32] [DVCSMP-2451] Fix Fibaro-flood-sensor-zw5 dry/wet state --- .../fibaro-flood-sensor-zw5.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/devicetypes/fibargroup/fibaro-flood-sensor-zw5.src/fibaro-flood-sensor-zw5.groovy b/devicetypes/fibargroup/fibaro-flood-sensor-zw5.src/fibaro-flood-sensor-zw5.groovy index c9c5a30..5e66488 100644 --- a/devicetypes/fibargroup/fibaro-flood-sensor-zw5.src/fibaro-flood-sensor-zw5.groovy +++ b/devicetypes/fibargroup/fibaro-flood-sensor-zw5.src/fibaro-flood-sensor-zw5.groovy @@ -34,13 +34,13 @@ metadata { tiles(scale: 2) { multiAttributeTile(name:"FGFS", type:"lighting", width:6, height:4) {//with generic type secondary control text is not displayed in Android app tileAttribute("device.water", key:"PRIMARY_CONTROL") { - attributeState("dry", icon:"st.alarm.water.dry", backgroundColor:"#00a0dc") - attributeState("wet", icon:"st.alarm.water.wet", backgroundColor:"#e86d13") + attributeState("dry", icon:"st.alarm.water.dry", backgroundColor:"#ffffff") + attributeState("wet", icon:"st.alarm.water.wet", backgroundColor:"#00a0dc") } tileAttribute("device.tamper", key:"SECONDARY_CONTROL") { - attributeState("active", label:'tamper active', backgroundColor:"#00a0dc") - attributeState("inactive", label:'tamper inactive', backgroundColor:"#cccccc") + attributeState("active", label:'tamper active', backgroundColor:"#cccccc") + attributeState("inactive", label:'tamper inactive', backgroundColor:"#00A0DC") } } From ac4c3532876adef61141cac5fd0a88c4a85d4acb Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Wed, 29 Mar 2017 10:43:02 -0700 Subject: [PATCH 23/32] Added health-check for Everspring Flood Sensor --- .../everspring-flood-sensor.src/.st-ignore | 2 + .../everspring-flood-sensor.src/README.md | 40 +++++++++++++++++++ .../everspring-flood-sensor.groovy | 3 ++ 3 files changed, 45 insertions(+) create mode 100644 devicetypes/smartthings/everspring-flood-sensor.src/.st-ignore create mode 100644 devicetypes/smartthings/everspring-flood-sensor.src/README.md diff --git a/devicetypes/smartthings/everspring-flood-sensor.src/.st-ignore b/devicetypes/smartthings/everspring-flood-sensor.src/.st-ignore new file mode 100644 index 0000000..71af75c --- /dev/null +++ b/devicetypes/smartthings/everspring-flood-sensor.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md \ No newline at end of file diff --git a/devicetypes/smartthings/everspring-flood-sensor.src/README.md b/devicetypes/smartthings/everspring-flood-sensor.src/README.md new file mode 100644 index 0000000..b8e5bde --- /dev/null +++ b/devicetypes/smartthings/everspring-flood-sensor.src/README.md @@ -0,0 +1,40 @@ +# Everspring Flood Sensor + +Cloud Execution + +Works with: + +* [Everspring Water Detector](https://www.smartthings.com/works-with-smartthings/sensors/everspring-water-detector) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery-specification) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Water Sensor** - can detect presence of water (dry or wet) +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Sensor** - detects sensor events +* **Battery** - defines device uses a battery +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Everspring Water Detector is a Z-wave sleepy device and wakes up every 4 hours. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*4*60 + 2)mins = 482 mins. + +* __482min__ checkInterval + +## Battery Specification + +Three AA 1.5V batteries are required. + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Instructions related to pairing, resetting and removing the device from SmartThings can be found in the following link: +* [Everspring Water Detector Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/202088304-Everspring-Water-Detector) \ No newline at end of file diff --git a/devicetypes/smartthings/everspring-flood-sensor.src/everspring-flood-sensor.groovy b/devicetypes/smartthings/everspring-flood-sensor.src/everspring-flood-sensor.groovy index 3c72f29..29e1bf5 100644 --- a/devicetypes/smartthings/everspring-flood-sensor.src/everspring-flood-sensor.groovy +++ b/devicetypes/smartthings/everspring-flood-sensor.src/everspring-flood-sensor.groovy @@ -17,6 +17,7 @@ metadata { capability "Configuration" capability "Sensor" capability "Battery" + capability "Health Check" fingerprint deviceId: "0xA102", inClusters: "0x86,0x72,0x85,0x84,0x80,0x70,0x9C,0x20,0x71" } @@ -138,6 +139,8 @@ def zwaveEvent(physicalgraph.zwave.Command cmd) def configure() { + // Device wakes up every 4 hours, this interval allows us to miss one wakeup notification before marking offline + sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) if (!device.currentState("battery")) { sendEvent(name: "battery", value:100, unit:"%", descriptionText:"(Default battery event)", displayed:false) } From f26b9ce6b2304312a44bcbfd0325d643ddf0a5f5 Mon Sep 17 00:00:00 2001 From: Parijat Das Date: Wed, 29 Mar 2017 14:41:43 -0700 Subject: [PATCH 24/32] Added health-check for Fibaro Door Window Sensor ZW5 --- .../.st-ignore | 2 + .../README.md | 41 +++++++++++++++++++ .../fibaro-door-window-sensor-zw5.groovy | 5 ++- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/.st-ignore create mode 100644 devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/README.md diff --git a/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/.st-ignore b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/.st-ignore new file mode 100644 index 0000000..71af75c --- /dev/null +++ b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md \ No newline at end of file diff --git a/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/README.md b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/README.md new file mode 100644 index 0000000..aaaf3d2 --- /dev/null +++ b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/README.md @@ -0,0 +1,41 @@ +# Fibaro Door Window Sensor ZW5 + +Cloud Execution + +Works with: + +* [Fibaro Door/Window Sensor ZW5](https://www.smartthings.com/works-with-smartthings/sensors/fibaro-doorwindow-sensor) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery-specification) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Battery** - defines device uses a battery +* **Contact Sensor** - can detect contact (possible values: open,closed) +* **Sensor** - detects sensor events +* **Tamper Alert** - detects tampers +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Fibaro Door/Window Sensor ZW5 is a Z-wave sleepy device and wakes up every 4 hours. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*4*60 + 2)mins = 482 mins. + +* __482min__ checkInterval + +## Battery Specification + +One 1/2AA 3.6V battery is required. + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Instructions related to pairing, resetting and removing the device from SmartThings can be found in the following link: +* [Fibaro Door/Window Sensor ZW5 Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/204075194-Fibaro-Door-Window-Sensor) \ No newline at end of file diff --git a/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/fibaro-door-window-sensor-zw5.groovy b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/fibaro-door-window-sensor-zw5.groovy index b05d959..95adeb5 100644 --- a/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/fibaro-door-window-sensor-zw5.groovy +++ b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/fibaro-door-window-sensor-zw5.groovy @@ -20,6 +20,7 @@ metadata { capability "Sensor" capability "Configuration" capability "Tamper Alert" + capability "Health Check" fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x85, 0x59, 0x22, 0x20, 0x80, 0x70, 0x56, 0x5A, 0x7A, 0x72, 0x8E, 0x71, 0x73, 0x98, 0x2B, 0x9C, 0x30, 0x86, 0x84", outClusters: "" } @@ -199,7 +200,9 @@ def zwaveEvent(physicalgraph.zwave.commands.deviceresetlocallyv1.DeviceResetLoca def configure() { log.debug "Executing 'configure'" - + // Device wakes up every 4 hours, this interval allows us to miss one wakeup notification before marking offline + sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) + def cmds = [] cmds += zwave.wakeUpV2.wakeUpIntervalSet(seconds:21600, nodeid: zwaveHubNodeId)//FGK's default wake up interval From e985f38cf4f12f39d2c8fe762b49e4a1265e97e7 Mon Sep 17 00:00:00 2001 From: marstorp Date: Wed, 29 Mar 2017 17:45:01 -0700 Subject: [PATCH 25/32] ICP-493 Thermostat Capabilities Payload Issues thermostatFanMode reports "fanAuto", but "fanAuto" is not listed in the supported modes Changing capability attributes to follow specified values. Also adding icons/removing configure tile to realigning with other thermostats, adding poll of device data in configure() to allow for faster initialization of device data. --- .../zwave-thermostat.groovy | 73 +++++++++++-------- 1 file changed, 41 insertions(+), 32 deletions(-) diff --git a/devicetypes/smartthings/zwave-thermostat.src/zwave-thermostat.groovy b/devicetypes/smartthings/zwave-thermostat.src/zwave-thermostat.groovy index 8d9f117..69c6c20 100644 --- a/devicetypes/smartthings/zwave-thermostat.src/zwave-thermostat.groovy +++ b/devicetypes/smartthings/zwave-thermostat.src/zwave-thermostat.groovy @@ -42,9 +42,9 @@ metadata { status "auto" : "command: 4003, payload: 03" status "emergencyHeat" : "command: 4003, payload: 04" - status "fanAuto" : "command: 4403, payload: 00" - status "fanOn" : "command: 4403, payload: 01" - status "fanCirculate" : "command: 4403, payload: 06" + status "auto" : "command: 4403, payload: 00" // "fanAuto" + status "on" : "command: 4403, payload: 01" // "fanOn" + status "circulate" : "command: 4403, payload: 06" // "fanCirculate status "heat 60" : "command: 4303, payload: 01 09 3C" status "heat 68" : "command: 4303, payload: 01 09 44" @@ -74,8 +74,9 @@ metadata { } tiles { - valueTile("temperature", "device.temperature", width: 2, height: 2) { - state("temperature", label:'${currentValue}°', + // Using standardTile instead of valueTile as it renders the icon better + standardTile("temperature", "device.temperature", width: 2, height: 2) { + state("temperature", label:'${currentValue}°', icon: "st.thermostat.ac.air-conditioning", backgroundColors:[ [value: 31, color: "#153591"], [value: 44, color: "#1e9cbb"], @@ -88,19 +89,20 @@ metadata { ) } standardTile("mode", "device.thermostatMode", inactiveLabel: false, decoration: "flat") { - state "off", label:'${name}', action:"switchMode", nextState:"to_heat" - state "heat", label:'${name}', action:"switchMode", nextState:"to_cool" - state "cool", label:'${name}', action:"switchMode", nextState:"..." - state "auto", label:'${name}', action:"switchMode", nextState:"..." - state "emergency heat", label:'${name}', action:"switchMode", nextState:"..." - state "to_heat", label: "heat", action:"switchMode", nextState:"to_cool" - state "to_cool", label: "cool", action:"switchMode", nextState:"..." + state "off", action:"switchMode", nextState:"to_heat", icon: "st.thermostat.heating-cooling-off" + state "heat", action:"switchMode", nextState:"to_cool", icon: "st.thermostat.heat" + state "cool", action:"switchMode", nextState:"...", icon: "st.thermostat.cool" + state "auto", action:"switchMode", nextState:"...", icon: "st.thermostat.auto" + state "emergency heat", action:"switchMode", nextState:"...", icon: "st.thermostat.emergency-heat" + state "to_heat", action:"switchMode", nextState:"to_cool", icon: "st.thermostat.heat" + state "to_cool", action:"switchMode", nextState:"...", icon: "st.thermostat.cool" state "...", label: "...", action:"off", nextState:"off" } standardTile("fanMode", "device.thermostatFanMode", inactiveLabel: false, decoration: "flat") { - state "fanAuto", label:'${name}', action:"switchFanMode" - state "fanOn", label:'${name}', action:"switchFanMode" - state "fanCirculate", label:'${name}', action:"switchFanMode" + state "auto", action:"switchFanMode", nextState:"...", icon: "st.thermostat.fan-auto" // "fanAuto" + state "on", action:"switchFanMode", nextState:"...", icon: "st.thermostat.fan-on" // "fanOn" + state "circulate", action:"switchFanMode", nextState:"...", icon: "st.thermostat.fan-circulate" // "fanCirculate" + state "...", label: "...", nextState:"..." } controlTile("heatSliderControl", "device.heatingSetpoint", "slider", height: 1, width: 2, inactiveLabel: false) { state "setHeatingSetpoint", action:"quickSetHeat", backgroundColor:"#d04e00" @@ -117,11 +119,8 @@ metadata { standardTile("refresh", "device.thermostatMode", inactiveLabel: false, decoration: "flat") { state "default", action:"polling.poll", icon:"st.secondary.refresh" } - standardTile("configure", "device.configure", inactiveLabel: false, decoration: "flat") { - state "configure", label:'', action:"configuration.configure", icon:"st.secondary.configure" - } main "temperature" - details(["temperature", "mode", "fanMode", "heatSliderControl", "heatingSetpoint", "coolSliderControl", "coolingSetpoint", "refresh", "configure"]) + details(["temperature", "mode", "fanMode", "heatSliderControl", "heatingSetpoint", "coolSliderControl", "coolingSetpoint", "refresh"]) } } @@ -286,13 +285,13 @@ def zwaveEvent(physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanMod def map = [:] switch (cmd.fanMode) { case physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanModeReport.FAN_MODE_AUTO_LOW: - map.value = "fanAuto" + map.value = "auto" // "fanAuto" break case physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanModeReport.FAN_MODE_LOW: - map.value = "fanOn" + map.value = "on" // "fanOn" break case physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanModeReport.FAN_MODE_CIRCULATION: - map.value = "fanCirculate" + map.value = "circulate" // "fanCirculate" break } map.name = "thermostatFanMode" @@ -309,15 +308,19 @@ def zwaveEvent(physicalgraph.zwave.commands.thermostatmodev2.ThermostatModeSuppo if(cmd.auto) { supportedModes += "auto " } state.supportedModes = supportedModes + // No events to be generated, return empty map + return [:] } def zwaveEvent(physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanModeSupportedReport cmd) { def supportedFanModes = "" - if(cmd.auto) { supportedFanModes += "fanAuto " } - if(cmd.low) { supportedFanModes += "fanOn " } - if(cmd.circulation) { supportedFanModes += "fanCirculate " } + if(cmd.auto) { supportedFanModes += "auto " } // "fanAuto " + if(cmd.low) { supportedFanModes += "on " } // "fanOn" + if(cmd.circulation) { supportedFanModes += "circulate " } // "fanCirculate" state.supportedFanModes = supportedFanModes + // No events to be generated, return empty map + return [:] } def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) { @@ -412,7 +415,13 @@ def configure() { delayBetween([ zwave.thermostatModeV2.thermostatModeSupportedGet().format(), zwave.thermostatFanModeV3.thermostatFanModeSupportedGet().format(), - zwave.associationV1.associationSet(groupingIdentifier:1, nodeId:[zwaveHubNodeId]).format() + zwave.associationV1.associationSet(groupingIdentifier:1, nodeId:[zwaveHubNodeId]).format(), + zwave.sensorMultilevelV3.sensorMultilevelGet().format(), // current temperature + zwave.thermostatSetpointV1.thermostatSetpointGet(setpointType: 1).format(), + zwave.thermostatSetpointV1.thermostatSetpointGet(setpointType: 2).format(), + zwave.thermostatModeV2.thermostatModeGet().format(), + zwave.thermostatFanModeV3.thermostatFanModeGet().format(), + zwave.thermostatOperatingStateV1.thermostatOperatingStateGet().format() ], 2300) } @@ -453,11 +462,11 @@ def switchToMode(nextMode) { def switchFanMode() { def currentMode = device.currentState("thermostatFanMode")?.value def lastTriedMode = state.lastTriedFanMode ?: currentMode ?: "off" - def supportedModes = getDataByName("supportedFanModes") ?: "fanAuto fanOn" - def modeOrder = ["fanAuto", "fanCirculate", "fanOn"] + def supportedModes = getDataByName("supportedFanModes") ?: "auto on" // "fanAuto fanOn" + def modeOrder = ["auto", "circulate", "on"] // "fanAuto", "fanCirculate", "fanOn" def next = { modeOrder[modeOrder.indexOf(it) + 1] ?: modeOrder[0] } def nextMode = next(lastTriedMode) - while (!supportedModes?.contains(nextMode) && nextMode != "fanAuto") { + while (!supportedModes?.contains(nextMode) && nextMode != "auto") { // "fanAuto" nextMode = next(nextMode) } switchToFanMode(nextMode) @@ -468,11 +477,11 @@ def switchToFanMode(nextMode) { if(supportedFanModes && !supportedFanModes.contains(nextMode)) log.warn "thermostat mode '$nextMode' is not supported" def returnCommand - if (nextMode == "fanAuto") { + if (nextMode == "auto") { // "fanAuto" returnCommand = fanAuto() - } else if (nextMode == "fanOn") { + } else if (nextMode == "on") { // "fanOn" returnCommand = fanOn() - } else if (nextMode == "fanCirculate") { + } else if (nextMode == "circulate") { // "fanCirculate" returnCommand = fanCirculate() } else { log.debug("no fan mode '$nextMode'") From fe887121d3fe04ecfad56316a91c92ef52cf8519 Mon Sep 17 00:00:00 2001 From: Jack Chi Date: Thu, 30 Mar 2017 15:49:28 -0700 Subject: [PATCH 26/32] [CHF-568] Remove Keen Smart Home Vent fingerprint (#1859) --- .../keen-home-smart-vent.src/keen-home-smart-vent.groovy | 1 - 1 file changed, 1 deletion(-) diff --git a/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy b/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy index 2b18b8f..78ab8b7 100644 --- a/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy +++ b/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy @@ -22,7 +22,6 @@ metadata { command "clearObstruction" fingerprint endpoint: "1", profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0006,0008,0020,0402,0403,0B05,FC01,FC02", outClusters: "0019" - fingerprint endpoint: "1", profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0006,0008,0020,0402,0403,0B05,FC01,FC02", outClusters: "0019", manufacturer: "Keen Home Inc", model: "SV01-410-DV-1.0", deviceJoinName: "Keen Home Smart Vent" } // simulator metadata From a112d4b00e50695b3e6cfce24d84d57ede15d760 Mon Sep 17 00:00:00 2001 From: Juan Pablo Risso Date: Fri, 31 Mar 2017 14:05:26 -0400 Subject: [PATCH 27/32] ICP-381 - Add ocfDeviceType to switch devices (#1856) --- .../smartthings/dimmer-switch.src/dimmer-switch.groovy | 2 +- .../wemo-light-switch.src/wemo-light-switch.groovy | 2 +- devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy | 2 +- .../smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy | 2 +- .../zwave-dimmer-switch-generic.groovy | 2 +- .../zwave-metering-dimmer.src/zwave-metering-dimmer.groovy | 2 +- .../zwave-metering-switch.src/zwave-metering-switch.groovy | 4 ++-- .../zwave-switch-generic.src/zwave-switch-generic.groovy | 2 +- .../zwave-switch-secure.src/zwave-switch-secure.groovy | 2 +- devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy b/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy index ef0fddd..892baf1 100644 --- a/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy +++ b/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Dimmer Switch", namespace: "smartthings", author: "SmartThings") { + definition (name: "Dimmer Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Switch Level" capability "Actuator" capability "Indicator" diff --git a/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy b/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy index b90a577..b5a4881 100644 --- a/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy +++ b/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy @@ -18,7 +18,7 @@ metadata { - definition (name: "Wemo Light Switch", namespace: "smartthings", author: "SmartThings") { + definition (name: "Wemo Light Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Actuator" capability "Switch" capability "Polling" diff --git a/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy b/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy index fcda9ec..27c735e 100644 --- a/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy +++ b/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy @@ -16,7 +16,7 @@ * Date: 2015-10-11 */ metadata { - definition (name: "Wemo Switch", namespace: "smartthings", author: "SmartThings") { + definition (name: "Wemo Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.smartplug") { capability "Actuator" capability "Switch" capability "Polling" diff --git a/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy b/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy index 55b22f2..68878df 100644 --- a/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy +++ b/devicetypes/smartthings/zigbee-dimmer.src/zigbee-dimmer.groovy @@ -13,7 +13,7 @@ */ metadata { - definition (name: "ZigBee Dimmer", namespace: "smartthings", author: "SmartThings") { + definition (name: "ZigBee Dimmer", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Actuator" capability "Configuration" capability "Refresh" diff --git a/devicetypes/smartthings/zwave-dimmer-switch-generic.src/zwave-dimmer-switch-generic.groovy b/devicetypes/smartthings/zwave-dimmer-switch-generic.src/zwave-dimmer-switch-generic.groovy index 7c9c575..bb94d36 100644 --- a/devicetypes/smartthings/zwave-dimmer-switch-generic.src/zwave-dimmer-switch-generic.groovy +++ b/devicetypes/smartthings/zwave-dimmer-switch-generic.src/zwave-dimmer-switch-generic.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Z-Wave Dimmer Switch Generic", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Dimmer Switch Generic", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Switch Level" capability "Actuator" capability "Health Check" diff --git a/devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy b/devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy index 4b2fba2..03664f3 100644 --- a/devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy +++ b/devicetypes/smartthings/zwave-metering-dimmer.src/zwave-metering-dimmer.groovy @@ -16,7 +16,7 @@ * */ metadata { - definition (name: "Z-Wave Metering Dimmer", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Metering Dimmer", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Switch" capability "Polling" capability "Power Meter" diff --git a/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy b/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy index 3655220..ff46978 100644 --- a/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy +++ b/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Z-Wave Metering Switch", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Metering Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Energy Meter" capability "Actuator" capability "Switch" @@ -86,7 +86,7 @@ def updated() { def parse(String description) { def result = null - if(description == "updated") return + if(description == "updated") return def cmd = zwave.parse(description, [0x20: 1, 0x32: 1, 0x72: 2]) if (cmd) { result = zwaveEvent(cmd) diff --git a/devicetypes/smartthings/zwave-switch-generic.src/zwave-switch-generic.groovy b/devicetypes/smartthings/zwave-switch-generic.src/zwave-switch-generic.groovy index ced18ce..e2f65d4 100644 --- a/devicetypes/smartthings/zwave-switch-generic.src/zwave-switch-generic.groovy +++ b/devicetypes/smartthings/zwave-switch-generic.src/zwave-switch-generic.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Z-Wave Switch Generic", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Switch Generic", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Actuator" capability "Health Check" capability "Switch" diff --git a/devicetypes/smartthings/zwave-switch-secure.src/zwave-switch-secure.groovy b/devicetypes/smartthings/zwave-switch-secure.src/zwave-switch-secure.groovy index a5a1dc1..c81d931 100644 --- a/devicetypes/smartthings/zwave-switch-secure.src/zwave-switch-secure.groovy +++ b/devicetypes/smartthings/zwave-switch-secure.src/zwave-switch-secure.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Z-Wave Switch Secure", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Switch Secure", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Switch" capability "Refresh" capability "Polling" diff --git a/devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy b/devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy index b7c7106..151a116 100644 --- a/devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy +++ b/devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Z-Wave Switch", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") { capability "Actuator" capability "Indicator" capability "Switch" From 4cc41d9d9b382df898bcd4a06ef6ccd7477a3bc6 Mon Sep 17 00:00:00 2001 From: marstorp Date: Mon, 3 Apr 2017 13:59:47 -0700 Subject: [PATCH 28/32] =?UTF-8?q?ICP-448=20Thermostat=20resource=20works?= =?UTF-8?q?=20weirdly.=20Fixing=20change=20of=20auxHeatOnly=20to=20emergen?= =?UTF-8?q?cy=20heat.=20Also=20adding=20main=20tile=20icon=20so=20Things?= =?UTF-8?q?=20view=20doesn=E2=80=99t=20show=20a=20grey=20blob?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ecobee-thermostat.src/ecobee-thermostat.groovy | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy b/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy index 3926473..b200e94 100644 --- a/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy +++ b/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy @@ -43,8 +43,8 @@ metadata { } tiles { - valueTile("temperature", "device.temperature", width: 2, height: 2) { - state("temperature", label:'${currentValue}°', unit:"F", + standardTile("temperature", "device.temperature", width: 2, height: 2, decoration: "flat") { + state("temperature", label:'${currentValue}°', unit:"F", icon: "st.thermostat.ac.air-conditioning", backgroundColors:[ // Celsius [value: 0, color: "#153591"], @@ -70,7 +70,7 @@ metadata { state "heat", action:"switchMode", nextState: "updating", icon: "st.thermostat.heat" state "cool", action:"switchMode", nextState: "updating", icon: "st.thermostat.cool" state "auto", action:"switchMode", nextState: "updating", icon: "st.thermostat.auto" - state "emergency heat", label:"auxHeatOnly", action:"switchMode", icon: "st.thermostat.emergency-heat" // emergency heat = auxHeatOnly + state "emergency heat", action:"switchMode", icon: "st.thermostat.emergency-heat" // emergency heat = auxHeatOnly state "updating", label:"Working", icon: "st.secondary.secondary" } standardTile("fanMode", "device.thermostatFanMode", inactiveLabel: false, decoration: "flat") { @@ -185,6 +185,11 @@ def generateEvent(Map results) { isChange = isStateChange(device, name, value.toString()) event['isStateChange'] = isChange event['displayed'] = false + } else if (name == "thermostatMode") { + def mode = value.toString() + mode = (mode == "auxHeatOnly") ? "emergency heat" : mode + isChange = isStateChange(device, name, mode) + event << [value: mode, isStateChange: isChange, displayed: isDisplayed] } else { isChange = isStateChange(device, name, value.toString()) isDisplayed = isChange From ba10869dd5e1752133ded044aedd55162561ce9d Mon Sep 17 00:00:00 2001 From: Vinay Rao Date: Mon, 3 Apr 2017 15:00:41 -0700 Subject: [PATCH 29/32] removing generation name from model name --- .../zwave-metering-switch.src/zwave-metering-switch.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy b/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy index ff46978..5f1d0c9 100644 --- a/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy +++ b/devicetypes/smartthings/zwave-metering-switch.src/zwave-metering-switch.groovy @@ -27,7 +27,7 @@ metadata { command "reset" fingerprint inClusters: "0x25,0x32" - fingerprint mfr:"0086", prod:"0003", model:"0012", deviceJoinName: "Aeon Labs Micro Smart Switch 2E" + fingerprint mfr:"0086", prod:"0003", model:"0012", deviceJoinName: "Aeon Labs Micro Smart Switch" } // simulator metadata From bdcaf175f0af833eb4b1f1f7a612d190472825a0 Mon Sep 17 00:00:00 2001 From: Bob Florian Date: Fri, 31 Mar 2017 14:47:10 -0700 Subject: [PATCH 30/32] Check for null device and send refresh() from configure() --- .../zooz-power-strip.groovy | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/devicetypes/smartthings/zooz-power-strip.src/zooz-power-strip.groovy b/devicetypes/smartthings/zooz-power-strip.src/zooz-power-strip.groovy index a6ee0ea..5647939 100644 --- a/devicetypes/smartthings/zooz-power-strip.src/zooz-power-strip.groovy +++ b/devicetypes/smartthings/zooz-power-strip.src/zooz-power-strip.groovy @@ -25,6 +25,7 @@ metadata { capability "Refresh" capability "Actuator" capability "Sensor" + capability "Configuration" fingerprint manufacturer: "015D", prod: "0651", model: "F51C", deviceJoinName: "Zooz ZEN 20 Power Strip" } @@ -65,6 +66,10 @@ def updated() { } } +def configure() { + refresh() +} + ////////////////////// // Event Generation // @@ -107,15 +112,17 @@ def zwaveBinaryEvent(cmd, endpoint) { def result = [] def children = childDevices def childDevice = children.find{it.deviceNetworkId.endsWith("$endpoint")} - childDevice.sendEvent(name: "switch", value: cmd.value ? "on" : "off") + if (childDevice) { + childDevice.sendEvent(name: "switch", value: cmd.value ? "on" : "off") - if (cmd.value) { - // One on and the strip is on - result << createEvent(name: "switch", value: "on") - } else { - // All off and the strip is off - if (! children.any { it.currentValue("switch") == "on" }) { - result << createEvent(name: "switch", value: "off") + if (cmd.value) { + // One on and the strip is on + result << createEvent(name: "switch", value: "on") + } else { + // All off and the strip is off + if (!children.any { it.currentValue("switch") == "on" }) { + result << createEvent(name: "switch", value: "off") + } } } result From d51ec9e518e1c8da01ddd1618f8920bb83614364 Mon Sep 17 00:00:00 2001 From: jackchi Date: Mon, 3 Apr 2017 16:47:15 -0700 Subject: [PATCH 31/32] [CHF-571] [CHF-568] Revert untested Health Check on Keen Home & EcoNet Vents --- .../keen-home-smart-vent.src/keen-home-smart-vent.groovy | 4 ++-- devicetypes/smartthings/econet-vent.src/econet-vent.groovy | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy b/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy index 78ab8b7..ee9e703 100644 --- a/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy +++ b/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy @@ -11,7 +11,7 @@ metadata { capability "Sensor" capability "Temperature Measurement" capability "Battery" - capability "Health Check" + // capability "Health Check" command "getLevel" command "getOnOff" @@ -476,7 +476,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 * 10 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID]) + // sendEvent(name: "checkInterval", value: 2 * 10 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID]) // get ZigBee ID by hidden tile because that's the only way we can do it setZigBeeIdTile() diff --git a/devicetypes/smartthings/econet-vent.src/econet-vent.groovy b/devicetypes/smartthings/econet-vent.src/econet-vent.groovy index f441beb..344f1b5 100644 --- a/devicetypes/smartthings/econet-vent.src/econet-vent.groovy +++ b/devicetypes/smartthings/econet-vent.src/econet-vent.groovy @@ -26,13 +26,13 @@ metadata { capability "Sensor" capability "Polling" capability "Configuration" - capability "Health Check" + // capability "Health Check" command "open" command "close" fingerprint deviceId: "0x1100", inClusters: "0x26,0x72,0x86,0x77,0x80,0x20" - fingerprint mfr:"0157", prod:"0100", model:"0100", deviceJoinName: "EcoNet Controls Z-Wave Vent" + // fingerprint mfr:"0157", prod:"0100", model:"0100", deviceJoinName: "EcoNet Controls Z-Wave Vent" } simulator { @@ -88,7 +88,7 @@ def parse(String description) { //send the command to stop polling def updated() { // Device-Watch simply pings if no device events received for 32min(checkInterval) - sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) + // sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) response("poll stop") } From a297e79b0e9e7cf0268451fb93d99204360d882b Mon Sep 17 00:00:00 2001 From: jackchi Date: Tue, 4 Apr 2017 10:23:04 -0700 Subject: [PATCH 32/32] Revert "Added health-check for Logitech Harmony Hub" This reverts commit cbd15ae9ccfae79e25e70b14b2918542379ed3de. --- .../logitech-harmony-hub-c2c.groovy | 15 --------------- .../logitech-harmony-connect.groovy | 4 ---- 2 files changed, 19 deletions(-) diff --git a/devicetypes/smartthings/logitech-harmony-hub-c2c.src/logitech-harmony-hub-c2c.groovy b/devicetypes/smartthings/logitech-harmony-hub-c2c.src/logitech-harmony-hub-c2c.groovy index e287e94..8395f80 100644 --- a/devicetypes/smartthings/logitech-harmony-hub-c2c.src/logitech-harmony-hub-c2c.groovy +++ b/devicetypes/smartthings/logitech-harmony-hub-c2c.src/logitech-harmony-hub-c2c.groovy @@ -7,7 +7,6 @@ metadata { definition (name: "Logitech Harmony Hub C2C", namespace: "smartthings", author: "SmartThings") { capability "Media Controller" capability "Refresh" - capability "Health Check" command "activityoff" command "alloff" @@ -39,16 +38,6 @@ metadata { } } -def installed() { - log.debug "installed()" - sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "cloud", scheme:"untracked"]), displayed: false) -} - -def updated() { - log.debug "updated()" - sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "cloud", scheme:"untracked"]), displayed: false) -} - def startActivity(String activityId) { log.debug "Executing 'Start Activity'" log.trace parent.activity("$device.deviceNetworkId-$activityId","start") @@ -69,10 +58,6 @@ def poll() { log.trace parent.poll() } -def ping() { - refresh() -} - def refresh() { log.debug "Executing 'Refresh'" log.trace parent.poll() diff --git a/smartapps/smartthings/logitech-harmony-connect.src/logitech-harmony-connect.groovy b/smartapps/smartthings/logitech-harmony-connect.src/logitech-harmony-connect.groovy index 72763ef..43c55fa 100644 --- a/smartapps/smartthings/logitech-harmony-connect.src/logitech-harmony-connect.groovy +++ b/smartapps/smartthings/logitech-harmony-connect.src/logitech-harmony-connect.groovy @@ -511,10 +511,6 @@ def pollResponse(response, data) { if (ResponseValues) { def map = [:] ResponseValues.hubs.each { - // Device-Watch relies on the Logitech Harmony Cloud to get the Device state. - def isAlive = it.value.status - def d = getChildDevice("harmony-${it.key}") - d?.sendEvent(name: "DeviceWatch-DeviceStatus", value: isAlive!=504? "online":"offline", displayed: false, isStateChange: true) if (it.value.message == "OK") { map["${it.key}"] = "${it.value.response.data.currentAvActivity},${it.value.response.data.activityStatus}" def hub = getChildDevice("harmony-${it.key}")