From 5b1da30a47f16929c8d7955af5d0ed012202c773 Mon Sep 17 00:00:00 2001
From: "piyush.c"
Date: Mon, 19 Dec 2016 17:34:20 +0530
Subject: [PATCH 1/6] [CHF-477] Health Check implementation for Z-Wave Dimmer
Switch Generic with checkinterval of 32min
---
.../zwave-dimmer-switch-generic.groovy | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/devicetypes/smartthings/zwave-dimmer-switch-generic.src/zwave-dimmer-switch-generic.groovy b/devicetypes/smartthings/zwave-dimmer-switch-generic.src/zwave-dimmer-switch-generic.groovy
index 43a65b847c9..841fac5676c 100644
--- a/devicetypes/smartthings/zwave-dimmer-switch-generic.src/zwave-dimmer-switch-generic.groovy
+++ b/devicetypes/smartthings/zwave-dimmer-switch-generic.src/zwave-dimmer-switch-generic.groovy
@@ -24,6 +24,10 @@ metadata {
fingerprint inClusters: "0x26", deviceJoinName: "Z-Wave Dimmer"
fingerprint mfr:"001D", prod:"1902", deviceJoinName: "Z-Wave Dimmer"
fingerprint mfr:"001D", prod:"1B03", model:"0334", deviceJoinName: "Leviton Universal Dimmer"
+ fingerprint mfr:"011A", prod:"0102", model:"0201", deviceJoinName: "Enerwave In-Wall Dimmer"
+ fingerprint mfr:"001D", prod:"1001", model:"0334", deviceJoinName: "Leviton 3-Speed Fan Controller"
+ fingerprint mfr:"001D", prod:"0602", model:"0334", deviceJoinName: "Leviton Magnetic Low Voltage Dimmer"
+ fingerprint mfr:"001D", prod:"0401", model:"0334", deviceJoinName: "Leviton 600W Incandescent Dimmer"
}
simulator {
From 32ceaff54d26cc838094c275edcb7adab9e71052 Mon Sep 17 00:00:00 2001
From: "sushant.k1"
Date: Mon, 19 Dec 2016 18:39:43 +0530
Subject: [PATCH 2/6] [CHF-487] Added Health Check Implementation for: 1.
1,000-Watt In-Wall Smart Dimmer Switch (GE 12725) 2. In-Wall Smart Fan
Control (GE 12730)
---
.../smartthings/dimmer-switch.src/dimmer-switch.groovy | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy b/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy
index 98510ca90f6..b0852c6e3f7 100644
--- a/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy
+++ b/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy
@@ -22,9 +22,10 @@ metadata {
capability "Sensor"
capability "Health Check"
- fingerprint mfr:"0063", prod:"4457", deviceJoinName: "Z-Wave Wall Dimmer"
- fingerprint mfr:"0063", prod:"4944", deviceJoinName: "Z-Wave Wall Dimmer"
- fingerprint mfr:"0063", prod:"5044", deviceJoinName: "Z-Wave Plug-In Dimmer"
+ fingerprint mfr:"0063", prod:"4457", deviceJoinName: "GE In-Wall Smart Dimmer "
+ fingerprint mfr:"0063", prod:"4944", deviceJoinName: "GE In-Wall Smart Dimmer "
+ fingerprint mfr:"0063", prod:"5044", deviceJoinName: "GE Plug-In Smart Dimmer "
+ fingerprint mfr:"0063", prod:"4944", model:"3034", deviceJoinName: "GE In-Wall Smart Fan Control"
}
simulator {
From 9e104055271ae522829a23a1075c6cc0123dd4e2 Mon Sep 17 00:00:00 2001
From: Parijat Das
Date: Tue, 20 Dec 2016 18:33:50 +0530
Subject: [PATCH 3/6] Added fingerprints for the following devices: 1. Enerwave
Duplex Receptacle ZW15R 2. Enerwave On/Off Switch ZW15S 3. Leviton 15A Switch
VRS15-1LZ
---
.../zwave-switch-generic.src/zwave-switch-generic.groovy | 3 +++
1 file changed, 3 insertions(+)
diff --git a/devicetypes/smartthings/zwave-switch-generic.src/zwave-switch-generic.groovy b/devicetypes/smartthings/zwave-switch-generic.src/zwave-switch-generic.groovy
index 01ce695ddbb..ef1134a46dc 100644
--- a/devicetypes/smartthings/zwave-switch-generic.src/zwave-switch-generic.groovy
+++ b/devicetypes/smartthings/zwave-switch-generic.src/zwave-switch-generic.groovy
@@ -25,6 +25,9 @@ metadata {
fingerprint mfr:"0063", prod:"4F50", model:"3031", deviceJoinName: "GE Plug-in Outdoor Switch"
fingerprint mfr:"001D", prod:"1D04", model:"0334", deviceJoinName: "Leviton Outlet"
fingerprint mfr:"001D", prod:"1C02", model:"0334", deviceJoinName: "Leviton Switch"
+ fingerprint mfr:"001D", prod:"0301", model:"0334", deviceJoinName: "Leviton 15A Switch"
+ fingerprint mfr:"011A", prod:"0101", model:"0102", deviceJoinName: "Enerwave On/Off Switch"
+ fingerprint mfr:"011A", prod:"0101", model:"0603", deviceJoinName: "Enerwave Duplex Receptacle"
}
// simulator metadata
From bd44027038ec9adf42d986aa411c92a8bde355af Mon Sep 17 00:00:00 2001
From: Lars Finander
Date: Mon, 9 Jan 2017 15:32:01 -0700
Subject: [PATCH 4/6] DVCSMP-2298 Philips Hue: Reduce number of daily
exceptions
-Stop retry when broken data received
-Time out on light discovery if nothing is found
-Avoid div/0 in color temp logic
---
.../hue-connect.src/hue-connect.groovy | 41 +++++++++++++------
1 file changed, 28 insertions(+), 13 deletions(-)
diff --git a/smartapps/smartthings/hue-connect.src/hue-connect.groovy b/smartapps/smartthings/hue-connect.src/hue-connect.groovy
index 621d0d0c57b..fe5a4f7e0a3 100644
--- a/smartapps/smartthings/hue-connect.src/hue-connect.groovy
+++ b/smartapps/smartthings/hue-connect.src/hue-connect.groovy
@@ -172,18 +172,34 @@ def bulbDiscovery() {
if (existingLightsDescription.isEmpty()) {
existingLightsDescription += it.value
} else {
- existingLightsDescription += ", ${it.value}"
+ existingLightsDescription += ", ${it.value}"
}
}
}
- return dynamicPage(name:"bulbDiscovery", title:"Light Discovery Started!", nextPage:"", refreshInterval:refreshInterval, install:true, uninstall: true) {
- section("Please wait while we discover your Hue Lights. Discovery can take five minutes or more, so sit back and relax! Select your device below once discovered.") {
- input "selectedBulbs", "enum", required:false, title:"Select Hue Lights to add (${numFound} found)", multiple:true, submitOnChange: true, options:newLights
- paragraph title: "Previously added Hue Lights (${existingLights.size()} added)", existingLightsDescription
+ if (bulbRefreshCount > 200 && numFound == 0) {
+ // Time out to avoid endless discovery
+ state.inBulbDiscovery = false
+ bulbRefreshCount = 0
+ return dynamicPage(name:"bulbDiscovery", title:"Light Discovery Failed!", nextPage:"", refreshInterval:0, install:true, uninstall: true) {
+ section("Failed to discover any lights, please try again later. Click Done to exit.") {
+ //input "selectedBulbs", "enum", required:false, title:"Select Hue Lights to add (${numFound} found)", multiple:true, submitOnChange: true, options:newLights
+ paragraph title: "Previously added Hue Lights (${existingLights.size()} added)", existingLightsDescription
+ }
+ section {
+ href "bridgeDiscovery", title: title, description: "", state: selectedHue ? "complete" : "incomplete", params: [override: true]
+ }
}
- section {
- href "bridgeDiscovery", title: title, description: "", state: selectedHue ? "complete" : "incomplete", params: [override: true]
+
+ } else {
+ return dynamicPage(name:"bulbDiscovery", title:"Light Discovery Started!", nextPage:"", refreshInterval:refreshInterval, install:true, uninstall: true) {
+ section("Please wait while we discover your Hue Lights. Discovery can take five minutes or more, so sit back and relax! Select your device below once discovered.") {
+ input "selectedBulbs", "enum", required:false, title:"Select Hue Lights to add (${numFound} found)", multiple:true, submitOnChange: true, options:newLights
+ paragraph title: "Previously added Hue Lights (${existingLights.size()} added)", existingLightsDescription
+ }
+ section {
+ href "bridgeDiscovery", title: title, description: "", state: selectedHue ? "complete" : "incomplete", params: [override: true]
+ }
}
}
}
@@ -407,7 +423,7 @@ def addBridge() {
if(vbridge) {
def d = getChildDevice(selectedHue)
if(!d) {
- // compatibility with old devices
+ // compatibility with old devices
def newbridge = true
childDevices.each {
if (it.getDeviceDataByName("mac")) {
@@ -593,7 +609,7 @@ def locationHandler(evt) {
log.trace "Location: $description"
def hub = evt?.hubId
- def parsedEvent = parseLanMessage(description)
+ def parsedEvent = parseLanMessage(description)
parsedEvent << ["hub":hub]
if (parsedEvent?.ssdpTerm?.contains("urn:schemas-upnp-org:device:basic:1")) {
@@ -819,8 +835,7 @@ def parse(childDevice, description) {
try {
body = new groovy.json.JsonSlurper().parseText(bodyString)
} catch (all) {
- log.warn "Parsing Body failed - trying again..."
- poll()
+ log.warn "Parsing Body failed"
}
if (body instanceof java.util.Map) {
// get (poll) reponse
@@ -844,7 +859,7 @@ private sendColorEvents(device, xy, hue, sat, ct, colormode = null) {
def events = [:]
// For now, only care about changing color temperature if requested by user
- if (ct != null && (colormode == "ct" || (xy == null && hue == null && sat == null))) {
+ if (ct != null && ct != 0 && (colormode == "ct" || (xy == null && hue == null && sat == null))) {
// for some reason setting Hue to their specified minimum off 153 yields 154, dealt with below
// 153 (6500K) to 500 (2000K)
def temp = (ct == 154) ? 6500 : Math.round(1000000 / ct)
@@ -1252,7 +1267,7 @@ private getBridgeIP() {
if (d) {
if (d.getDeviceDataByName("networkAddress"))
host = d.getDeviceDataByName("networkAddress")
- else
+ else
host = d.latestState('networkAddress').stringValue
}
if (host == null || host == "") {
From 5607a3e346994f3f925372aa4bfa06908276ccba Mon Sep 17 00:00:00 2001
From: Juan Pablo Risso
Date: Tue, 10 Jan 2017 12:29:53 -0500
Subject: [PATCH 5/6] DVCSMP-2309 - Wemo Exceptions (#1579)
---
.../wemo-light-switch.src/wemo-light-switch.groovy | 2 +-
devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy | 2 +-
devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy b/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy
index 94e2715d127..ad72065b94c 100644
--- a/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy
+++ b/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy
@@ -86,7 +86,7 @@ def parse(String description) {
def bodyString = msg.body
if (bodyString) {
unschedule("setOffline")
- def body = new XmlSlurper().parseText(bodyString)
+ def body = new XmlSlurper().parseText(bodyString.replaceAll("[^\\x20-\\x7e]", ""))
if (body?.property?.TimeSyncRequest?.text()) {
log.trace "Got TimeSyncRequest"
diff --git a/devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy b/devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy
index b7fbee1a4dd..dd5f1fa02fa 100644
--- a/devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy
+++ b/devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy
@@ -78,7 +78,7 @@ def parse(String description) {
def bodyString = msg.body
if (bodyString) {
unschedule("setOffline")
- def body = new XmlSlurper().parseText(bodyString)
+ def body = new XmlSlurper().parseText(bodyString.replaceAll("[^\\x20-\\x7e]", ""))
if (body?.property?.TimeSyncRequest?.text()) {
log.trace "Got TimeSyncRequest"
result << timeSyncResponse()
diff --git a/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy b/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy
index 6ac3939f398..fcda9ec49e8 100644
--- a/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy
+++ b/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy
@@ -84,7 +84,7 @@ def parse(String description) {
def bodyString = msg.body
if (bodyString) {
unschedule("setOffline")
- def body = new XmlSlurper().parseText(bodyString)
+ def body = new XmlSlurper().parseText(bodyString.replaceAll("[^\\x20-\\x7e]", ""))
if (body?.property?.TimeSyncRequest?.text()) {
log.trace "Got TimeSyncRequest"
result << timeSyncResponse()
@@ -208,7 +208,7 @@ def subscribe(ip, port) {
def existingIp = getDataValue("ip")
def existingPort = getDataValue("port")
if (ip && ip != existingIp) {
- log.debug "Updating ip from $existingIp to $ip"
+ log.debug "Updating ip from $existingIp to $ip"
updateDataValue("ip", ip)
def ipvalue = convertHexToIP(getDataValue("ip"))
sendEvent(name: "currentIP", value: ipvalue, descriptionText: "IP changed to ${ipvalue}")
@@ -291,4 +291,4 @@ User-Agent: CyberGarage-HTTP/1.0
""", physicalgraph.device.Protocol.LAN)
-}
\ No newline at end of file
+}
From f969027191e27a3074a472509952f710453611d8 Mon Sep 17 00:00:00 2001
From: Duncan McKee
Date: Tue, 10 Jan 2017 12:55:13 -0500
Subject: [PATCH 6/6] Add fingerprint for GE Smart Motion Sensor DEVC-533
---
.../zwave-motion-sensor.src/zwave-motion-sensor.groovy | 1 +
1 file changed, 1 insertion(+)
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 014900be396..46d8be251f5 100644
--- a/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy
+++ b/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy
@@ -28,6 +28,7 @@ metadata {
fingerprint mfr: "0060", prod: "0001", model: "0002", deviceJoinName: "Everspring Motion Sensor" // Everspring SP814
fingerprint mfr: "0060", prod: "0001", model: "0003", deviceJoinName: "Everspring Motion Sensor" // Everspring HSP02
fingerprint mfr: "011A", prod: "0601", model: "0901", deviceJoinName: "Enerwave Motion Sensor" // Enerwave ZWN-BPC
+ fingerprint mfr: "0063", prod: "4953", model: "3133", deviceJoinName: "GE Smart Motion Sensor"
}
simulator {