Random Hue app

This is an app I wrote for SmartThings that can change the color of lights on a schedule. It was inspired by Garden Hue which did not quite do what I wanted, but did get me to learn some Groovy and the IDE.

Note: I have migrated off the SmartThings platform so this code is no longer developed. It has worked well for me for the last year, but I am putting this out there as is in the hopes someone else is interested and can use it, or continue development.


Colors can change on a schedule from 1 minute to 3 hours. Note: It seems like recent changes to the SmartThings cloud may have made 1 minute actually run every 5 minutes.

It has 3 color changing modes:

  • Random
  • From list (select from built-in list of colors that can be used)
  • Incremental (walk the H portion of the HSV scale)

Lights can be controlled individually, or as a group (all change at the same time).

Start/Stop times can be absolute or relative to Sunrise/Sunset (with optional offset).



About once a month, usually coinciding with platform issues it would fail to start at night. Opening the app and re-saving the same config got it working again.