From 573630232fa4af03f98f3082009aa19f085e6be5 Mon Sep 17 00:00:00 2001 From: jackchi Date: Sat, 22 Apr 2017 04:19:29 +0900 Subject: [PATCH 1/3] [CHF-601] Health Check Arrival Sensor (2015 Model) --- .../smartthings/arrival-sensor.src/.st-ignore | 2 + .../smartthings/arrival-sensor.src/README.md | 49 +++++++++++++++++++ .../arrival-sensor.src/arrival-sensor.groovy | 8 +++ 3 files changed, 59 insertions(+) create mode 100644 devicetypes/smartthings/arrival-sensor.src/.st-ignore create mode 100644 devicetypes/smartthings/arrival-sensor.src/README.md diff --git a/devicetypes/smartthings/arrival-sensor.src/.st-ignore b/devicetypes/smartthings/arrival-sensor.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/arrival-sensor.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/arrival-sensor.src/README.md b/devicetypes/smartthings/arrival-sensor.src/README.md new file mode 100644 index 0000000..0ec5084 --- /dev/null +++ b/devicetypes/smartthings/arrival-sensor.src/README.md @@ -0,0 +1,49 @@ +# Arrival Sensor (2015 Model) + +Cloud Execution + +Works with: + +* [Arrival Sensor](https://www.smartthings.com/products/samsung-smartthings-arrival-sensor) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery) +* [Troubleshooting](#troubleshooting) + + +## Capabilities + +* **Tone** - beep command to allow an audible tone +* **Actuator** - device has commands +* **Signal Strength** - device can read the strength of signal- lqi: Link Quality Indication, rssi: Received Signal Strength Indication +* **Presence Sensor** - device tells presence with enum - {present, not present} +* **Sensor** - device has attributes +* **Battery** - defines device uses a battery +* **Health Check** - indicates ability to get device health notifications + + +## Device Health + +Arrival Sensor ZigBee is an untracked device. Disconnects when Hub goes OFFLINE. + + +## Battery + +Uses 1 CR2032 Battery + +* [Changing the Battery](https://support.smartthings.com/hc/en-us/articles/200907400-How-to-change-the-battery-in-the-SmartSense-Presence-Sensor-and-Samsung-SmartThings-Arrival-Sensor) + + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the arrival sensor is out of range. +Pairing needs to be tried again by placing the sensor closer to the hub. + +* [Samsung SmartThings Arrival Sensor Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/205382134-Samsung-SmartThings-Arrival-Sensor-2015-model-) + +If the arrival sensor doesn't update its status, here are a few things you can try to debug. + +* [Troubleshooting: Samsung SmartThings Arrival Sensor won't update its status](https://support.smartthings.com/hc/en-us/articles/200846514-Troubleshooting-Samsung-SmartThings-Arrival-Sensor-won-t-update-its-status) \ No newline at end of file diff --git a/devicetypes/smartthings/arrival-sensor.src/arrival-sensor.groovy b/devicetypes/smartthings/arrival-sensor.src/arrival-sensor.groovy index 4fbd53d..40a8475 100644 --- a/devicetypes/smartthings/arrival-sensor.src/arrival-sensor.groovy +++ b/devicetypes/smartthings/arrival-sensor.src/arrival-sensor.groovy @@ -1,3 +1,5 @@ +import groovy.json.JsonOutput + /** * Copyright 2015 SmartThings * @@ -19,6 +21,7 @@ metadata { capability "Presence Sensor" capability "Sensor" capability "Battery" + capability "Health Check" fingerprint profileId: "FC01", deviceId: "019A" fingerprint profileId: "FC01", deviceId: "0131", inClusters: "0000,0003", outClusters: "0003" @@ -111,6 +114,11 @@ def beep() { ] } +def installed() { + // Arrival sensors only goes OFFLINE when Hub is off + sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "zigbee", scheme:"untracked"]), displayed: false) +} + def parse(String description) { def results if (isBatteryMessage(description)) { From 5e07494dff69ea7e31029134840f3ff4bfb2bd54 Mon Sep 17 00:00:00 2001 From: jackchi Date: Sat, 22 Apr 2017 04:28:50 +0900 Subject: [PATCH 2/3] [CHF-602] Health Check Arrival Sensor HA --- .../arrival-sensor-ha.src/.st-ignore | 2 + .../arrival-sensor-ha.src/README.md | 50 +++++++++++++++++++ .../arrival-sensor-ha.groovy | 8 +++ 3 files changed, 60 insertions(+) create mode 100644 devicetypes/smartthings/arrival-sensor-ha.src/.st-ignore create mode 100644 devicetypes/smartthings/arrival-sensor-ha.src/README.md diff --git a/devicetypes/smartthings/arrival-sensor-ha.src/.st-ignore b/devicetypes/smartthings/arrival-sensor-ha.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/arrival-sensor-ha.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/arrival-sensor-ha.src/README.md b/devicetypes/smartthings/arrival-sensor-ha.src/README.md new file mode 100644 index 0000000..41cbdbe --- /dev/null +++ b/devicetypes/smartthings/arrival-sensor-ha.src/README.md @@ -0,0 +1,50 @@ +# Arrival Sensor HA (2016+ Model) + +Cloud Execution + +Works with: + +* [Samsung SmartThings Arrival Sensor](https://support.smartthings.com/hc/en-us/articles/212417083-Samsung-SmartThings-Arrival-Sensor) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery) +* [Troubleshooting](#troubleshooting) + + +## Capabilities + +* **Tone** - beep command to allow an audible tone +* **Actuator** - device has commands +* **Presence Sensor** - device tells presence with enum - {present, not present} +* **Sensor** - device has attributes +* **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 + +Arrival Sensor ZigBee is an untracked device. Sends broadcast of battery level every 20 seconds. +Disconnects when Hub goes OFFLINE. + + +## Battery + +Uses 1 CR2032 Battery + +* [Changing the Battery](https://support.smartthings.com/hc/en-us/articles/200907400-How-to-change-the-battery-in-the-SmartSense-Presence-Sensor-and-Samsung-SmartThings-Arrival-Sensor) + + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the arrival sensor is out of range. +Pairing needs to be tried again by placing the sensor closer to the hub. + +* [Samsung SmartThings Arrival Sensor Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/205382134-Samsung-SmartThings-Arrival-Sensor-2015-model-) + +If the arrival sensor doesn't update its status, here are a few things you can try to debug. + +* [Troubleshooting: Samsung SmartThings Arrival Sensor won't update its status](https://support.smartthings.com/hc/en-us/articles/200846514-Troubleshooting-Samsung-SmartThings-Arrival-Sensor-won-t-update-its-status) \ No newline at end of file diff --git a/devicetypes/smartthings/arrival-sensor-ha.src/arrival-sensor-ha.groovy b/devicetypes/smartthings/arrival-sensor-ha.src/arrival-sensor-ha.groovy index c434d3d..4099b2a 100644 --- a/devicetypes/smartthings/arrival-sensor-ha.src/arrival-sensor-ha.groovy +++ b/devicetypes/smartthings/arrival-sensor-ha.src/arrival-sensor-ha.groovy @@ -1,3 +1,5 @@ +import groovy.json.JsonOutput + /** * Copyright 2017 SmartThings * @@ -19,6 +21,7 @@ metadata { capability "Sensor" capability "Battery" capability "Configuration" + capability "Health Check" fingerprint inClusters: "0000,0001,0003,000F,0020", outClusters: "0003,0019", manufacturer: "SmartThings", model: "tagv4", deviceJoinName: "Arrival Sensor" @@ -58,6 +61,11 @@ def updated() { startTimer() } +def installed() { + // Arrival sensors only goes OFFLINE when Hub is off + sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "zigbee", scheme:"untracked"]), displayed: false) +} + def configure() { def cmds = zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, 0x0020) + zigbee.batteryConfig(20, 20, 0x01) log.debug "configure -- cmds: ${cmds}" From c164b201caa3f602d16d017d9cc7322bb8fe643f Mon Sep 17 00:00:00 2001 From: Vinay Rao Date: Fri, 21 Apr 2017 17:16:12 -0700 Subject: [PATCH 3/3] ICP-731 wrong icon for dimmer --- devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy | 2 +- .../zwave-metering-dimmer.src/zwave-metering-dimmer.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy b/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy index 7c658c1..74ce052 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", ocfDeviceType: "oic.d.switch") { + definition (name: "Dimmer Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.light") { capability "Switch Level" capability "Actuator" capability "Indicator" 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 05a2737..401be0b 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", ocfDeviceType: "oic.d.switch") { + definition (name: "Z-Wave Metering Dimmer", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.light") { capability "Switch" capability "Polling" capability "Power Meter"