Set routine each day from one time to another?

Sorry brand new to this so excuse me, but I cant seem to see how to set a daily routine that runs from 10am till 10pm each day, not sure how to set this up.
Sorry basic question I know but for the life of me I cant see how.

What exactly are you trying to do? The argument you are looking for is “Time is Between”

Routines are more or less momentary switches that do something triggered by the argument being met. So if these certain things happen then run routine…

Its OK thanks I have only just realised that its a virtual time that allows me to select the time range, thanks for getting back though. Once the piston is created does it appear in My SmartApps page on my phone app or does it always run from the dashboard.
In other words once I am happy with the script and I save it and then click resume can I then leave the dashboard and it will run for as long as I let it without any need to be logged onto the dashboard or webcore ?? thanks

I am trying to achieve the following,
I have 5 doors sensors (Sensative)
Once any of them are open the script will then check after 10 minutes to see if any of them are still open and if they are it turns off the AC, it then checks every 10 minutes until they are all closed and if any of them are open it sends another Turn Off AC command.

Because the guests will have a remote control to turn on the AC so if they leave the doors open and then turn the AC back on I want the script to know this and then send another Turn Off command until they close all the doors.

I can get it to work but only with one 10 minute period I cant seem to keep it checking until they are all in the closed state.

At the end, use the execute Piston command.

If any of contacts are open
Using ac
Wait 10 minutes
Turn Off
Execute Piston (the name is this Piston)

You could use the loop function as well but the above will put it into a loop until all contacts are closed.

I appreciate your help but I dont know what your talking about.
I cant find IF and of contacts are open where is that meant to go.

right now I have nothing apart from this which I assume will only run between 10amand 10pm each day which is what I want. But as for what you are stating I just dont know where to find this, am I meant to write this or are these drop down options ??

only when
Time is between 10:00:00 AM and 10:00:00 PM

  • add a new restriction
  • add a new statement
    end execute;

Thanks I think I have it now, could not find the way you said but I also needed to be certain that when it looped round it was not just looking to see if all contacts were closed I needed to be sure that they were closed and no door had been open for more than 15 minutes, I used this in the end, please let me know if this is OK it seems to work and it means that during the 15 minute wait time the doors can be opened and closed and when they are checked the AC will stay on because none of them were open for 15 minutes. BTW I only currently have 1 door sensor which is why its Door 1 twice.
and the times were short for testing.
Thanks for you help so far.

That’s one way.

Remember that the Trigger “Stays” is also a counter. Wait works as a timer too.

If contact “stays” open for “X” minutes
Then Using Therm
Turn Off

If contact “stays” closed for “X” minutes
Then Using Therm
Turn On

With the above, there is no need to send redundant checks to the ST servers as the Stays will monitor how long the door has been closed or opened.

does that mean it will go to door one and wait there for 10 minutes to see if stays open that long and then move to the next doors sensor, if thats the case then its going to take 50 minutes to complete the task on 5 sensors. I am not interested in turning on the AC only Off when any of the doors have been left open for 10 minutes.the guests if they are there can turn it back on again with the remote.

what I really need is for the script to check every 10 minutes to see if any of the sensors have been open for 10 minutes and if thats the case turn off the ac and then check again in 10 minutes, if during that time they have closed the offending door but opened another for 5 minutes I will not turn off the AC on the next check because it has only been open for 5 minutes BUT if by the next time its is still open then I will turn off the AC. I dont want to only rely on having all doors closed because during a test its possible that a door might be opened just to go out and then be closed, that is why I need to know that someone has basically left it open and does not care its open, then I want to kill the ac.

webCoRE has Cancel on Condition State Change on as default. Meaning if while during the evaluation period, the condition changes then the piston cancels.

So Stays works just like you are describing. However, you will need to give each contact it’s own stay If argument.

If contact stays open for 10 minute…Once the contact opens, webCoRE will start a timer. Everytime the contact is opened then closed, the timer will reset. If it stays open for 10 minutes, then the argument becomes true and it will move on to the next set of evaluations and commands such as “Turn Off AC”…

You can have multiple if arguments within 1 piston. You need to know the difference between a trigger and a condition or group of conditions as triggers will override conditions. Stays is a trigger. Is or Are closed are conditions.

If contact 1 stays open for 10 minutes
Then using Therm
Turn Off

If contact 2 stays open for 10 minutes
Then using Therm
Turn Off

The above will time each contact separately and if either of them reaches 10 minutes then the AC will turn off. So for instance, contact 1 opens and 4 minutes later contact 2 opens. Contact 1 stays open for 10 minutes and the Piston turns off AC. Contact 2 will still be counting so if someone closed contact 1 and then turns the AC back on, after contact 2 reaches 10 minutes, it will shut the AC back off.

Would be good to add a auto resume in the piston as well such as:

If either contact 1 or contact 2 changes
If all of contact 1 and contact 1 are closed
Then with Therm
Wait 5 minutes
Turn On

This way you forcing the piston to monitor open and closed states. Once both are closed for at least 5 minutes, then the AC kicks back on.

I know it seems like it should be more complicated than that but its not.


Thank you I kind of understand and I am playing with stays at the moment, FYI my AC system is not connected to my SmartThings Hub I have a z-wave to IR sender
connected as my thermostat so I can only send commands which is fine because I only want to turn off the AC when the doors and windows are open.
I rent my own villas and apartments and my guest like so many guests leave the AC on all day and expect it to work when the doors and windows are open.

So I can understand I think, your statement of checking contact 1 stays open for 10 minutes then the script runs and then turns off my AC. I then need it to
check again in 10 minutes. So would that require a “Wait 10 minutes” at the end of the “Then” statement and then do I need to execute the piston again ??.

The guests will realise that the AC is off and grab the remote and turn it back on again which is what I expect but if they have not closed the doors and windows
10 minutes later the AC will go off again and will do this until they close all the doors and windows, BUT it is OK to open them periodically for less thank 10
minutes and the AC will remain on as I dont want to send a AC off command if this happens.

Thanks for your help so far much appreciated.


Ron Talley wrote:

Well, things does change if the AC can’t report back to you if it’s on or not. That really does make a difference. In that case, yeah, use the execute every 10 minute trick then. Should work out.

Z-Wave to IR Blaster? I could use some of these! Where? How?


Does this look OK in accordance to what you said re stays.

Ron Talley wrote:

You can’t have 2 triggers in the same If statement as they will never become true.

If contact 1 stays open for 10 minutes
Then using Therm
Turn Off

If contact 2 stays open for 10 minutes
Then using Therm
Turn Off

But again, since your AC can’t report back to smartthings whether or not it’s on or off then its best to set it up just like you did earlier with a Do every specified amount of time.


yes I thought you were thinking I was controlling the AC units via a controller in house or by the apps no dumb split systems but the Z-wave 2 IRBlaster works well
a bit of a hassle to setup but got it going in the end. My criteria is I have to send an AC Off command when the doors or windows are open for more than 10 minutes
not knowing if the AC is even on, its works but it beeps each time a AC Off command is sent, I dont mind pissing off the guests because they are not meant to have all
the doors and windows open any way, But at night most guests like to sleep with the doors open and the AC off so after a certain time I need to stop the piston form
running because the AC units will beep every 10 minutes LOL.

The IR blasters are from here BUT I dont know if you are in the US
because I think the frequencies of the z-wave devices are different to ours here in Europe but they are cheap and very small.


Ron Talley wrote:

How do I get

Then using Therm
Turn off

entered cant see “using therm” anywhere


Ron Talley wrote:

Using whatever it is that you use to turn the AC off. One of mines would be using “Ecobee Downstairs” for example.