CoRE - Get peer assistance here with setting up Pistons

Thanks Mike. This example gave me an idea on how to play with the variables. I tried to create a logic to capture the temperature from the sensors and then update the thermostat’s heating setpoint by 2 degrees if the logic evaluates to true.

I see an issue where loading the heating setpoint attribute from a variable does not seem to work. Please find the example attached.

Tagging @ady624 in case he has seen this issue

Where is the variable activenow set? If it’s in another piston you’ll need to make it global @activenow

What does that do? And how do you set it up?

Thanks

I seem to have issues with motion/no motion pistons. I believe they are set up right because they work about 80% of the time, but the other 20% the lights don’t turn off after the scheduled delay with no motion. Is there any type of additional fail safe that you build in to make sure the light doesn’t stay on?

I have a few of these and always activate TCP for them.
Have you got it active in yours?

No, because I don’t know what it is used for and how it works. Not sure how to activate it as well.

John,

When creating a Piston Action, scroll all the way to the bottom… You will see “Task Cancellation Policy” (TCP). Click on that, and you will see the various ways to abort the processing of the piston:

  • Piston State Chnage

  • Condition State Change

  • Condition OR Piston State Change

  • Nate

Ok, cool. Thanks @AnoProp. So, I guess I don’t understand why @dwolfenbarger has the TCP activated in his example above when the light is not shutting off until there is 8 minutes of no activity. Wouldn’t that be enough for the piston to run correctly?

He’s resetting the timer back to zero minutes when TCP is activated.

OK, I added a TCP to cancel the off action on condition state change. Does that make sense?

Sorry for not responding sooner… @eibyer beat me to the answer. Using TCP to essentially reset the task in the event someone starts moving again. With this I’ve been able to set the Zooz sensors at a 5 minute time-out, hit the wait period and reset if anyone moves. So far no more false positives on any of the sensors.

Before I had the Zooz sensors set to something insanely high- 30 or 45 minutes to keep the bathroom lights from going off when someone was taking a shower. It would still click off at the end of the 30 - 45 minutes, go inactive and massive hand waving was required to get the transition back to active. Didn’t win me any points with the GF. :slight_smile:

I’m following up to see if anyone knows how to control light on/off from a variable. I tried looking for examples, but couldn’t find any specifically for using a variable for on/off.I tried messing with my piston a bunch yesterday and couldn’t get it working.

I posted the description and current piston here: CoRE and Piston Rules Engine, first design steps

I’m still confused. Wouldn’t the motion reset the piston as it is “stays inactive for 8 minutes”?

Yes, motion would reset the motion sensor… but it would not reset the countdown timer that turns the lights off in 8 minutes.

so, if you walk out of the room the timer starts counting down from 8 minutes. If you walk back in at the 7 minute mark, the motion sensor resets, but the lights will turn off in one minute (minute 8).

Turn on “Cancel with piston state change” and the timer is reset every time the motion is reset. Therefore you can actually set the timer for 2 minutes and not waste 6 minutes of electricity. the lights stay on while you’re in the room.

1 Like

Hi everyone. I’m new to ST after moving house where I’d had a pretty extensive X10 setup. So far I’m enjoying how flexible and reliable ST is by comparison. After a bit of fiddling and a lot of reading I’ve discovered that some SmartApps are rather flaky so I’ve opted to use CoRE to do pretty much everything I want.

However, I’ve fallen at the first hurdle with what should be a very basic piston. I use a routine to put the house into “Asleep” mode and then want a motion sensor to turn on a Hue bulb in a red colour with low level.

But this doesn’t trigger.

I then wanted to use the same bulb to brighten gradually when I set the mode to “Home” using my “Good Morning” routine and switch off again after 30 mins if there’s no motion.

So I’ve obviously misunderstood something about modes as triggers and motion sensors somewhere.

Can someone steer me in the right direction?

So maybe “stays” means something different than I thought.

I thought it meant the motion sensor had to stay inactive for the full 8 minutes. It sounds like what it means is if at the 8 minute mark, reguardless if it detected motion between 0 and 8 minutes if it is inactive at the 8 minute mark the action will execute.

Is that right?

Hi,

Can anyone help me understand how I can successfully stop a previously started lamp fade? The example piston I’ve included (image) is a pruned down example so I can get the basics down. To my understanding there are at least a couple of ways to cancel a scheduled action: cancel on piston state change and setting a device to a new state i.e. turn off a lamp that is involved in a scheduled action. I’ve tried both and the lamp merrily dims up irrespective of the switch being turned off.

Any ideas?

@ady624 is cancelling a fade possible? Should it be?

The bedroom night piston looks like it should work as you have it set. I would put the wait in the same sequence as the set level and color but it should work the same as it is.

Regarding the Fade to, I’ve never had much luck with it so I don’t use. It may have something to do with the type of bulbs being used, not sure, I didn’t really pursue it that much.

I thought that i had a piston that did this same thing. But apparently im using smart lighting for this.
It works great for very simple things like this.
But Core is much more powerful.
I Sugest starting with just one trigger and one action then add to it you may need to try a different aproch

Does anyone know how the track URL works with a Sonos rule?
Trying to play a song on a speaker but my Track URL doesn’t seem to be working.

Also, is there backup file somewhere with a detailed layout of what we currently have as pistons/rules?
I was thinking that if we lost CoRE for some reason, considering how “stable” ST is, it would suck to have to recreate all this from scratch.