[SHARE] CoRE - show & tell all about Pistons

In this scenario,

Stays vs Wait…
Is like
Peace Pipe vs Crack Pipe…

Same Thing. :joy:

So Stays will “Cancel the Piston” if the Stay period changes within the degsignates time frame…

Same thing as “Wait” with “Cancel on Piston State Change”…

Just one takes more steps to write the Piston.

The only Issue I see with your logic is that if three people are home and one leaves the door locks. Right? For my Piston, I figure if people are home and the door is unlocked that there might be a reason for that. Of course I think that’s just a matter of preference. I could totally see that you want the door to always be locked, so when anyone leaves make sure to lock the door in case they forgot.

Keys? WTH are those?!

Yeah, I even have a piston to say, if the door stays unlocked for 15 minutes without the door contact sensor opening then Lock and then speak through an Echo, “Guys, Remember to Lock the Doors”

In case someone gets locked out, then everyone has there own code to get back in and of course it tells me who.

Also have a Piston(s) to:

Don’t Lock the Door if Door is Open
Lock the Door if Alarm System is Armed
Turn on Porch Light if Door is Unlock during a specified time
Flash All Lights and Turn on Alarm System if a wrong code is entered thrice (Siren if Armed)
If Door Stays Opened too long then Push Notification, "Close “X” Door"
If Door Opens and Closes 3 times within 5 minutes Shut HVAC off until door remains closed for 10 minutes

He he, only keys I had for a few years now… forgot how the home keys look like…

1 Like

Nice. I also don’t carry keys anymore. Ha Ha. I will say that I don’t auto lock my doors though, other than when Goodbye or Goodnight routines run.Of course different strokes for different folks. :slight_smile:

1 Like

How did you setup the variable?

When adding actions, go to Location. Then add tasks. You’ll find SET VARIABLE in the task list.

Case Study - NightlightPro
Demonstrates a handoff of timers between two motion sensors. Some may term this a cascade or a flip. Each motion sensor will change the others timers giving the effect of a cascade from one sensor to the other. This example will demonstrate the use of 2 variables along with switch and case statements.

Simple Example 1 - Hello World
This example will demonstrate the use of Variables. A motion sensor will trigger the Send Push Notification a variable containing text.

Curious if anyone has a good way to setup the following trigger event to truly tell when I left the house

If JB presence changes to Away AND JB virtual switch changes to off within a specified time of each other

Thence mode away.

Any ideas

Is the purpose of your virtual switch to be a “second” presence detector?

Something like this? Although as I was plugging it in, I thought afterwards I might have it backwards. Do the switch 1st, then check presence?

That may work because I could then group the condition

(if phone changes and if (switch is off AND switch changed in last 3 minutes)) OR (switch is off and if (iPhone is away and iPhone changed to away in the last 3 minutes)).

I will try that one and report back.

Could someone maybe tell me how to set up a simple Play/Pause piston for Core. I am simply trying to use one button that will toggle play or pause for music.


1 Like

Over on CoRE Variables 101

Case Study - Revolving Counter

A Turnstile Example

1 Like

Case Study - Flash Lights For Approximate Time

Case Study - Buglight (Capture and Restore State)

This piston is useful where you have flying insects that are drawn to light. It will dim the lights down to 10% while the door contact is open, then restore the lights to their original levels. This piston will demonstrate the use of capturing and restoring states of lights.

1 sensor
At least 1 bulb

Before starting, set for expert mode: Settings->ExpertFeatures turn ON Expert Mode

Piston Mode: Basic


I’m digging the various pistons you’re posting, good stuff to learn from!

I’m happy I can share knowledge. Thank you.