CoRE - Get peer assistance here with setting up Pistons

I’m thinking it should be combined into one piston… Give me a bit and I’ll figure it out.

When you have a piston subscribed to a device, and the device status changes, the piston will evaluate again. I actually just did this with my bedroom and wake up pistons. Added a light in one that had already been in the other and it started turning off on me unexpectedly.

I’m sure Jason will give an example with a variable, or something even more complex. Put on your learning hats!

And it is a very good idea to try and keep one device per piston if at all possible to avoid these kinds of issues.

1 Like

This is key!

1 Like

Thanks guys! I appreciate the help and guidance. I was also trying to see how to incorporate it into one piston. The times make it more difficult. But this is why we like CoRE!:slight_smile:

Just goofing around with Core and see others are using the “when true” condition to perform actions. Can someone point me in the right direction to setup a sample piston? Thank you.

Samples are here…https://community.smartthings.com/t/share-core-show-tell-all-about-pistons/50255/38

If I’m remembering correctly from my experimenting yesterday “When true” is under individual actions in the conditions screen.

2 Likes

Yes, that is true. There are also samples here…http://thingsthataresmart.wiki/index.php?title=CoREsamples
My understanding is that you can use a WHEN TRUE or a THEN in the same context. Sometimes using WHEN TRUE just to keep the piston shorter. Sometimes when there are multiple conditions a WHEN TRUE may be used for one condition but not another condition.

Oh Wow look at this! I have not seen this before. Thanks you so much, my weekend will be busy! Thanks everyone.

1 Like

Exactly what I ended up doing–I have multiple OR conditions that need to trigger different things, depending on the conditions, so the “when true” actions live in the conditions rather than under THEN for the condition.

1 Like

Is there a setting that I need to turn on to get the When True in the Conditional settings. I tried to recreate one of the examples and I still can see the When True action under conditions.

Enable expert mode under settings on the first CoRE page.

1 Like

Enable Advanced Settings. It might be called Expert Settings.

1 Like

Thanks all

Hey ya’ll!

I’ve got two pistons I use to keep my third-car garage closed after the kids open it to get out a bike. What I want to do is:

  • Attempt to close the door after 5 minutes
  • Continually try to close it every minute thereafter (and push a notification) if closing wasn’t successful.

Here’s what I have. Anybody have any ideas on how I could combine them into one piston?

Wait, Simon, I steered you wrong. The piston doens’t work properly. :frowning:
We had it turned off for awhile due to a sensor issue and now it doesn’t seem to work. In fact, it seems to shut the lights off when there is movement instead. Maybe it never worked.

Can anyone help with why my logic is wrong with this? Instead of turning off the lights when there has been no motion on any sensor for 60 min, it seems to turn them off when motion is sensed.
I have also tried Was Inactive and Was Not Active - For at least 60 min.

I really want this to work as I want to use a similar condition/trigger for my other lighting at my bar. Right now that waits for Motion to go Inactive, wait 1 min then turn off. But since the motion refresh is quick, it keeps going off while I’m still fiddling in there once and awhile. I want it to determine where there has been no motion for X time and then start its countdown.

Thanks!!

I use two pistons but that includes opening and closing. Maybe this will give some ideas? The close piston will keep trying until it’s closed.


Anyone who has RGB/W bulbs willing to try something for me?

I am having an issue in CoRE. When I attempt to use setColorTemperature and pass a value like 2750 or 5000, the call only takes place IF the bulb was previously was already a shade of white.

Steps to Reproduce
1 - setColor(Blue)

wait

2 - setColorTemperature(5000)

wait, nothing will happen

3 - setColor(Warm White)

wait, light will change to warm white

4 - setColorTemperature(5000)

wait, light will adjust to 5000K.

I have some Hues I set to red when an outside door/gate opens, then reverts back to white using setTemperature. Hues directly connected to ST.

hmm… it might be my DH, let me dig into it a bit more.