Send message based on 3 conditions

Please excuse my ignorance. I’m sure this is simple but I haven’t been able to figure it out.
I want to generate a message under the following circumstances:

IF iPhone present
AND Contact (door) opens
AND Motion sensor detects motion within 30 seconds of contact opening
Then send message

Is there a SmartApp will do this? Somehow I haven’t been able to find it.

Rule Machine

1 Like

“Rule machine” should be able to do this. A quick search will bring it up.

1 Like

If only I could figure out how to use it. :grinning:

It’s a little tricky - here is what made it sink in for me. You create multiple conditions but then you have to define a Rule that is made up of those conditions:

Condition 1 = If iPhone present
Condition 2 = Contact opens
Condition 3 = Motion detected

Rule = Condition 1 AND Condition 2 AND Condition 3

Actually I think it’s a bit more tricky due to the introduction of that 30 second bit. What you posted would not time out, it would wait and as long as the first two conditions were true for the third, and then send the message. In thinking about this, the first thing that came to mind was a delay/cancel action, but I don’t believe that is going to get you there.

I’ve toyed with a couple of things, like using a virtual switch to indicate the end of the 30 second window, which might work. Can’t quite get my brain wrapped around the logic, though. I’d have to play with it a bit.

It would be a lot simpler if you didn’t have that 30 second bit in there. Why that requirement?

Because the motion sensor isn’t by the door, it’s further down the hallway and I am too cheap to buy another. :grinning:

It could be a mistake given some of the lousy reviews, but I just gave up and ordered an arrival sensor.
This is part of my ongoing quest to get SmartThings to remind me to hang up my keys in their proper spot when I come home.

I think that there’s a market for a “smart” key rack but I’m not technologically capable of designing/making it.

Smart Rules can do it as well and is much simpler to use IMO. I have three or 4 setups based on multiple conditions, some very similar to yours, and they run flawlessly. They just updated the app today to include cloud backup of your files. I don’t know about the 30 second thing though. I have no time based rules. There may be other ways to skin that cat though. I understand that Rule Machine seem to be the Gold Standard on ST for this stuff, but there are alternatives. I think there’s another app named Simple Rules as well but I haven’t used it.