ST Routine help

Hi. I am brand new to smart homes and am not sure if this is the correct area to post this but I need help with a routine.
I am using a multipurpose sensor and a kasa smart plug.
If the sensor remains closed between 5pm and 6pm I want the plug to turn on. This is what I have that is not working.

If:
5:00 pm - 6:15 pm, everyday
multipurpose sensor contact sensor closed
Then:
plug 1 on
turn off after 10 minutes (auto off feature)

@teba This requires the door to close, not to remain closed. The best solution for you is webcore. You cannot do this in a regular smartthings automation

Might this work for you?
If:
5:00pm - 6:15pm, everday AND multipurpose sensor contact = closed AND plug 1 = off
Then:
plug 1 on AND turn off after 10 mins

Not sure how that will work in real life though in terms of constantly firing. Maybe WebCore will be better but that’s not something I’ve tried.

I have webcore installed and have watched a lot of videos but still cannot figure out how to create this. Ive looked at examples and tried to modify them but I get confused as I have no coding experience. Any tips, examples or directions would be appreciated.

@Terri_Baker try this code… please tell me if it works. Just say import from code and use the four letter code (ak9f).

@Pogga this still wouldn’t trigger unless the door is opened

another issue, I can not see plug 1 under the actions to turn it on/off now

@Terri_Baker that is probably because you need to go to webcore settings again and make sure that the device is selected. It is better to do this in the old app (classic). Then it should show up

Got it. Thanks. It’s there now

I posted this on the webcore community as well but thought I’d let you take a look. I did something wrong but don’t know what!

@Terri_Baker you set it to turn on the light anytime between 5 and 6 if the door is closed, so it would repetitively turn on the light. Cancel pending tasks would have no effect. Did the piston I code not work? I can fix it.

It did not

Couple of questions:

Do you want the plug to turn on exactly at 5pm if the door is closed?

Do you want the plug to turn on if the door closes between 5pm-6pm?

Do you want this to be a one time deal?

Do you want to turn off after 10 minutes no matter if the door opens and the plug is on?

Do you want any action if the door opens?

Try changing the time I set to 5 PM

Make sure you change the devices I set, as you have different devices than me.

Oh sorry, I haven’t created the auto off feature.

So to clarify, if the door doesn’t open from 5 to 6 15, then turn on a light for 10 minutes.

If the sensor was stays closed or was not opened between 5-6, I want the plug to turn on at 6.
This is a once per day automation

I then want the plug to turn off after a couple minutes (don’t really care how long) in order to reset for the next day.

If the sensor is opened between 5-6 I do not want the plug to turn on

1 Like

If times happens daily at 6pm
And
Door did not change in 1 hour
And
Door is closed

Then with plug
Turn on
Wait x minutes
Turn off

Yes. Now, how do I set that up?

Just forgot to set up the auto off, here is the final. Make sure device 1 is contact and devices 2 and 3 are the same plug

Just like it’s written. Best to learn how to build your own vs importing.

Just wanted to let you know that I did it! I wrote it myself and it actually works! Thanks for the help!

2 Likes