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 1bd78f3..94e2715 100644 --- a/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy +++ b/devicetypes/smartthings/wemo-light-switch.src/wemo-light-switch.groovy @@ -273,7 +273,7 @@ User-Agent: CyberGarage-HTTP/1.0 def poll() { log.debug "Executing 'poll'" if (device.currentValue("currentIP") != "Offline") - runIn(10, setOffline) + runIn(30, setOffline) new physicalgraph.device.HubAction("""POST /upnp/control/basicevent1 HTTP/1.1 SOAPACTION: "urn:Belkin:service:basicevent:1#GetBinaryState" Content-Length: 277 diff --git a/devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy b/devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy index 9649db4..b7fbee1 100644 --- a/devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy +++ b/devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy @@ -77,9 +77,8 @@ def parse(String description) { def result = [] def bodyString = msg.body if (bodyString) { - unschedule("setOffline") + unschedule("setOffline") def body = new XmlSlurper().parseText(bodyString) - if (body?.property?.TimeSyncRequest?.text()) { log.trace "Got TimeSyncRequest" result << timeSyncResponse() @@ -134,7 +133,7 @@ def refresh() { def getStatus() { log.debug "Executing WeMo Motion 'getStatus'" if (device.currentValue("currentIP") != "Offline") - runIn(10, setOffline) + runIn(30, setOffline) new physicalgraph.device.HubAction("""POST /upnp/control/basicevent1 HTTP/1.1 SOAPACTION: "urn:Belkin:service:basicevent:1#GetBinaryState" Content-Length: 277 diff --git a/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy b/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy index cd9e0ec..6ac3939 100644 --- a/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy +++ b/devicetypes/smartthings/wemo-switch.src/wemo-switch.groovy @@ -28,6 +28,7 @@ command "subscribe" command "resubscribe" command "unsubscribe" + command "setOffline" } // simulator metadata @@ -207,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}") @@ -275,7 +276,7 @@ def setOffline() { def poll() { log.debug "Executing 'poll'" if (device.currentValue("currentIP") != "Offline") - runIn(10, setOffline) + runIn(30, setOffline) new physicalgraph.device.HubAction("""POST /upnp/control/basicevent1 HTTP/1.1 SOAPACTION: "urn:Belkin:service:basicevent:1#GetBinaryState" Content-Length: 277 @@ -290,4 +291,4 @@ User-Agent: CyberGarage-HTTP/1.0 """, physicalgraph.device.Protocol.LAN) -} +} \ No newline at end of file