Skip to content

Commit

Permalink
Merge pull request SmartThingsCommunity#1834 from parijatdas/zwave_wa…
Browse files Browse the repository at this point in the history
…ter_valve

[CHF-569] Health Check zwave-water-valve
  • Loading branch information
jackchi authored May 18, 2017
2 parents 40b75ce + 12bb6c0 commit 01c2968
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
2 changes: 2 additions & 0 deletions devicetypes/smartthings/zwave-water-valve.src/.st-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.st-ignore
README.md
38 changes: 38 additions & 0 deletions devicetypes/smartthings/zwave-water-valve.src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Z-Wave Water Valve

Cloud Execution

Works with:

* [Leak Intelligence Leak Gopher Water Shutoff Valve](https://www.smartthings.com/works-with-smartthings/other/leak-intelligence-leak-gopher-water-shutoff-valve)


## Table of contents

* [Capabilities](#capabilities)
* [Health](#device-health)
* [Troubleshooting](#Troubleshooting)

## Capabilities

* **Actuator** - represents that a Device has commands
* **Health Check** - indicates ability to get device health notifications
* **Valve** - allows for the control of a valve device
* **Polling** - represents that poll() can be implemented for the device
* **Refresh** - _refresh()_ command for status updates
* **Sensor** - detects sensor events

## Device Health

SmartThings platform will ping the device after `checkInterval` seconds of inactivity in last attempt to reach the device before marking it `OFFLINE`

* __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:
* [Leak Intelligence Leak Gopher Water Shutoff Valve Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/209631423-Leak-Gopher-Z-Wave-Valve-Control)


Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
metadata {
definition (name: "Z-Wave Water Valve", namespace: "smartthings", author: "SmartThings") {
capability "Actuator"
capability "Health Check"
capability "Valve"
capability "Polling"
capability "Refresh"
capability "Sensor"

fingerprint deviceId: "0x1006", inClusters: "0x25"
fingerprint mfr:"0173", prod:"0003", model:"0002", deviceJoinName: "Leak Intelligence Leak Gopher Water Shutoff Valve"
}

// simulator metadata
Expand Down Expand Up @@ -53,7 +55,14 @@ metadata {

}

def installed() {
// 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 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(refresh())
}

Expand Down Expand Up @@ -114,6 +123,13 @@ def poll() {
zwave.switchBinaryV1.switchBinaryGet().format()
}

/**
* PING is used by Device-Watch in attempt to reach the Device
* */
def ping() {
refresh()
}

def refresh() {
log.debug "refresh() is called"
def commands = [zwave.switchBinaryV1.switchBinaryGet().format()]
Expand Down

0 comments on commit 01c2968

Please sign in to comment.