SmartThings App


(Crash Test) #1

Is is possible to write a plugin for the SmartThings app that will WGET or CURL a HTTP address?


(Zach Naimon) #2

Unclear as to what you want to do, can you elaborate a little bit?


(Crash Test) #3

For example: I would like my SmartThings App to send a HTTP request to a page, say keepalive.aspx and report on the result in this case the current date and time.

or even simpler, say I have a http link to a cgi script that will run if that page link is requested. All I want the SmartThings App to do is on a specific Event, visit that url.

Is this possible?


(Brian Steere) #4

@crashtest Yes you can do that. Check out the http methods here: https://graph.api.smartthings.com/ide/doc/smartApp


(Eric Spery) #5

Doing a quick proof-of-concept, I built a smart app that hits an external app that returns either true or false. Domain has been changed to protect the innocent. Here’s the relevant bit that might help you. Sorry for punting out to Java, I’m sure a groovy/grails dev could clean this code up a bit.

httpGet( “http://www.MyAppThatReturnsTrueOrFalse.com/active” ) {
response -> if ( “true”.equals( response.data.toString() ) ) { doSomething() }
}

Hope that helps.