SmartThings Community

CoRE - Party mode pistons

(rwcrowe) #1

Anyone mind posting their pistons ? I am trying to build one that changes colors ever x seconds, and then repeats. I am having a problem with the repeat.

-Capture state of attributes [hue, color, colorTemperature, level, saturation, switch] to local store
-Turn on
-Set level to 90%
-Set color to “Random”
-Flash 500ms/500ms for 2 time(s)
-Set color to “Random”
-Flash 500ms/500ms for 2 time(s)

(Robin) #2

Here is an example colour loop (red / green)… You can put anything in the loop though, just have the last action execute the same piston at the end to restart the loop.

(Robin) #3

This is one I use a lot for random colour changes every 4 seconds:

(rwcrowe) #4

Thanks Robin. I notice in the post you liked, you mentioned you had it as a latching piston. Is that the case ? Also do you you have “plain english” explanation of the Latching piston ? That is the last type that I dont understand :slight_smile:


There is a peer assistance thread specifically for this kind of question. Just add your question to the end of that and people will be glad to help.

(Robin) #6

Only needs to be a latching piston if you want the ‘but if’ part to turn off the light when trigger switch is turned off.

The random colour example above uses a basic piston.

From the CoRE wiki:


This is the most complex piston in CoRE. It acts as a bi-stable (or flip-flop), flipping it’s state based on two independent conditional sets.

IF (conditions1) THEN (actions1) BUT IF (conditions2) THEN (actions2)
The state of the latching piston is a bit more complex. It only changes under certain circumstances. It will change to FALSE when and only if it is TRUE and (conditions2) is true. It will change to TRUE when and only if it is :FALSE and (conditions1) is true. If both (conditions1) and (conditions2) are true, the state flips. If neither of (conditions1) nor (conditions2) is true, the state remains unchanged.
The (actions1) are executed if (conditions1) is true, (actions2) are executed if (conditions2) is true

(Robin) #7

I should add that when building a new piston, you cannot immediately set an action for that Piston to execute itself, it won’t appear in the list of available Pistons at first.

You need to name the piston then click done to go back to the main CoRE menu (this updates the list of Pistons) you can then go back into the piston and select execute piston X under the ‘then’ actions.