CoRE - Get peer assistance here with setting up Pistons

@JcMarin … yet is the key word here!!!

1 Like

Hello all,

So I’m trying to make a Mode watchdog piston. I feel that too often my presence coming and going is not triggering the Routines that set my house’s mode which is causing my lights to stay or AC to be set low costing $$$. Here’s a screenshot of my Piston that I tried to create, I probably just messed up my OOP if someone could take a look that’d be sweet.

I wish I could drag logic around the IF THEN ELSE levels in the Web UI. I hate being trapped in a phone to setup complex automation.


I’m trying to set up a piston to do the following but I cannot seem to find the necessary conditions etc. to do it.

Mode Changes from away to home then if in the next 10 minutes there is motion in the hall, speak some text.

I’ve had a good rummage around the various piston types to no avail.
Any guidance/suggestions much appreciated.

Hey Keith, ST is all about events. Why poll? :slight_smile: Try this latching piston:

  Any of XXXXXX Nexus or Keith Nexus presence changes to present >>> when true >>> Send PUSH Notification "{$currentEventValue} has arrived home :)"
  Time is between 10:30am and 10:30pm (this makes sure mode is set to Home only during these hours)
  Location mode is not "Home"
  Using location...
     Set location mode to "Home"
     Send PUSH Notification "Switching house to mode Home"

  Each of XXXXXX Nexus or Keith Nexus presence is not present
  Location mode is not "Away"
  Using location...
     Set location mode to "Away"
     Send PUSH Notification "Switching house to mode Away"

How does that work?

1 Like

I’ll give it a shot. Thanks for the response. Can’t wait for that import functionality. :wink:

Keep fighting the good fight. Together we can make SmartThings more than useless!


what i am trying to do is turn a light on a random color at sunset by fading it from “0%” to 30%.

So setting hue and saturation won’t help me correct? It’s a lightify rgb flex strip.


@bamarayne said I should first set the level to zero.

Set color always sets the level as well. So you’re asking the device a lot of things. Let me think.

I still can’t get my capture/restore of a bulb to work with my Phillips hue color bulbs.

Let me start by saying that CoRE is absolutely awesome. It’s the coolest thing I saw on ST platform since I got my hub a month ago. Its extremely powerful, reasonably easy to use, and very reliable even being an early alpha.

My question: what’s the best approach to have a time-driven rule? Something like “At 3 PM every day, check if outside temperature is above 90 and if yes, turn on a switch for 1 hr”.



I assume the above cannot be done.

Would a Then-If piston work

If mode changes to home

Then do nothing

Then if motion sensor changes in next 10 minutes

Then do message

   Time trigger happens at 3pm, every day
   Outside Sensor temperature is greather than 90
   Using Switch
      > Turn on
      > Wait 1 hour
      > Turn off

Thanks, but I can’t find the Time trigger. Is it “Date/time” capability, “happens at” comparison?

1 Like

Yep that’s the one

@ady624 @Jonpho
I have had a reply from @ady624 and he suggested the following.

You can use a variable.

Mode changes to Home
Using location…
Set Variable ahoy = 1
Wait 10 minutes
Set Variable ahoy = 0

Motion changes to active
Variable ahoy is equal to 1

Using speaker…
Speak text ‘whatever’

Tried it and it works perfectly.
You are a star.


Looks good! I need to get used to thinking about variables. I’m having issues with variables in one of my Pistons so still wanting to get that sorted before I utilise more

Anybody want to chime in why this might not have worked. My presence sensors left this morning but there was still motion on at least two of the sensors. Yet away mode was activated.

Also, what is the little count down timer on the right for? If its a counter for the 10 minutes of no motion, its not resetting when motion is detected.

You’ve got the stays all wrong. Since you are using multiple devices, each sets a 10 min timer and each reach the 10 min mark on their own terms. Every time one reaches the 10 min, you get an evaluation as true, thus the “not working”. If your goal is to set mode to away ten minutes after everyone left and no motion is active, consider having two plain conditions (presence not present) and (motion not active). On the then, simply add a wait 10 min, set mode to Away, cancel on state change.

Thanks! I’ll find out if this works at scheduled time :slight_smile: