Random Timing? Newbie

Hi all, new here.

One of the main reasons I got the SmartThings hub (a couple of days ago) was to get some lights randomized… found out this morning that there’s a lot of programming involved! Yikes… not happy about that.

However, I’m willing to give it a go, and really, the first thing I want to do basically goes like this:

• Between 8pm and 12pm
•Turn Living Room Lights on for a random time between 10 and 120 minutes
• Turn Living Room Lights off for a random time between 2 and 12 minutes

I am not sure how to search the available Apps to see if there’s something similar to learn from.

Also - I see there are a lot of places I can see examples, but is there a “standard” string of tutorials?

Any help appreciated!


What are you trying to accomplish here? Is this to do something with lights while you are away?

Sounds like you are trying to give your house a lived in look when you are not home?

Look at this app

@johnosstyn thank you I was trying to look for that link. I was going to suggest that if that is what he was trying to do.

1 Like

Wow! Thanks for the fast replies!

Looks like a great forum. I assume this will only make the Hub and devices better as we go along…

Oddly enough I just emailed Brice @ SmartRules to ask about randomization for lights and he recommended the same thing!

I’ve copied the code and created a new SmartApp (unpublished) but scratching my head as to how to simulate and/or get it onto my phone!

As noted… newbie :wink:


1 Like

In the IDE where you “created” it, you have to Publish (for me) to get it into the Apps section of your phone. On your phone you hit the + button on the dashboard, and slide to the far right to get your apps. Then you click on your app to install it into your system.

If you want to try the simulator, in the IDE it’s the button on the right called Set Location. That will start the simulator for you to test it.

No good way to search for custom apps yet, but just in case you didn’t find it yet, the following forum category is where most of the popular member-contributed smartapps have topics, so it’s a good place to start browsing when you want a particular functionality:

As far as tutorials, there is some stuff in the developers section of the SmartThings website, but not a lot.

It will help to know that the code you’re looking at is written in the Groovy programming language and to read the ST developers guide.



Thanks Bruce! Got it.

Thanks JD. I’ll take a look at that guide.