CoRE - Get peer assistance here with setting up Pistons

NO NO NO NO. I mean, you always have valuable input. Not that I perceive you to be a ‘know it all’… :slight_smile:

@SBDOBRESCU is the forum cliff clavin. :sweat_smile:, @JDRoberts told me so.

1 Like

LOL, I know you weren’t calling me a know it all… unlike my ex-wife… bwahahaha

1 Like

Please, I am not a postal worker, really. I wish my job was that busy and paid me that little. I would have two or three of those that would prevent me for checking which devices stopped working on the hour. Cheers!

1 Like

Okay how about this, getting a phone call when you are away from home and something REALLY important happens. IFTTT integration maybe slow but it gets your attention. ST can notify, even SMS you, but it can’t call you.

One of my use cases.

You will have IFTTT setup by the end of next week. I saw your voice notifications, escalating verbal alerts to your children at dinner time. LOL.

BTW, this is what you can have IFTTT do to your ST ecosystem:

What I want an event in IFTTT to do is something outside of this, namely set a SHM mode. The way I have been doing this is via a Virtual Switch.

IFTTT Sets ST Virtual Switch to a Certain State.
A “RULE” in ST sees that Virtual Switch State and makes a SHM state change.

If CoRE’s IFTTT integration allows me to do this without a ST Virtual Switch, the method has not occurred to me. @ady624

Open the dashboard in a web browser. Copy the url, removing the /dashboard end.

At this point go to IFTTT’s Maker channel (action). You have two options:

  1. Use an IFTTT trigger - append /ifttt/[eventName] to the URI copied above and use that in Maker. POST request with JSON content type. Replace [eventName] with an expressionof your choice. You can add ingredients of the if event into the Maker request body, CoRE can import those into variables. In CoRE, create a piston and use a trigger for IFTTT capability. You will need to enter the same [eventName] you used above. If in expert mode, you can also choose to Import event data - this will bring data from IFTTT into CoRE.

  2. Use the URI copied above followed by /execute/[pistonName] where [pistonName] is the name of the piston. You may have to encode the name to fit HTTP requirements (ie space becomes %20, etc). This will simply execute the desired piston. Option 1 is better as it allows you full control of the execution.


Sooooo awesome.

1 Like

By the way, there are another two undocumented URIs:


They are self-explanatory. [pistonAppId] is the UUID displayed in the logs for each piston, to the left of the log time. Perhaps you can find that under Location > Installed SmartApps too.


btw, contrary to popular belief, IFTTT’s Maker channel is instant. It’s the email event that may take up to 15 minutes when used, due to IFTTT having to poll email boxes.


Yea, @bamarayne. Take that. :heart_eyes:


Hahhaa… you overestimate the non-dev dolts.


1 Like

Okay, one pauses the selected piston, another one resumes it. And the third one brings rain to the land.


@bamarayne, Not sure if you are goating me or not, select status at the top of the Piston, when it’s paused nothing happens so I have to use the light switch manually, like in the olden days, when I was a kid… back before you were born, the good’ol days…


Option 1 is killing me, I can’t quite wrap my head around who this works and to what extent.
I am picturing eventname as a maker event predefined? But if so, that still only allows the ST actions I pasted above, so that doesn’t make sense. Can you explain, sorry, how I get option one to change to specific SHM mode, for example?

Option 2 makes perfect sense to me, not entirely sure I need more than that.

Love the flexibility.

@Toy4Rick… well duh! I know that… I figured you had come up with some fancy way to pause it and then restart it later… lol

The eventname is the value you put in the ifttt capability that you call with the /ifttt/eventname url

[eventName] is an arbitrarily chosen name that you enter in the IFTTT recipe and then in the IFTTT trigger in CoRE. Anything you want. This is so that you can have multiple events sent by IFTTT and handled by CoRE.

So how would one be lazy, and create a single loop to repeat a group of defined actions easily? I can do it very simply with a second piston, but how would one do so within the same piston?

Example piston… if I wanted to add a wait of say 10 seconds and then repeat (ONCE) the group of actions you see defined here within that single piston… what is the most elegant way to accomplish that?

As I was exploring ways to do that, all kinds of neat tools here available, but I am not entirely sure what each does and what the application of them would be. Is this already discussed somewhere?


Use a variable, set it as restriction (variable = 0) for the action that follows up with the piston and also set the variable to 1 during the same action. You’ll need to figure out a way to set it back to 0 for next cycle.

1 Like


This is how I do it… Using a condition in the piston that starts/stops the piston.

Switch turns on and the piston starts… It follows up with itself and the loop is broken when the switch turns off.

1 Like