Siri Shortcuts with webCoRE


#1

So I’ve been making shortcuts connected to IFTTT that trigger things in SmartThings via webCoRE, but I’ve been wondering - is it possible to just cut out the middle man and bypass IFTTT? Can I do anything in Shortcuts that’s connected to webCoRE directly?

Here’s a link I found in Facebook group for a blank webhooks shortcut.

https://www.icloud.com/shortcuts/8844054c99884b1cbd62735e061a7afa

Basic premise I’d like to trigger piston via Siri.


#2

I think in essence, something has to be running 24/7 monitoring incoming requests and sending out commands. It can be IFTTT, a RaspberryPi, or even EventGhost running on a PC. (Just to name a few possibilities)

I use EventGhost for most things, but occasionally I use IFTTT for the "always on’ commands.
(since my PC is occasionally off.)

I am hoping to get myself a RaspberryPi for Xmas though…


#3

Wasn’t sure if you could call the external piston URL from Siri Shortcuts.


#4

Sure, give it the piston’s external URL and choose POST for the request and shortcuts will let you build out complex arguments to pass to the piston. Anything you send in the request body is available in the piston via $args. In expressions you can for example use $args.action to get a param named action:


Command Siri to execute SmartThings pistons
#5

You can also copy and paste the link generated from inputting a trigger of IFTTT and use it anywhere. Doesn’t have to be from IFTTT. I use them directly from lots of applications. That way you can incorporate it like any other trigger.


#6

Can you provide an example of what you’re doing and how you’re doing it? Do you mean this link?


#7

No, I mean the link out of webcore. If you add an if, then pick virtual device, then IFTTT, you get the following window.

You type in the name of the event, so it’s unique, then you can copy that link and use it anywhere. I have other apps execute that call to pull IFTTT out of the middle. That’s the link you should be using for the IFTTT Webhooks channel. Not the link to the piston execution. That would only execute the whole piston. This link can be nested with other conditions. I also use this from a couple different apps on my phone. Or from Hubitat for some functions I’m still using ST for.


#8

So you make a request to that link with roughly the same data IFTTT would send and any piston that handles IFTTT actions can respond to it… That’s clever! Is it possible to pass custom data into the pistons with that approach or is it just a trigger?


#9

So I finally got this working with Shortcuts. Here’s a sample piston I’m using which controls SHM.

And here’s what I did in a Siri Shortcut

And I used the external URL for the piston. Works fine so I’m not sure what the difference between using this and the IFTTT URL would be.


#10

Because the external URL executes the whole piston. If you have a trigger, nothing will happen because the trigger will not have happened. This allows the URL to be a trigger.


#11

But this piston works fine. Guess I’m just not seeing what I’m missing. Not saying your method won’t work because before using the external URL in Shortcuts I was doing this through IFTTT with my maker trigger URL in shortcuts and my webCoRE IFTTT URL as as the action in IFTTT.

So I guess my questions are what’s the benefit of your way versus this way? Will my cause some other issues I’m not aware of?


#12

Tell me this then - right now in my piston I’m trying to set piston state to most recent action type and time it happened but it’s not updating. I’m guessing maybe because there’s no triggers in here and so no actions taking place to update the variables. Would your method fix that?

Here’s the piston again.


#13

Just tried your method and it does work. Thanks. I’m sure I can guess your answer but I’ll ask anyways - would you recommend changing everything over to this method?


#14

Another question I’ve got is in Shortcuts does it matter if I choose POST or GET? Not sure I know the difference.