CoRE and Piston Rules Engine, first design steps

Here is the answer from @ady624.

Ok, the reason the piston doesn’t do anything is because your piston has an IF condition that can’t be true when executed by IFTTT. The piston will only run when the routine runs. Do you need the piston to be run by both IFTTT and a routine? If so, consider adding a second trigger for the IFTTT capabiity, with an OR between the two conditions.

Works perfectly this way after editing my pistons. Now I can use one IFTTT Google Assistant applet to execute any piston.

Yeah, but this works in your context: your piston had a single trigger condition on the execution of a routine which obviously returned false when piston was run by other means than the routine itself executing. I recommend using an IFTTT trigger as it keeps the piston logic sane. Or you can always use a Do piston if you plan on executing it directly from IFTTT like you did. A Do piston has no conditions so it will just run :wink:

Did you post that earlier? In the one you posted, the last line in the image you posted only sets it true.

The IF sets it to true, the BUT IF sets it to false. Tap on the picture to open it fully.

@ady624 Do you have any suggestions in setting up a virtual dimmer to control multiple physical dimmable lights? I am trying to use 2 variables to do this. Adjusting the level works fine, but turning the lights on/off doesn’t work. CoRE and Piston Rules Engine, first design steps

Or should I use a different app to make these virtual switches/dimmers work?

If the virtual is the master and the physical are slaves, you need no variables. Just subscribe to the virtual

  Virtual switch changes
      >>> when true > using physical > load attribute switch from variable $currentEventValue
   Virtual level changes
      >>> when true > using physical > load attribute level from variable $currentEventValue
1 Like

Thank you, the virtual dimmer is now controlling the physical ones! I finally realized why I couldn’t use the “when true” syntax after banging my head against my computer screen all day today. I thought I was stupid because I couldn’t see the option. Turns out I had to turn on expert mode in the general CoRE settings. I could see writing some pretty slick routines now. Thanks again.

1 Like

Ah… that explains it. Thanks!


Could you explain where I find the “mytokenhere” and the “appidhere”? I’m unclear if the token comes from the OAuth of the Core app or that is related to my ST account. And appid is obviously the id of the Core app. I don’t see an id on the web pages, but the URL for that app has an appid (the id string is random and not from my account)


I found it in another thread. The token and app is are when you access the CoRE Dashboard from within the SmartThings app.

1 Like


Loving getting into CORE, but not quite got my head around it yet. I’m having a go at a seemingly simple rule I’m using as a first case.

If a multi sensor senses vibration, and then the open/close sensor doesn’t open within 1 minute, generate a notification, but only when the alarm state is set to armed.

I initially used a Then-if and that sort of seemed to work, but it would trigger multiple times. I then switched to a Simple piston as well as experimenting with only execute of state change, but I now seem to be confusing myself…

Piston queries tend to get posted in the thread below where people an awful lot brighter than me give some fantastic advice. Perhaps try here.

This is by no means a simple use case - it involves a kicker event, a time window and the detection of a non-event, or lack of it. Latching piston.

   Vibration changes to active
   Using location... (TCP: cancel on piston state change)
       > Wait 1 minute
      > Send notification
   Contact sensor changes to open


I’m new to this SmartThings and CoRE stuff. Could anyone tell me is it possible to execute piston from Tasker with SharpTools? I can’t see any pistons there, only routines.

What I’m trying to do is following simple thing:

  1. When I manually start Netflix app from my device.
  2. In this case turn on certain lights, if my presence is at Home.

Better yet would be, when I press cast button to chromecast in Netflix app, turn on lights if presence at Home.


I am doing this now using the IFTTT trigger mode for a piston. This essentially creates a URL that you can then access directly through Tasker to trigger the piston.

How you create a URL to a piston in IFTTT? I have the IFTTT app, but don’t really have any idea about it and how it connects to a piston…

What he means is… in the piston, he adds an IFTTT capability trigger. To “trigger” that piston, all you need is the dashboard URL, strip the dashboard/ part from it and add execute/<piston name>

Then just open the URL in a browser to test. Your URL will look like:

Try avoiding spaces in the piston name, or replace the spaces with %20 in the URL.

1 Like

Thanks for the clarification. You explained it well in this previous post.


1 Like

Thanks guys. Still, I’m bit struggling with the IFTTT, what should I choose there? My applet -> Create new applet, then it asks to choose Service. I can find Smartthings there, but not really sure if I should go that way…? Where can I add just simple Url trigger?

You don’t need to use IFTTT, that’s simply the name of the trigger that you should select in your CoRE piston. You can then use the technique @ady624 described above to get the URL.