Skip to content

Commit 8040ddd

Browse files
committed
Z-Wave Water Valve: remove fingerprint from fortrezz, automatic refresh when join, remove manufacturerSpecificGet from poll()
1 parent 617d53d commit 8040ddd

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

devicetypes/smartthings/fortrezz-water-valve.src/fortrezz-water-valve.groovy

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ metadata {
1919
capability "Sensor"
2020

2121
fingerprint deviceId: "0x1000", inClusters: "0x25,0x72,0x86,0x71,0x22,0x70"
22-
fingerprint deviceId: "0x1006", inClusters: "0x25"
2322
}
2423

2524
// simulator metadata

devicetypes/smartthings/zwave-water-valve.src/zwave-water-valve.groovy

+12-15
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ metadata {
2222
fingerprint deviceId: "0x1006", inClusters: "0x25"
2323
}
2424

25-
preferences {
26-
input description: "After successful installation, please click the refresh tile to update device status",
27-
title: "Instructions", displayDuringSetup: true, type: "paragraph", element: "paragraph"
28-
}
29-
3025
// simulator metadata
3126
simulator {
3227
status "open": "command: 2503, payload: FF"
@@ -58,6 +53,10 @@ metadata {
5853

5954
}
6055

56+
def updated() {
57+
response(refresh())
58+
}
59+
6160
def parse(String description) {
6261
log.trace "parse description : $description"
6362
def result = null
@@ -70,7 +69,7 @@ def parse(String description) {
7069
}
7170

7271
def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) {
73-
def value = cmd.value == "on" || cmd.value == 0xFF ? "open" : cmd.value == "off" || cmd.value == 0x00 ? "closed" : "unknown"
72+
def value = cmd.value == 0xFF ? "open" : cmd.value == 0x00 ? "closed" : "unknown"
7473
[name: "contact", value: value, descriptionText: "$device.displayName valve is $value"]
7574
}
7675

@@ -89,7 +88,7 @@ def zwaveEvent(physicalgraph.zwave.commands.deviceresetlocallyv1.DeviceResetLoca
8988
}
9089

9190
def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd) {
92-
def value = cmd.value == "on" || cmd.value == 0xFF ? "open" : cmd.value == "off" || cmd.value == 0x00 ? "closed" : "unknown"
91+
def value = cmd.value == 0xFF ? "open" : cmd.value == 0x00 ? "closed" : "unknown"
9392
[name: "contact", value: value, descriptionText: "$device.displayName valve is $value"]
9493
}
9594

@@ -112,16 +111,14 @@ def close() {
112111
}
113112

114113
def poll() {
115-
delayBetween([
116-
zwave.switchBinaryV1.switchBinaryGet().format(),
117-
zwave.manufacturerSpecificV1.manufacturerSpecificGet().format()
118-
],100)
114+
zwave.switchBinaryV1.switchBinaryGet().format()
119115
}
120116

121117
def refresh() {
122118
log.debug "refresh() is called"
123-
delayBetween([
124-
zwave.switchBinaryV1.switchBinaryGet().format(),
125-
zwave.manufacturerSpecificV1.manufacturerSpecificGet().format()
126-
],100)
119+
def commands = [zwave.switchBinaryV1.switchBinaryGet().format()]
120+
if (getDataValue("MSR") == null) {
121+
commands << zwave.manufacturerSpecificV1.manufacturerSpecificGet().format()
122+
}
123+
delayBetween(commands,100)
127124
}

0 commit comments

Comments
 (0)