Newbie Help - 3 Doors 1 Air Conditioner

73 views
Skip to first unread message

Ron

unread,
Jul 1, 2019, 2:55:51 AM7/1/19
to Apilio
Hi All,

I've watched and read tutorials but just can't figure out how to Turn OFF my A/C (controlled via Sensibo App)  if either of my 3 sliders have been opened for more than 20 seconds.   I then want to create another routine that if ALL doors are CLOSED and Temperature is above 77 then turn ON the A/C.

I'd love to see how to write this.


Door 1 = LivingRoomDoor1
Door 2 = LivingRoomDoor2
Door 3 = LivingRoomDoor3
AC = LivingRoomAC

Indoor temperature via IFTTT and Sensibo App 



Thank you in advance,

Ron

thequietman44

unread,
Jul 2, 2019, 10:39:50 AM7/2/19
to Apilio
Hi Ron,

What sensors/service are you using to track whether your doors are open or not? 

The Weather Underground IFTTT applets "Current temperature rises above" and "Current temperature drops below" can be used to set a boolean or numeric variable whenever the temperature crosses the 77°F threshold. You can set up a matching condition that's true if the variable is true (boolean), or greater than 77 (numeric). You can then use that as one condition for turning the A/C on.

The doors can usually set a boolean variable for open/closed, then you should be able to create two matching conditions (one for open, one for closed) for each door with "Unmodified since" values of 20 seconds. I could be wrong, but I believe that will delay the condition change for 20 seconds from the time the door was actually opened or closed.

One logicblock would check to see if any (Complex condition linking with OR) of the open door conditions are true and trigger the Sensibo applet to turn A/C off. This would need to run whenever an associated condition changes.

A second logicblock would check to see if all (Simple condition linking with AND) of the closed door conditions are true and the temperature condition is also true, and trigger the Sensibo applet to turn A/C on. This would also need to run whenever an associated condition changes.


I have not tested this, and I'm typing this off the cuff, but I think those are the pieces you'll need to make this work. Anyone else feel free to correct or expand on this.

Philipp

unread,
Jul 3, 2019, 2:06:34 AM7/3/19
to Apilio
Hi,
thanks for this great example.
I would recommend thequietman44's solution. There's just one caveat with the 20 seconds delay: If you put it into the condition as additional constraint, it won't work, because those conditions aren't actively watched. So after 20 seconds, nothing would happen at all, because Apilio won't recheck the conditions. That's a long-time missing feature and unfortunately we haven't managed yet to implement it.

There is one workaround though: If you select the execution mode "warn" with a 1 minute delay, Apilio will wait for that time until it does anything. If you close the windows within that timeframe, the pending actions in Apilio will be cancelled because the logicblock is re-evaluated and the result will be different.

I recommend to try it without the timing restriction first and then play around with the delay stuff.

Thanks!
Philipp

thequietman44

unread,
Jul 3, 2019, 2:38:31 AM7/3/19
to Apilio
Thanks for clarifying how the condition delay works Philipp! I tried to figure out which setting would have the desired effect of delaying the action, but some of the documentation links are broken.

Philipp

unread,
Jul 3, 2019, 2:42:05 AM7/3/19
to Apilio
Thanks for reporting the broken links - I will fix them right away.

Ron

unread,
Jul 5, 2019, 10:51:25 AM7/5/19
to Apilio
Thanks for the response.

I'm using a basic SmartLife compatible open/close door sensor that does alert me when the doors are opened or closed.  And I think your logic makes sense, I just can't figure out from reading the documentation how that would be written. 

Ron

Philipp

unread,
Jul 11, 2019, 8:49:38 AM7/11/19
to Apilio
Hi Ron,

let's start with the logicblock to shut the AC off:

I'd do it this way:
- Create 3 boolean variables (door_1, door_2, door_3) and have each filled with an IFTTT applet
- Create 3 conditions (door1_open ...), requiring the variable to be TRUE
- Create a logicblock an connect to the three conditions
- Define a complex condition string: OR(door1_open, door2_open,door3_open)
- As action for the positive case, create an action and accompanying IFTTT applet

