CoRE and Piston Rules Engine, first design steps

I want to have a rule that notifies me via SMS EVERY time the temperature changes. Whether it takes a minute or an hour or a day, and ever time, whether up or down. I was happy to see the “Changed” option. However it seems to require I select a duration such as changed within X minutes. I could pick something long like 300 minutes but this seemed a bit like a cludge on my part plus its possible it may take longer for the temp to change than 300 minutes. Is there a way to say Changed, regardless of how long its been since the change? I tried ignoring the “In the last” option but its required. Perhaps there should be a 0 minutes to indicate the duration is not relevant, unless there is another way?

Likewise I have a need for a different rule that says that if motion hasn’t been seen in 12 hours than do such and so. Is there a way to specify longer than the 300 minutes listed in the options? Of course I could modify this pretty easily myself but then it would be out of sync with the real codebase. Thanks!

I have a question please regarding IFTTT integration. How does this work exactly? I have it set up, but not sure how to base rules around it. For example, I want to have a rule that says “if there has been motion within the past 12 hours AND IF THE OUTSIDE HUMIDITY is less than 90% THEN do such and so”. My plan is to get the outside humidity from a IFTTT weather channel. That’s just one example of course - I would like to use IFTTT values from channels besides temperature and humidity. Is that one of the things that IFTTT integration with CoRE can be used for, and how? Thanks!!

I use a geofence with IFTTT, when myself or wife exits it switches on a virtual switch. When this virtual switch switches on then I have a piston which speaks a message over sonos

Change that to a uDTH instead of switch and you have a functional presence sensor in any ST app, including routines

Excuse my ignorance but what’s a uDTH? Sounds interesting!

@Mike_Maxwell’s [RELEASE] Universal Virtual Device Type and Translator


As cool as uDTH is I don’t see how converting from a switch to presence would work differently vs. the virtual switch example when applying the logic to CoRE?

It’s not, was just a side note that he could use a better device than a switch that can be used anywhere in the ST universe…

1 Like

v0.1.10b.20160622 - Beta M1 - Reverse IFTTT support - IFTTT can now trigger pistons - coming up next: The IFTTT capability

JSON data (aka Body) is optional, can be left empty. If provided, data is available to the piston via variables having the respective names. If variables didn’t exist, they get created… :wink:



The IFTTT capability is now up in v0.1.10c.

Use the Maker channel to send an external HTTPS request. The URL is https://[CoRE endpoint]/ifttt/[event name]

[CoRE endooint] is the same as your dashboard URL but up until and excluding the word “dashboard”.

[event name] is any of your choice, must be the same as the value entered for the IFTTT trigger in the piston’s IFTTT capability. //todo import event data into variables so CoRE can process Ask Alexa and IFTTT data on events…


Holy sweetness… I’ve been looking for this, time to get rid of about 30 virtual switches :grinning:


I’d like to understand better what this new IFTTT integration just added can do. Can you elaborate on what you have set up now, and the ways in which using this new IFTTT integration will make things cleaner? This would be useful for understanding some use cases.

1 Like

I am only going through the proper integration this weekend, but from what I can see from @ady624 previous post we can run pistons directly using IFTTT. For me an example use case is:

I have a few Android devices in key places setup to run SmartTiles, Lannouncer, Voice Automation (using alexa listens and ok google… can’t decide on a single one so using both), Tasker and a few other goodies. One of them, for example, is in my main foyer with a massive chandelier, and the chandelier is the only light source for the room. I use tasker to monitor room brightness using the lux sensor on the device and Tasker runs ifttt when it detects the light has dropped below a threshold. Right now ifttt triggers a virtual switch called low brightness, which then triggers the light. I can’t have the switch triggered directly since it will mess with a few other pistons and smart lighting setups. With the new integration, I can skip the virtual switch in between.

Another use is I also use the cameras on the device as a surveilence system, and when there is motion, they trigger another virtual switch through ifttt which runs a few pistons. I can make all of them run the pistons directly instead of using the virtual switches.

1 Like

How can I make a IF trigger based around a value that comes from an external service? For instance if I want to have an IF around the temperature or humidity reported for a certain area by the weather service? I was thinking maybe through IFTTT, but I don’t know if that’s the right way to go about it.

Let me know if you get going how much faster response you’d get from using maker and no man in the middle. Really interested if you get less lag. I have contact sensors and cameras and a bunch of other things updated by ifttt.

1 Like

So for IFTTT to trigger that, a service that connects to IFTTT needs to start the trigger. A basic example is:

If I want my light sensor on my android device to trigger a light in ST through IFTTT, the program called Tasker checks the value of the sensor and when that value falls within the preset threshold, the Tasker program runs the IFTTT trigger. At that point IFTTT checks’s what exactly triggered it and runs.

So using the triggers available in IFTTT’s weather channel ( you should be able to run pistons. If the channel I linked doesn’t have a specific trigger you are looking for another one might. Worst case scenario you might have to use the IFTTT maker channel and figure out a DIY method.

I really hope I haven’t confused you, I am horrible at explanations. :confused:

Will do, I’ll post an update this weekend.

1 Like

Since all IFTTT is doing is calling the CoRE endpoint URL, is it possible to call the endpoint URL directly or is there an authentication between IFTTT and CoRE that I missed?

1 Like

So I just did a simple test of the IFTTT integration using the following scenario:

If every day at 7:45 PM, then make a web request

My piston was a Basic piston that was:

If IFTTT event “ifttt_test” was executed
Then send SMS notification

I received the SMS notification within seconds of the IFTTT recipe running.

So I would say the response time was pretty good.


So I just ran another test at a different time and I actually got the SMS notification from my piston before I got the IFTTT notification that the recipe ran.