Blacklisted URI

I’m sure this is lack of programming experience, but any ideas why I’m getting the following error?

09:56:00 GMT: error something went wrong: java.lang.SecurityException: Endpoint http://rakobridge is blacklisted.

And if I change the URI to an IP address:

09:58:25 GMT: error something went wrong: org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.1.125:80 [/192.168.1.125] failed: connect timed out

Code:

def initialize() {
// TODO: subscribe to attributes, devices, locations, etc.
subscribe(contact, “contact.open”, comRako)
}

def comRako(evt) {

def params = [
uri: “http://rakobridge”,
path: “/rako.cgi”,
query: [
“room”: “6”,
“ch”: “4”,
“lev”: “250”,
]
]
try {
httpGet(params) { resp ->
log.debug “response data: ${resp.data}”
}
} catch (e) {
log.error “something went wrong: $e”
}
}

http://rakobridge is not a valid url, neither is 192.168.1.X

These all live on your LAN so you will need to use a hubAction to get at your lan. The addresses you are using don’t exist on the internet hence all the errors using a traditional GET request.

Ah, I see. Damn, thought I was getting close! :grin:

1 Like

Give this a look :slightly_smiling:

http://docs.smartthings.com/en/latest/cloud-and-lan-connected-device-types-developers-guide/building-lan-connected-device-types/building-the-device-type.html

1 Like

Does the hubAction need to be in a Device Handler, or can it be in a SmartApp? Still trying to figure my way around the system.