From c278e035f6eed29a22bec4892330199e400d1fc6 Mon Sep 17 00:00:00 2001 From: Dave Hastings Date: Thu, 15 Jun 2017 14:44:14 -0500 Subject: [PATCH 1/4] IOTEVENT-786 check for null/empty values before sending events --- .../fibaro-rgbw-controller.groovy | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/devicetypes/smartthings/fibaro-rgbw-controller.src/fibaro-rgbw-controller.groovy b/devicetypes/smartthings/fibaro-rgbw-controller.src/fibaro-rgbw-controller.groovy index 4385edc..4cec80f 100644 --- a/devicetypes/smartthings/fibaro-rgbw-controller.src/fibaro-rgbw-controller.groovy +++ b/devicetypes/smartthings/fibaro-rgbw-controller.src/fibaro-rgbw-controller.groovy @@ -300,15 +300,21 @@ def setColor(value) { value.hex = "#${hex(value.red)}${hex(value.green)}${hex(value.blue)}" } - sendEvent(name: "hue", value: value.hue, displayed: false) - sendEvent(name: "saturation", value: value.saturation, displayed: false) - sendEvent(name: "color", value: value.hex, displayed: false) - if (value.level) { - sendEvent(name: "level", value: value.level) - } - if (value.switch) { - sendEvent(name: "switch", value: value.switch) - } + if(value.hue) { + sendEvent(name: "hue", value: value.hue, displayed: false) + } + if(value.saturation) { + sendEvent(name: "saturation", value: value.saturation, displayed: false) + } + if(value.hex?.trim()) { + sendEvent(name: "color", value: value.hex, displayed: false) + } + if (value.level) { + sendEvent(name: "level", value: value.level) + } + if (value.switch?.trim()) { + sendEvent(name: "switch", value: value.switch) + } sendRGB(value.rh, value.gh, value.bh) } From 370b435874a1fa3b76541aa080f3fbb69813fefc Mon Sep 17 00:00:00 2001 From: "piyush.c" Date: Mon, 19 Jun 2017 18:02:29 +0530 Subject: [PATCH 2/4] [DHF-15] Health Check Aeon Minimote --- .../smartthings/aeon-minimote.src/.st-ignore | 2 ++ .../smartthings/aeon-minimote.src/README.md | 33 +++++++++++++++++++ .../aeon-minimote.src/aeon-minimote.groovy | 4 +++ 3 files changed, 39 insertions(+) create mode 100644 devicetypes/smartthings/aeon-minimote.src/.st-ignore create mode 100644 devicetypes/smartthings/aeon-minimote.src/README.md diff --git a/devicetypes/smartthings/aeon-minimote.src/.st-ignore b/devicetypes/smartthings/aeon-minimote.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/aeon-minimote.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/aeon-minimote.src/README.md b/devicetypes/smartthings/aeon-minimote.src/README.md new file mode 100644 index 0000000..b64e932 --- /dev/null +++ b/devicetypes/smartthings/aeon-minimote.src/README.md @@ -0,0 +1,33 @@ +# Aeon Minimote + +Cloud Execution + +Works with: + +* [Aeotec Minimote](http://aeotec.com/small-z-wave-remote-control) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Actuator** - represents device has commands +* **Button** - represents a device with one or more buttons +* **Holdable Button** - represents a device with one or more holdable buttons +* **Configuration** - allows for configuration of devices +* **Sensor** - detects sensor events +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Aeon Minimote is a ZWave totally sleepy device and is marked offline only in the case when Hub is offline. + +## 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 Aeotec Minimote from SmartThings can be found in the following link: +* [Aeotec Minimote Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/202087904-Aeotec-Minimote) diff --git a/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy b/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy index f1a0c0b..c2fbfc3 100644 --- a/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy +++ b/devicetypes/smartthings/aeon-minimote.src/aeon-minimote.groovy @@ -1,3 +1,4 @@ +import groovy.json.JsonOutput /** * Copyright 2015 SmartThings * @@ -18,6 +19,7 @@ metadata { capability "Holdable Button" capability "Configuration" capability "Sensor" + capability "Health Check" fingerprint deviceId: "0x0101", inClusters: "0x86,0x72,0x70,0x9B", outClusters: "0x26,0x2B" fingerprint deviceId: "0x0101", inClusters: "0x86,0x72,0x70,0x9B,0x85,0x84", outClusters: "0x26" // old style with numbered buttons @@ -119,5 +121,7 @@ def updated() { } def initialize() { + // Arrival sensors only goes OFFLINE when Hub is off + sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "zigbee", scheme:"untracked"]), displayed: false) sendEvent(name: "numberOfButtons", value: 4) } From 17465c87c0bd524685fdfba0afc8d6b5c9e23846 Mon Sep 17 00:00:00 2001 From: "piyush.c" Date: Mon, 19 Jun 2017 18:12:28 +0530 Subject: [PATCH 3/4] [DHF-14] Health Check Aeon Key Fob --- .../smartthings/aeon-key-fob.src/.st-ignore | 2 ++ .../smartthings/aeon-key-fob.src/README.md | 34 +++++++++++++++++++ .../aeon-key-fob.src/aeon-key-fob.groovy | 5 +++ 3 files changed, 41 insertions(+) create mode 100644 devicetypes/smartthings/aeon-key-fob.src/.st-ignore create mode 100644 devicetypes/smartthings/aeon-key-fob.src/README.md diff --git a/devicetypes/smartthings/aeon-key-fob.src/.st-ignore b/devicetypes/smartthings/aeon-key-fob.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/aeon-key-fob.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/aeon-key-fob.src/README.md b/devicetypes/smartthings/aeon-key-fob.src/README.md new file mode 100644 index 0000000..f254223 --- /dev/null +++ b/devicetypes/smartthings/aeon-key-fob.src/README.md @@ -0,0 +1,34 @@ +# Aeon Labs Key Fob + +Cloud Execution + +Works with: + +* [Aeon Labs Key Fob](http://aeotec.com/z-wave-key-fob-remote-control) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Actuator** - represents device has commands +* **Button** - represents a device with one or more buttons +* **Holdable Button** - represents a device with one or more holdable buttons +* **Configuration** - allows for configuration of devices +* **Sensor** - detects sensor events +* **Battery** - defines device uses a battery +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Aeon Key Fob is a ZWave totally sleepy device and is marked offline only in the case when Hub is offline. + +## 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 Aeon Labs Key Fob from SmartThings can be found in the following link: +* [Aeotec Key Fob Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/202294120-Aeon-Labs-Key-Fob) diff --git a/devicetypes/smartthings/aeon-key-fob.src/aeon-key-fob.groovy b/devicetypes/smartthings/aeon-key-fob.src/aeon-key-fob.groovy index deb7047..097479e 100644 --- a/devicetypes/smartthings/aeon-key-fob.src/aeon-key-fob.groovy +++ b/devicetypes/smartthings/aeon-key-fob.src/aeon-key-fob.groovy @@ -1,3 +1,4 @@ +import groovy.json.JsonOutput /** * Copyright 2015 SmartThings * @@ -19,6 +20,7 @@ metadata { capability "Configuration" capability "Sensor" capability "Battery" + capability "Health Check" fingerprint deviceId: "0x0101", inClusters: "0x86,0x72,0x70,0x80,0x84,0x85" fingerprint mfr: "0086", prod: "0001", model: "0026", deviceJoinName: "Aeon Panic Button" @@ -131,6 +133,9 @@ def updated() { } def initialize() { + // Arrival sensors only goes OFFLINE when Hub is off + sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "zigbee", scheme:"untracked"]), displayed: false) + def zwMap = getZwaveInfo() def buttons = 4 // Default for Key Fob From 9f5378c2b6624dac2892284323bf3c9367cbee2f Mon Sep 17 00:00:00 2001 From: Lars Finander Date: Tue, 20 Jun 2017 10:06:23 -0600 Subject: [PATCH 4/4] DVCSMP-2703 OpenT2T: Update to 6/20 submission --- .../opent2t-smartapp-test.src/opent2t-smartapp-test.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/smartapps/opent2t/opent2t-smartapp-test.src/opent2t-smartapp-test.groovy b/smartapps/opent2t/opent2t-smartapp-test.src/opent2t-smartapp-test.groovy index c1e6bff..f7f9ad6 100644 --- a/smartapps/opent2t/opent2t-smartapp-test.src/opent2t-smartapp-test.groovy +++ b/smartapps/opent2t/opent2t-smartapp-test.src/opent2t-smartapp-test.groovy @@ -195,7 +195,10 @@ def registerDeviceChange() { state.deviceSubscriptionMap.put(deviceId, [subscriptionEndpt]) log.info "Added subscription URL: ${subscriptionEndpt} for ${myDevice.displayName}" } else if (!state.deviceSubscriptionMap[deviceId].contains(subscriptionEndpt)) { - state.deviceSubscriptionMap[deviceId] << subscriptionEndpt + // state.deviceSubscriptionMap[deviceId] << subscriptionEndpt + // For now, we will only have one subscription endpoint per device + state.deviceSubscriptionMap.remove(deviceId) + state.deviceSubscriptionMap.put(deviceId, [subscriptionEndpt]) log.info "Added subscription URL: ${subscriptionEndpt} for ${myDevice.displayName}" }