Set Away Mode - Simple


#1

1) Give a description of the problem
I want a simple piston to set the houses mode to Away when 2 presence devices are away and 2 motion detectors do not detect motion for 15 minutes

2) What is the expected behavior?
set to Away mode

3) What is happening/not happening?
It will only fire if I “test” it when the parameters are correct

4) Post a Green Snapshot of the piston![image|45x37]


#2

So I made some modifications, and added my Nest Presence sensor so I could remotely trigger it. (previously I only had conditions without any events to trigger it.) But now there is close to a 30 minute delay (it took about 28 minutes). Here’s the changes:

And here are the logs from when the Nest Presence Sensor was set to away:

12/17/2018, 10:19:51 AM +127ms
+1ms ╔Received event [Home].time = 1545059992694 with a delay of -1567ms
+463ms ╚Event processed successfully (462ms)
12/17/2018, 10:04:52 AM +81ms
+1ms ╔Received event [Home].time = 1545059093270 with a delay of -1189ms
+621ms ║Setting up scheduled job for Mon, Dec 17 2018 @ 10:19:52 AM EST (in 899.993s)
+631ms ╚Event processed successfully (631ms)
12/17/2018, 9:53:13 AM +127ms
+2ms ╔Received event [Nest Presence Device].presence = not present with a delay of 67ms
+167ms ║Setting up scheduled job for Mon, Dec 17 2018 @ 10:04:53 AM EST (in 699.977s)
+178ms ╚Event processed successfully (177ms)

Thanks for any help you can give!


#3

Hi @thecow
just to test this i have suggestion…

IF all motion sensors inactive last 15 minutes
and
IF all presence sensors are not present 1 minute
Then
Set location mode to AWAY

Let’s see if you get 15-16 minutes with this one?

Because i am wondering IF both triggers are counting seperately??? you have two 15 minutes so it’s close to 30 minutes ???


#4

Thanks for the help!

How do I get two if statements like that?


#5

sorry about the confusion…
I did not mean to write 2 IFs…
Just a bad habbit of writing LOL

IF
all motion sensors inactive last 15 minutes
and
all presence sensors are not present 1 minute
Then
Set location mode to AWAY


#6

You’re not waiting for it to run through the timer you have in the piston. It will only fire after it has been away for so long. Also, it will only set it to away if you are currently in Home. You might want to put that into a restriction rather than on the individual action.


#7

@Ryan780 did you mean my first one or my revision. Sorry I’m a newbie and did not understand your response. Thanks!


#8

Either. If you say that it should only happen after you are away for 15 mins, you have to be away for 15 mins. Check the logs for the piston after the timer runs. Look at the end of your log. It is scheduling the next job to run.


#9

Here is where I landed. It seems to be working great for my purposes. I added two additional actions (setting Nest to Away and turning on Smart Home Monitor).


#10

I would probably just change your If conditions to motion equals no motion for 15 minutes and presence changes to away rather than have any timer on the presence since it will have waited for 15 minutes of no motion before checking presence.


#11

Both timers will run simultaneously actually.


#12

@ryan780 I originally set it up with two 15 timers but that took 30 minutes before it actually set away mode. In an ideal world that’s what I would have preferred because that is exactly what I wanted, but it seemed to run one timer and then the other.

See my earlier post: Set Away Mode - Simple

Thanks!


#13

Will this accomplish what I want? Or do I need the Presence Sensors to be triggers as well?


#14

I think so. Based on the piston it will only fire if the mode is home and no presences sensors are not present. It will change the state after 15 minutes of inactivity on your motion sensors. Now, I’m a novice at this whole webcore thing, but looks like it would work.


#15

If you have one in a restriction and one in the IF, yes, they are sequential. But your original sketch had both in the IF. in that case they are not sequential but concurrent timers.


#16

The issue is . . . in the original sketch, they did not work as concurrent timers. In playing around with it, every time I have had two timers in the IF, they run sequentially.


#17

Ok . . . so I continue to struggle to make this work. The last piston I shared (Set Away Mode - Simple). Does not work quite as expected. Here’s what happened this morning. My phone’s presence sensor failed to trigger until I opened that app. The problem was that at that point I was away from the house, all events from the motion sensors were in the past, so there were no events to trigger the piston.

So then I set up the following piston, but again the two timers are not run simultaneously. I watched. It take two 15 minutes timers before it will complete the action. Any thoughts?


#18

You can try to use “Was” instead of “Stays”. Since was is a condition instead of a trigger, it just has to be true for the piston to fire. So, if you saw “Motion sensors ALL were inactive for at least 15 minutes.” and “All presence sensors were not present for at least 15 minutes”, that should get you where you want to be.