Cycle manually run routines (scenes) on button press?

Anyone knows how I can cycle through a set of routines on for exemple a button press? For example press button activates routine1, and the next press activate routine2 and so on.

1 Like

There are two kinds of Routines in SmartThings:

  1. Routines that include a trigger like when a button is pressed or at a certain time

  2. Routines that are run ā€œmanuallyā€, which used to be called Scenes and still are in some spots.

Routines with triggers canā€™t, to my knowledge be ā€œcalledā€ from anything. They run when youā€™ve defined them to run.

SmartThings will let you trigger no more than one ā€œmanually run routineā€ from a regular routine.

Alexa routines can run a sequence of ā€œscenesā€ with optional time delay between each one. Iā€™ve used this for years. I donā€™t know if you can trigger an Alexa routine with a button, Iā€™ve only done it with voice commands.

1 Like

Ok, I meant a manually run routine(scene). So itā€™s not possible to do this from the smartthings app or Sharptools? I know itā€™s possible in other platforms, for example Philips Hue.

You could add a virtual switch. For press ā€œ1ā€ youā€™d have a precondition on the virtual that it is off. When you do press ā€œ1ā€, it also sets the virtual to on. For press ā€œ2ā€ youā€™d have a precondition that the virtual is on. When you execute press ā€œ2ā€, set the virtual to off.

Looks like someone get me to the bunchā€¦

Iā€™m also thinking that ā€˜cascading Routinesā€™ would depend on the Action(s) of each button press and if the Action(s) from each button press can be used as precondition(s) for the subsequent Routines button presses.

On and Off round robin thought for cascading Routines.

If precondition device 1, device 2, and device 3 are Off and Button pressed, then turn On Device 1.

If precondition device 1 is On, and device 2 and device 3 are Off and Button pressed, then turn On Device 2.

If precondition device 1 and device 2 are On, and device 3 is Off and Button pressed, then turn On Device 3.

If precondition device 1, device 2, and device 3 are On and Button pressed, then turn Off Device 1, Device 2, and Device 3.

Also, @Mariano_Colmenarejo has a virtual driver that provides virtual switchboard, text fields, and number fields that Iā€™m thinking might make for an interesting project to be used for cascading Routines.

1 Like

SmartThings: no (other than by complicated chaining and extra virtual devices)

Sharptools Rules Engine can invoke a series of ā€œscenesā€ with delays and/or conditional logic interspersed.

1 Like

Found this one: Edge device for tracking time duration or count - Devices & Integrations / Community Created Device Types - SmartThings Community

The counter is perfect for this I think.

1 Like

It is! Counters are super useful. Iā€™ve published a scene-switching oriented one that allows multiple cycle modes, even automatic! Youā€™ll be able to delete the two routines to reset the counter when it reaches the end :smiley:

3 Likes