Best Way to Do if A and B Then C

I have an open/close sensor on my garage door. When I leave I sometime forget if I have closed it. What I would like to happen is when my iPhone is not longer present and the garage dorr sensor is open, I would like to send a notification to my phone. Is this something I can do wholy within SmartThings or do I have do use IFTTT or both? From what I’ve read so far, IFTTT doesn’t do if A and B then C.

IFTTT won’t support multiple things unless you go with a virtual device to cover both.

You are much better off going with Rule Machine. This can do anything you can imagine pretty much.

7 Likes

You can use Stringify, it has multiple if inputs.

Rule machine for sure!

The rules machine looks to be a good solution. I found the annoncement for it and some install steps. There is mention of an IDE and ‘Publish for Me’. I figured out what IDE was meant, but I’m not clear on exactly how to install the github files into the IDE. I probably can figure it out, but is there some documentation on the process that I’ve missed?

Nevermind, I found the “Tools and IDE” page.

create smartapp within the IDE, go to the code page and paste the code for rule machine and publish. Do the same for Rule and you’re done.

1 Like

I got the rule machine and rule installed and they appear in the app on my iPhone. I was able to create a rule, but I’m a little confused as to how it works.

The trigger is my iPhone leaves.
Under Define Condition, I have
Select Capibility: Contact
Contact Sensors: Garage Door
Contact State: open

Define the Rule is Garage Door Open

Back on the main page I see

Define Conditions
Garage Door open [FALSE]

Define a Rule
Garage Door open
[FALSE]

I would think it should be set to [TRUE]. The state is set by the app and I don’t see how to change it. For acations, I set Select Actions for True to Push. Is this set up correctly? I want to get a push notification if my iPhone leaves and the garage door is open.

For a condition, it shows the current state.
Basically, it is saying at this time, Garage Door open is False. In other words, it is saying it is closed.

You’re right. When I opened the door, it changed to true. Thanks