SmartThings Community

CoRE and Piston Rules Engine, first design steps



I have not tried what you’re doing but if in between in not available, you can try saving wind speed value to a variable and then use the variable capability to check if it’s within.your target range.

(phil) #4307

yep that is what I am trying. First time I had to do this so we will see how it works


I need help using a web request. I’m using /execute/pistonname. The piston is activated in the dashboard but does not perform the tasks. What am I doing wrong? Is this a bug? Can someone confirm this works for them?

(Lisa 262) #4309

Post a picture of your piston.


It’s not working on any of my pistons. All of my pistons are working correctly from the SmartThings app but won’t work when I send the command even though they say they are working in the dashboard. Here is one of my pistons

After I send /execute/goodbye

Piston is running.
Piston state changed to false 17 seconds ago.
Last accepted event was a execute event, 18 seconds ago.
Piston uses 1 trigger and has subscribed to 1 device.

debug ║ Received an API execute request for piston ‘goodbye’ with data: [:]

(Lisa 262) #4311

I’ve only used Maker and IFTTT for web requests. I’d recommend Ace Developer/CoRE Mastermind @ady624 add his two cents…

Or, try asking in the CoRE - Get peer assistance here with setting up Pistons discussion…

(Jason Hamilton) #4312

I have several pistons making web requests. Are you trying to make a local call to a service on your LAN? Your piston for your routine looks ok from what I can see. I second @Lisa_262 about posting in the help forum and also see if @ady624 has any thoughts as well.


I’m making an outside request trying to trigger a piston to run

This is what I use:

You can see what happens to the piston in my above post. It states it received the execute event but it changes to false. I’m not even sure if this is supposed to work.
I’ll reach out to @ady624


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.

( I hate Mondays) #4316

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:

(John) #4317

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

( I hate Mondays) #4318

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

(Hans) #4319

@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?

( I hate Mondays) #4320

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

(Hans) #4321

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.

(John) #4322

Ah… that explains it. Thanks!

(Curtis Olson) #4323


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)


(Curtis Olson) #4324

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



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…

(Bob) #4326

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.