CoRE - Get peer assistance here with setting up Pistons

Either go to the piston’s own Local Variables page and add one from there or add the action first, when you get to enter the variable name in the Set variable task, it will automatically be added to the list and you will be able to select it in the IF.

Fair point.

I don’t personally use conditions very much to fire off pistons, more as an OR or AND to a trigger. Also, I have had issues with fast conditions changes working well, like a button is pushed condition.

I appreciate all the helpful people here.
The attached statement works as its supposed to. I get a notification if the contact is open for more than one minute.
I want the 2nd part to notify me that the door has been closed. but only in response to “Front Door stays open 1 minute”
I haved tried several different settings and either i dont get a notification, or it notifies me every time the door is closed, even if just open for a second.

I’m not sure I get it. I was able to add the local variable and for the purpose of testing this logic, I copied yours exactly.

The lights turn on when motion is detected and the switch was not already manually turned on.
The lights turn off when no motion is detected.

Finally to test, I turned on the switch manually, triggered the motion sensor, when the sensor became in-active the lights turned off.

You missed the last set variable in the but if action. The one that sets the variable to false, resetting the cycle…

1 Like

Well, I’m not sure that it’s working. The expected result on the receiving end is not happening and I don’t see anything in the logs to indicate the content of the message. Any way to audit this?

Also, if I create a variable “entity_id” and then set it to “scene.bedtime” … what happens when I want to make another call to a different scene. Do I start the automation with something that changes “entity_id” variable to “scene.getsome” and then makes the web request?

Dang! It works! haha thank you very much for the help.

1 Like

You set the variable right before the request? :wink:

Now that I am going deeper down the rabbit hole… is there a way to create global variables that can be set by pistons? For example; I’d like to create a variable for “House Cleaners” so certain pistons don’t fire when this variable is set.

Sure, again, just enter it in a Set Variable task (make sure its name starts with @ to make it global) or go to the main CoRE app and add it there in the Global Variables page. Either way will have the same effect. Once the variable created (either by running the piston that sets it, or by manually adding it to the list), the variable will show up in the select lists throughout all the pistons.

I’m still failing at this. I set the automation to trigger if a button is pressed. I assumed I wanted “changed to” rather than “is”.

For the action, I set the variable “entity_id” to string variable “scene.bedtime”. Then make the web request. I see the button press happening in live logging but I don’t see any thing else happening. Here’s the log:

b8ed92b1-86c0-431f-a6ac-0fda8a660fc2 4:58:12 PM: debug Parse returned [name:button, value:pushed, data:[buttonNumber:3], descriptionText:Garage Light Tap-Up-2 (button 3) pressed, isStateChange:true, type:physical, displayed:true, linkText:Garage Light]
b8ed92b1-86c0-431f-a6ac-0fda8a660fc2 4:58:12 PM: debug sceneNumber: 1 keyAttributes: 3
I am not able to get action one to work. The load attribute part does not trigger. I noticed that the 20th Dec version should have fixed a bug. Has anybody been able to get this to work, are there any work arounds.

Well after two hours of setup, I’ve got it all setup and working. Thanks again for the help.

1 Like

Can’t wait! That will make it easier. How about importing and exporting pistons? That would make sharing awesome

1 Like

Yep. That is planned as well.

You can see what he’s planning and where he’s at in the process here…

1 Like

Need help with some CoRE logic …

For the first time I am wanting to combine actions based on both a contact sensor and a motion sensor. Here’s my requirement:

  1. Turn on pantry light if pantry door contact sensor is open.
  2. Turn off pantry light if pantry door contact sensor is closed.
  3. Turn off pantry light if no motion detected on the kitchen motion sensor for n minutes AND pantry door is still open.
  4. Turn pantry light on if motion detected in the kitchen and the pantry door contact sensor is open.

Can someone give me some guidance how to accomplish this in CoRE.


In the “THEN” section, trying to set a global variable equal to a local variable. I tried setting my variable to “…or variable value…” and select my local variable. It shows what my local variable is currently set to, but the result is this:

I want to set {@AbodeMode} = {newMode}

How do I do that?


I’m looking for simple piston help. I’ve read through these but there are so many variations (which is what I love about this app).

I simply want to turn on a couple of lights when any one of my three presence sensors changes to present.
IF its after sunset AND also IF no other presence sensors are “Present”

Basically 1st person home after sunset will have lights turned on. If someone is already home, then don’t do anything.

Give this a try, substitute your devices for my simulated ones.

1 Like

You can try:


  • Time is between sunset and sunrise
  • AND
  • Any of presence1, presence2, or presence3 is present
  • USING lights (state change only)
    -> turn on