Run a single action multiple times a day

I’ve been looking around and it seems surprising I can’t find anything like what I want to do. I would like to create an action, like turn on a light or set thermostat temperature automatically at different times of the day or night. In the SmartThings app there are actions I can program for a time of day every day, but I don’t see a way to perform the action multiple times per day unless I create several instances of the same action for different times. It seems unnecessarily repetitive to create the same action several times just to have the same action happen 5 or 10 times per day. I have a computer attached to a Z-Wave power strip and I need to have it turn on and off several times a day for backups. I am also thinking of having different lights turn on and off at programmed times to simulate people are in the house when we are away for several days. Another function is to be able to set thermostat temperature at different times of the day. Any ideas?

Sounds like multiple things going on. You are correct about the built-in method of scheduling things, one “shortcut” at a time for each time. If you want something more sophisticated you will have to either write some code, modify some code, or get somebody to do that for you (easy in this community). There are scheduling primitives, e.g., cron, that can be used. Suffice it to say that this isn’t very hard to do.

There are some apps that do the occupancy simulation, and several thermostat apps. Go into the IDE (https://graph.api.smartthings.com), click on My SmartApps, then +New SmartApp, fill in the required fields, hit Create. On the upper right will be a link to Browse SmartApp Templates, which has a few hundred useful apps.

1 Like

Without even reading the details of your post I would recommend looking into Pollster by @geko.

I took his code and wrapped some logic I want to execute every couple of minutes in one of the poll commands.

Works like a charm. Just have to make sure I select a device to poll for the polling task I wrapped it in. Could do it the right way and strip out the other three polling tasks but I’m lazy.

Good luck!

Thank you. I will look into creating the code. I have some studying to do. :smile: