Hi There,
I am trying to call a URL from my SmartApp, i made an event on WemoManager and its external URL is as such
xxxx.ddns.net:4030/event/fanon
I tried both methods,
//1
def params = [
uri: “http://xxxx.ddns.net:4030”,
path: "/event/fanoff"
]
try {
httpGet(params) { resp ->
resp.headers.each {
log.debug “${it.name} : ${it.value}”
}
log.debug "response contentType: ${resp.contentType}"
log.debug “response data: ${resp.data}”
}
} catch (e) {
log.error “something went wrong: $e”
}
//2
def result = new physicalgraph.device.HubAction(
method: “GET”,
path: “/event/fanoff”,
headers: [
HOST: “xxxx.ddns.net:4030”,
]
)
sendHubCommand(result)
The 2nd one seems to be able to connect
//Result on log
55f6d304-15f5-46ed-bddb-2f7c8e1dad91 10:08:11 PM: debug Executing GET /event/fanoff HTTP/1.1
Accept: /
User-Agent: Linux UPnP/1.0 SmartThings
HOST: xxxx.ddns.net:4030
ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
CONNECTION: keep-alive
requestContentType: application/json
But it still does not send a signal to my switch…
Any help would be great