CoRE and Piston Rules Engine, first design steps

Yeah, I actually got it working already with Tasker calling the Url. Thanks. Regarding IFTTT, I read that it has some trigger delay anyway so that would not be nice.

Much thanks for this app gentlemen, CoRE is the best rule engine i saw on any smarthome controller out there. Invaluable when testing device handlers.

Hopefully someone can give me some suggestions. I want to get CoRE to turn off a set of lights if two motion sensors both haven’t been triggered within 15 minutes. I’ve simplified the logic to only look at the motion sensors but I potentially want to make the conditions more complex but this needs to work first.

In this configuration it appears to work until the Stays fire, if you look in the “BUT IF” section they both count down (different count downs) however once the first stay gets to 0 it fires and evaluates true but as soon as the second one evaluates the first stay is no longer evaluated true and goes false. The screen shot is after both stays have completed.

Hopefully this makes sense, I’m not sure whether this is by design or a bug. Given the Kitchen sensor is still inactive I want the “When True” condition to fire.

Avoid using two triggers (full circle) in same condition, try using “was inactive” instead, test if it works for your application.

I would do a Basic Piston with the following rule

If “All” (pick the motion sensors) “Stays” inactive for 15 minutes
Then using (pick the lights) Turn Off

I know it seems too simple but the “stays” is a trigger that will constantly evaluate the “If”
So if all motion sensors stays inactive
(once true) then


Using two triggers will yield a false state majority of the time so be careful there. The wiki explains this well.
http://thingsthataresmart.wiki/index.php?title=CoRE

Thanks I think you are right about keeping it simple. There is one problem the “Stays” trigger does not seem to allow ALL evaluations, it automatically changes to ANY when selected. This won’t work for me because if either are triggered I don’t want the lights to switch off.

The wiki links explains what it is going on so thanks for that, I’ll have a play with a few more combinations.

Aww you are right! Try “Was” inactive or “Was Not” active for at least 15 minutes. Never knew that the above was not an option.

Either of these should work


I have a similar question.
I try to setup the following and it worked sometimes in the past. But currently not.
I have a door contact at the backyard door and I want to switch of the HVAC after the door is open for 5 minutes. I set up the following piston but unfortunately it fires at once every time I open the door. No idea what’s going wrong. The status or the simulation gives back a false status, but the HVAC switched off immediately if I open the door. I tried it with “door stays open for at least” or “door was open for at least 5 min”.

Any ideas?

Should be just “Stays” open for “X” minutes.

Everyone wants to use “stays” when there really is a much simpler way to do this


Pay attention to the but if
 If there is motion on any sensor the lights stay on. All have to be off for 3 minutes
 If any of them trigger again in that time, the timer resets
 And there is only one timer.

2 Likes

The fewer timers required, the better!

2 Likes

That’s why I do mine like this
 Work great

2 Likes

New to CoRE here, where do I find this Logic Test screen? As in how do I navigate through CoRE to it, I’ve been poking away at everything possible in my one piston trying to locate that screen!

Do you mean the dashboard?
If so, it is at the top when you open CoRE.
You need to go into the ide and select the app.
Then enable OAuth first for it to work.

Hi, I’m new to the community. Sorry if this is the wrong thread for this question. I have core up and running (pretty awesome by the way. I love how I can customize everything!). I’ve just installed nest manager 4.3.1. I’m trying to get core to change my nest presence or thermostat from away to home. Away is easy, there is a setting specifically for away. I’m trying to set up a “vacation mode” that would include setting the thermostat to away. But when I turn it off of vacation mode, I can’t seem to find a way to switch the thermostat mode. There is no “home” setting like there is an “away” setting. I’ve tried changing modes, changing presence, and changing to present. Nothing seems to work. Any ideas on how I could use a piston for this automation? I’ve tried searching through all the forums. Some people mention this capability, but do not specify how to do it. I’ve seen some posts say that it may not be possible, as this function depnds on the presence sensor (motion) in the nest thermostat itself. Any thoughts? Thanks in advance.

Nevermind about the above post. I got a reply from the developer of nest manager.

For those who were struggling with the same thing, You can automate the away and home modes of the thermostat through the nest manager app itself.

Hi all,

I am trying to use CoRe with Zooz 4-1 luminance sensor to control lights. Any details how what is the luminance range to be used? On another application, i am able to use 0-100% as shown by the DH tile and it works. I am trying for “If Illummance level is < 15%”, condition. But for CoRe, what ever number I give, CoRe determines it is true (0 - 100000). Any idea what I am doing wrong?

Hoping someone can help, I seem to be having trouble getting CoRE to turn off devices that do not accurately show the correct “state” in SmartThings, does anyone know how to force something OFF/ON regardless of what the state says?

Here are some more details, I have a device handler that controls Insteon devices (a ton of two-wire dimmers), it’s essentially a bridge. It flawlessly turns lights on/off via SmartThings. However, the state is not reported to SmartThings accurately, IE: If I manually hit a switch, it does not show as “on/off” in SmartThings.

After finding some of my CoRE routines unreliable, I’ve figured out that CoRE will ONLY turn something OFF if it thinks it’s ON. I cannot find a way for the life of me to force CoRE to turn something off. The good news is, I’ve found that the Smart Light app DOES force things off no matter what the state is. That said, I really want to be able to use the power of CoRE.

Thoughts? Suggestions? Really appreciate the help.

Disable optimizations on those Pistons.

Just fot clarity as I couldn’t find this to start with.
It’s on the first page of your piston under advanced options.