This should switch of the AC as soon as one of the doors is opened. (the delay with the 20 seconds is currently only implementable with a workaround - but let's care about that when the basic setup works).

Try this out and report here, than we can continue with the rest

Ron

unread,
Jul 11, 2019, 11:37:10 AM7/11/19
to Apilio
Hi Philip,

Thank you so much for taking the time to help out. I really appreciate it.  

I don't know what you mean when you say fill each boolean variable with an IFTTT applet.  I have created each of the booleans (door_1, door_2, door3) and have left the default value at "TRUE".   I can create an IFTTT applet for each door saying if door 1 is closed then turn on A/C, if door_2 is closed then turn on A/C, etc. but not sure where to use these applets with regards to the apilio conditions or logicblocks.

Ron

Ron

unread,
Jul 11, 2019, 12:00:46 PM7/11/19
to Apilio
Hi Philip,

Maybe this is what you're referring to when you mentioned "have each filled with an IFTTT applet?"

I created an IFTTT applet for each door open and door close - linking them via webhooks to the TRUE (Open) or FALSE (Closed) URLs for each of the 3 Boolean variables I created.  

- Create New Applet
- Clicked "THIS" and searched for "Smart Life"
- Selected "Door sensor is open" and selected the appropriate door in the dropdown box
- Clicked on "Create Trigger" 
- Clicked on "THAT" and searched for "Webhooks"
- Clicked on "Make a web request"
-  Pasted in the TRUE url and clicked on "Create action"

I then repeated this for the "Door sensor is closed" option in Smart Life and pasted in the FALSE url from apilio into the "Make a web request" URL field and clicked on "Create action"
I did this for each of the three doors.

Ron

unread,
Jul 11, 2019, 12:07:29 PM7/11/19
to Apilio
Turning OFF the A/C I can keep it simple by using an IFTTT applet to turn off the A/C anytime any door is open.  I don't really need to compare any door with any other door since if just one door is open the A/C will be turned off.

My real issue is the opposite.

Anytime one of the doors is CLOSED, I'll need to check to see if the other two doors are also CLOSED.  If so, then turn on the A/C.  If not, then don't.     I'd then like to set a delay (I was told that using a default of 1 minute is easier)

jrmckins

unread,
Jul 11, 2019, 12:10:18 PM7/11/19
to Apilio
This might help: https://iused2besmart.wordpress.com/2019/07/02/using-ifttt-and-apilio/

It's not an exact fit for you but you should see everything you need (including the delay).
Message has been deleted

pebneter

unread,
Jul 11, 2019, 3:18:20 PM7/11/19
to Apilio
Hey Ron,

ok, you are right. Turning it off is quite simple...
So for turning it on, you have 4 conditions that must be met:
- 3 doors closed: that informationis given with the 3 variables already created. Now you can create 3 new condition (like door1-closed etc), requiring the variables to be FALSE
- Temperature above 77: Send the current Temp to a numeric variable and create another, static variable that contains the threshold. Create a condition called „to hot“ based on those two variables.
- Now the last bit: create a logicblock that requires all to be true and voilá, the AC can be switched on. You can configure the Logicblock to aleays run as soon as any of the four variables is updated, so you do not need to have an extra trigger for that.

Ron

unread,
Jul 11, 2019, 4:55:56 PM7/11/19
to Apilio
Hi Philip,

So trying to follow this I created a flowchart of what I created.  I still think I'm missing a few things.


apilio_flowchart_doors_closed.jpg

Ron

Philipp

unread,
Jul 12, 2019, 1:16:18 AM7/12/19
to Apilio
Hi Ron,

this looks perfect to me!
Bear in mind that if you set it to execution mode "warning", you have to wait for a minute and do not open any door within that period, because the waiting actions will be cancelled if you do so.

To debug, I recommend using the "immediate" execution mode and uncheck the "only fire if result changed" option.
Reply all
Reply to author
Forward
0 new messages