New SmartApp with web services

I am attempting to create my first SmartApp using web services

From the browser, the following command works:

when I attempt an HttpGet request from my app,I get a ConnectTimeoutException

def apiParams = [
uri: “”,
path: “/api/4/apiVer”,
log.debug "parm: " + apiParams
try {
httpGet(apiParams) { resp ->
resp.headers.each {
log.debug “${} : ${it.value}”
log.debug “response contentType: ${resp. contentType}”
} catch (e) {
log.debug “something went wrong: $e”

When I click that link the browser hangs on “connecting…”, and eventually resolves with ERR_CONNECTION_TIMED_OUT, which would explain the timeout exception.


If you take a look here:

I have a simple local HTTP based device that (admittedly isn’t super clean), but works! I struggled getting it right for quite a while…

Let me know if that works out or not!


Don’t think that will work for local addresses… Check out sendHubCommand