How to create a complex automation to rotate through colors for specific time periods?

I may have screwed up coming back to SmartThings from Hubitat. I’m hoping you guys can help me out though because I 100% prefer the SmartThings app to any other dashboard, etc. out there.

I had an automation in Hubitat so when my kid double tapped the on button on the shower light, a hue lightbulb would start out White for 1min, then switch to Green for 7min, then Yellow 1min, then Red 1min, then it would fade to off over the next minute. So an 11 min routine total.

Is it possible to recreate this in SmartThings? I’ve looked through Routines and Scenes and it seems they’re not complex enough. SharpTools seems to be missing the buttons that are available on my Inovelli Red Switch, so that’s not helpful.

Any ideas?

A routine for each step where the action of the previous step causes the next action with the appropriate time delay. Make sense?

1 Like

I can think of a couple ways to do it, but all are clunky, so hopefully someone will know of a better method. Maybe with the new rules API? I don’t know very much about that.

Anyway, for what it’s worth…

  1. as @JimB71 mentioned, you could daisychain multiple routines together. One routine for each color change. Probably the easiest way to do this would be with Virtual Switches.

Routine a: if button is pressed, turn light on white. Wait one minute, then turn on virtual switch A.

Routine b: if virtual switch a turns on, turn light on green and turn virtual switch an off. (Or you could use a momentary device for virtual switch a. In any case, we want it to turn off again, so that it will be available the next time the button is pressed) wait seven minutes and turn virtual switch b on.

Routine C: if virtual switch B turns on, turn light on yellow, and turn virtual switch b off. Wait one minute and turn virtual switch C on.

Routine D: if virtual switch, C turns on, turn light on red and turn the virtual switch C off. Wait one minute, then activate a scene that fades the light to off.

So…clunky, but should work. And this method has the advantage of being local and entirely within the smartthings ecosystem.

  1. for a somewhat more elegant solution, but cloudbased and requiring multiple ecosystems, create the entire sequence as a “scene playlist“ created in the hue app.

That should work just fine, but the problem is that at present, there’s no way to activate a hue formula from hue labs in SmartThings.

But… you can activate it from Alexa. So you could use an Alexa routine (not a SmartThings routine) to activate the scene playlist. And you would need a virtual device as the if in that routine. And a routine on the smartthings side to actuate that virtual device, so that the Alexa routine would trigger.

Clunky, but doable.

  1. Of course, yet another option would be to just use the Hue scene playlist and add a new physical button in the bathroom that could activate the scene playlist via the hue bridge.

Here’s one example, but there are others.

There is a community-created edge driver that does expose some of the hue compatible buttons to Smartthings now, so you can use those models with both platforms if you want to.

[ST Edge] Philips Hue LAN [BETA]

Like I said, I hope there’s a simpler way than all of these and that someone else will post it. But at least you can get to the desired outcome with one of these methods. :tumbler_glass:

Using RulesAPI you can set color (hue and saturation) multiple times.
Delay can be implemented using sleep function.

You can use multiple actions:

Set new color (hue and saturation)
Sleep X min
Set new color (hue and saturation)
Sleep X min
Set new color (hue and saturation)

3 Likes