CoRE - Get peer assistance here with setting up Pistons

IDepending on how your piston is setup that monitors the SHM state. If it is conditional (empty dot) then you can add a cancel on condition and piston state change to the actions where you have the wait and whatever else.

Also assuming by {xxx} you mean {$currentEventDevice} then yes that variable will be substituted with the name of the device that is currently affecting the condition of the piston.

Give me a screen shot of the current piston

Itā€™s not specifically monitoring the SHM. Itā€™s sending a delayed command to change the SHM to Away when I execute the Goodbye routine. So what Iā€™m trying to do is have it cancel the command to change the SHM mode and arm my alarm and lock my doors if the mode changes back to anything else.

What is sending a delayed command. I can imagine a bunch of different scenarios but it would help you better if I showed you how to modify something you already understand.

Okay so basically my piston does this.

  1. Routine Executed Goodbye (fires piston)

  2. Using Alarm Panel Away:
    a) autobypass
    b) wait 5 minutes
    c) arm away

  3. using locks
    a) wait 5 minutes
    b) lock

  4. using location
    a) wait 5 minutes
    b) set SHM alarm to Armed Away
    c) wait 60 seconds
    d) send push notification ā€œyour house is now armedā€

Iā€™d like to say decide at 2 minutes into the delay that Iā€™m going to stay for another half hour or I forgot to do something and not have my alarm still fire and my notifications trigger and the locks lock me in haha.

Iā€™ll ask the other bit after but first Iā€™d like to sort this out

Iā€™ve been messing with groups and conditions but it doesnā€™t want to play nice with the routine. Iā€™m not sure if itā€™s because the only state is executed and not ā€œchanges toā€ like the SHM option in the CoRE options

Not sure if this is the BEST way, but what I ended up figuring out was to create a follow up piston. The first piston:
If
door contact was open for at least 10 mintues
then
turn thermostat off
follow up with piston ā€œRestore Heat Followupā€ - delay 5 mintues

The second piston:
if
door contact is closed
then
set to heat
else
Follow up with piston ā€œRestore Heat Followupā€ -delay 5 minutes.
done

I havenā€™t had a chance to test it out yet, but it should work. The first piston sees the door is open and shuts the heat off. It then triggers the follow up piston which checks to see if the door is closed, if it isnā€™t it calls itself to run again in 5 minutes. This should cycle until it finds to door closed. Assuming this works, Iā€™ll play around with other attributes to see if I can find something better than just turning it off.

Not sure what happened or if this is not allowed but

I wanted to create an If Else-if piston.

The first If blocked contained a Routine Good Morning! executed condition.

The second Else-If contained a Routine Goodbye! executed condition.

I was able to do the first condition but the second one CoRe did not show any Routines to select from, the selection screen was blank. uploading Screenshot

Quick question about pistons.

I have a piston that says if switch one OR switch Two changes to ON, unlock back door, then wait 30 seconds then turn on another virtual switch. Works great 95% of the time. Switch one turns on when I become present, and Switch two turns on when my wife becomes present. I have multiple presence sensors tied to each of us, and found this worked best for us. Iā€™m not looking to change this to use presence vs switches.

Basically when I come home unlock the door if its locked. When My wife comes home unlock the door. I donā€™t care if one of us are already home and have locked the door, just unlock it. So hereā€™s my question. Lets say my switch turns on, then 15 seconds later her switch turns on. The door has already unlocked, but the 30 second timer for the other virtual switch is still counting down. Will CORE start a second instance of the piston, or will it ignore the change since it is still running, or will it queue it until it finishes, and then start.

Iā€™m asking because once in a while when we come home together, we come in the house, door is unlocked, we lock the door behind us and then 10 seconds later it unlocks again.

The assistance Iā€™m looking for is related more to how CORE works in this situation. Will a piston kick off a second instance of itself it becomes true? What if I had a 30 minute timer? Just curious how I can use this knowledge. :slight_smile: Can you tell a piston not to run if its ran in the past X minutes?

@ady624 [quote=ā€œToy4Rick, post:7698, topic:50187ā€]
Are you sure logging is enabled in the piston? Trace on?
[/quote]

This Piston ran at 4:15am but didnā€™t turn on the light, so I reset it for 7:00 and set the live logging, again no light


