Dimming Slowly... every 5 minutes

Have fun with it (20 chars)

Or you could just use Lights & Switches, if that makes more sense. You use the trigger as the device, and “Turn on using a schedule”.

1 Like

I ended up using Hello and it works perfectly and I learned a lot in the process. THANK YOU so much for all your help :smile:

I wanted to use this to also make a nice movie dimmer… You know how when u start movies the lights dont dim instantly… They take a minute or two. So I changed the runin every 10 seconds so that I can dim lights in about 2 minutes… But looks like run in doesn’t like to work with short intervals :slight_smile: I also tried dimOnce but no luck with short intervals.
It also seems that even the older code where it does every 60 seconds… It taking longer than that. If I want to dim in 30 minutes it seems its taking about double that.

It still works for what I want it but thought I would not it…


The app uses runIn(), which generally does not work for times of less than 60 seconds. Also, even when set for 60 seconds, it’s approximate at best. There is also a rounding issue in this app, because it’s dividing the dimLevel by the amount of time to take, and rounding down. So if, for example, one specified 30 minutes to dim from 59%, it would take close to twice as long to fully dim. For most situations, the round off doesn’t matter, but you can certainly get situations where it does.

Thanks. That’s what I thought…

HaHa!! The challenge for the reader: Fix the app so the round-off doesn’t have such an impact. Not hard to do…

I am looking to do the same thing but i just started with smartthings yesterday. can you give me an example of how i could use the Hello Home to start this at a specific time. Thank you

Hello Home is now called Routines. The app has a selection you make for a “trigger” switch, which is a Momentary Button Tile.

So, first, you have to create a Momentary Button Tile using the IDE (https://graph.api.smartthings.com), in My Devices, New Device. You have to give it a name, an address (just make up 4 digit number), and Type (Momentary Button Tile).

Then you link that button into the app. In the Routine, you simply Turn On that button. That will fire the app to do what you asked it to.

In the Routine setup there is an option to “Automatically perform …” “At a specific time” … That’s how you get this to fire at a specific time.

You can always send a Private Message to me if you get stuck, and I’ll help…

Thankyou. i was able to get that setup but unfortunately it is not working. Any chance that script doesn’t work fordimming GE bulbs directly?

Not that I’m aware of. It should work with any dimmer.

Yes this does work. I deleted everything and re-setup and it is working. Thank you

1 Like

Could I use this to dim over several hours for an aquarium? Also, could it be tweaked to run in reverse to ramp up the lights?

The answer to the first question is, yes. Just input the time in minutes, say 300 for 5 hours, and you’re good. I don’t think it will run in reverse the way it is, but I could do that in a minute or two if you actually want it. :grinning:

Here is the app to do the slow raise, parallel to the first one above:

You just install both of them if you want both slow dim and slow raise.

Thank you. I appreciate all the help you offer the ST community. If you have a donation site, let me know. You have just increased my enjoyment of ST 10 fold.

I’m glad this helps you! BTW, I updated the first one above, fixing the rounding errors it had. So, you may want to grab that one again.

Hi @bravenel,

I have a button controller that handles hold states by issuing a command when the button hold starts, and when it is released.

I am trying to make a smartapp that can handle dimming up or down, continuously (say every x seconds) starting when the button hold starts and ending when the button hold ends.

Do you think it would be possible to use this code as a start for this?

Hi Bruce, i was wondering if there is a chance that you could modify your app a bit so its possible to lets say increment the brightness with xx% for every push on a button and same way dimm? I’d love to do it myself, but i havent had time to get my head around the programming yet.

I’ve got my self one of those Xiaomi Magic Cubes and would like to control brightnes of some of my lights by rotating it left or right (basically temporary push buttons)

thanks! :slight_smile:

Hi Bruce,

I am stuck on how to trigger the smartapp at a particular time.

  • was able to create the smartapp, and configure with the dimmer
  • was able to create the momentary button and link with the smartapp

However, in setting up the routine I could not find how to link it to the smartapp or the momentary button.

Any help appreciated.