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 94e2715..ad72065 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 b7fbee1..dd5f1fa 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 6ac3939..fcda9ec 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 +}