Changed it to run at 7:10 with no day restrictions (noticed the second location mode, removed it), light didnā€™t come on


Changed it to run at 7:15 and removed the set location and the light did not come on


Beyond lost
Rick

Iā€™m new to Core almost confusing but I want to be able when I come home or my presence by my phone is detected at sunset my porch light turn on but after 10 min they go off. Can anyone help me with that?

Also at sunset Iā€™d like when I open the front door it turns on porch lights and when close it turns off.

Thanks in advance

Ok, so latching appears to work better than when trueā€¦ thanks.

Ran into one problem with my garage motion lightsā€¦ I have two motion sensors. The first IF says if ā€œanyā€ of the two motion sensors changes to activeā€¦ but on the But IF there is no option to choose between ā€œanyā€ and ā€œallā€ and it defaults to ā€œanyā€. So I have the potential of being in an area that only one sensor ā€œseesā€ and the lights will go off after the other sensor stays inactive for 1 minute. I think I overcame this by creating But IF - AND - with each sensor in either side of the AND. But does beg the question, why we cannot choose ā€œallā€ in the But IF statement.

On another note, is there guidance somewhere that defines the meanings of all of the potential parts and pieces in CoRE? Like whatā€™s the difference between IS and Stays or Changes to or Stays away fromā€¦ surely there must be a guide for that?

Hello Teegray1124,
Here is a simple one to get started.
NOTE:The below will continue to run since your android is presentā€¦ you will need to find a way to only do this once per dayā€¦ cant remember the setting right now

I do not have the door sensors so i could not whip one up for you.
But it would goā€¦
if sunset and door sensor is active then light (Light of choice) set on.
if sunset and door sensor is inactive then (Light of choice) set off
Maybe some of the more experienced users can chime in.
But till then this can get you moving forward.

Good luck

If you were able to choose all sensors stays inactive for 1 minute it would never be true. It has something to do with the timing. It would have to be precise (both expire exactly at the same time) otherwise it would not evaluate as true.

There is indeed a guide to everything about CoRE. It is all located at the wiki here.

Iā€™m trying to get a better idea about the ā€œcomparisonā€ values and how they differ. For example, what is the difference between ā€œisā€ and ā€œchanges toā€?

Iā€™d like to create a Piston to automatically lock a door 15 seconds after the door is closed. So for this, would I make the condition ā€œIf doorSensor is Closedā€ or ā€œIf doorSensor changes to Closedā€? Seems like the latter would make the most sense, but the piston does not trigger with that configuration.

Yeah, Iā€™ve read that wiki many times - even understand most of it. But it would be nice if we had a list of all of the comparisons and what they mean - whatā€™s the difference between changed and changes, etc.

So the real question for me right now, how do I program this:
if either of garage motion sensors is active
turn on garage lights
if neither of garage motion sensors is active for 1 minute
turn off garage lights

Hereā€™s what I have at the moment, it seems to be working, but I suspect there might be a smarter way to make this happen correctly.

@ady624

Any ideas on this?

Rick

Live logging drops log lines if too many. Disable command optimizations?

ā€œIsā€ will be a condition.

ā€œChanges toā€ is a trigger.

I posted a link to the CoRE wiki above that covers conditions and triggers.

Can you post a screenshot of your piston from the dashboard view? I would set up something like this


@DarellCraighead The best way to learn is to just play around with all of them. The difference between changed and changes is time. Changed will give you parameters for how long you want to monitor if something has changed in xx (sec/min/hour). Whereas changes is just anytime the device changes.

Is your example working how you want it too? Unless you want to add some complexity with virtual switches then I would leave it set up as is. At most maybe add a cancel on condition state change to the but if actions. That way if they go away from inactive it will cancel the 1 minute timer and turning off.

Thanks. I believe I was able to get the door lock piston working with this config:

However, another piston isnā€™t working properly. The lights turn on at the right time, but they dont turn off in the morning. Even when I simulate the piston they will turn off, but not automatically for some reason.

Additioanlly, this piston is firing off even after sunrise:

This is pretty basic but I canā€™t figure out the timer part of this.

I want to turn the heat off in my home if the patio door is open for X minutes. How do I set up the timer?