From a9c078c0cb011d69989e696349d4ce359a7eeb82 Mon Sep 17 00:00:00 2001 From: "Donald C. Kirker" Date: Fri, 19 Feb 2016 05:41:34 -0600 Subject: [PATCH] DEVC-246: As noted in the Z-Wave Door/Window Sensor source code, "Enerwave motion doesn't always get the associationSet that the hub sends on join". It appears that sometimes when the Enerwave motion sensor joins it does not report events, which would be indicative of this. What can be done to resolve this? Is this a manufacturer firmware bug, or a bug with our stack? Enerwave claims that their DTH works "perfectly". --- .../zwave-motion-sensor.src/zwave-motion-sensor.groovy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 b46f9c6..4015be3 100644 --- a/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy +++ b/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy @@ -119,6 +119,10 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd) { def result = [createEvent(descriptionText: "${device.displayName} woke up", isStateChange: false)] + + if (msr == "011A-0601-0901") { // Enerwave motion doesn't always get the associationSet that the hub sends on join + result << response(zwave.associationV1.associationSet(groupingIdentifier:1, nodeId:zwaveHubNodeId)) + } if (!state.lastbat || (new Date().time) - state.lastbat > 53*60*60*1000) { result << response(zwave.batteryV1.batteryGet()) result << response("delay 1200") @@ -179,4 +183,4 @@ def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerS result << createEvent(descriptionText: "$device.displayName MSR: $msr", isStateChange: false) result -} +} \ No newline at end of file