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: