Newbie, Execute a Routine or Device action via URL?


(Kmp14) #1

Hopefully this is the right place to start. I want to execute a SmartThings Routine or simply flip a device switch off or on via a URL. I know about the “https://graph.api.smarthings.com” site, but betond that I have no idea where to start.

Ultimately, I want to use EventGhost to trigger Routines or device actions in SmartThings. I was doing this in my now dead VeraLite controller, so on the EventGhost side I have everything done, I just want to replace those URL calls in EventGhost with ones for SmartThings. Any help for this newbie would be most appreciated!


[DEPRECATED Thread: visit community.webcore.co for assistance] webCoRE - Piston Design Help (ask your fellow members for assistance)
#2

This should help:


#3

You could also look at using webCoRE, it has a built-in endpoint that you could use to trigger events or devices without having to program your own REST endpoint.


Making a web request without IFTTT?
#4

WebCore is probably The best place to start. :sunglasses: It’s essentially a scripting language for SmartThings, very powerful.

The thread I linked to is still interesting, but was written before webcore existed.


#5

I’m intrigued by this…

Do you have a reference on how to make this work via webCoRE? I see the endpoint link in the help, and I found an action but I need a few examples to work out how to make it…work


#6

In webCoRE, create the piston that you want to perform the actions/routines/etc. One you have that worked out, visit the webCoRE dashboard settings, you want the info on the bottom of the page (Executing pistons). It will give you your unique endpoint to call from a URL and append the ID of the piston you created or use the name but you encode the spaces.

https://graph.api.smartthings.com/api/token/secretkey/smartapps/installations/morecodeshere/execute/:pistonId:

or

https://graph.api.smartthings.com/api/token/secretkey/smartapps/installations/morecodeshere/execute/ExecFromURL

Example piston:


#7

Thanks. That was surprisingly easy… Now to do something useful with it.


#8

Yes, really easy, @ady624 simplified it for us non-techies (and partial geeks, is there such a thing) :slight_smile:


(Kmp14) #9

Boom! An hour so of tinkering, and I have SmartThings/webCoRE and EventGhost doing what VeraLite and EventGhost was doing! Thanks so much. Great wiki to help get started.


(Bill Stefanelli) #10

I’m creating a dashboard with Tasker and have it working well with push notifications. I decided flooding various devices with refreshes via push was not optimal so looking at calling into webcore from Tasker. I have it working (as stated above super simple) but what I can’t find through hours of research is how to pass data back to Tasker from webcore. Any help will be greatly appreciated!


(Bill Stefanelli) #11

To be more clear, my piston(s) will query various system and device states and I need to return that data to Tasker. Right now its stored in webcore variables and then Push notification out.