IFTTT Queries
-
Official comment
Can you give me some idea what you mean by this Carter? Maybe let me know what it is that you want to do? I know right now Tailwind does report to IFTTT in real-time when the door opens or closes but it sounds like you want something else?
Comment actions -
As I assume you know, IFTTT has a Pro subscription. Among other features, they have "Queries" and "Filters." In fact, Tailwind already has a query called "History of garage door is opened." I would like for there to be a second one that gives a boolean variable reflecting the state of the garage door. I will give a hypothetical example:
I, Carter, have a friend, named John. I want John to be able to control my garage door, but he has a flip phone which is not capable of installing apps. My solution could be as follows: John can leave a voicemail with the IFTTT service as a trigger, and then IFTTT will open or close the garage door accordingly.
I create a recipe with these parameters:
IF: Phone Call [IFTTT is left a voicemail from a specific (John's) number]THEN: Tailwind - Open Garage
AND THEN: Tailwind - Close Garage
AND THEN: Send SMS - To John - "Message Placeholder"
This is where things could get confusing
Query: Tailwind - Is garage closed?
Filter: *******
If (Tailwind.query.isClosed) {
// Skip closing the garage door, which leave sending the SMS and opening the garage door.
// Then, set the message to "Opened garage door"
Tailwind.action.closeGarageDoor.skip();
SendSMS.setMessage("Opened garage door");
} else if (!Tailwind.query.isClosed) { // Not isClosed meaning isOpened
// Skip opening the garage door, which leave sending the SMS and closing the garage door.
// Then, set the message to "Closed garage door"
Tailwind.action.openGarageDoor.skip();
SendSMS.setMessage("Closed garage door");
}
*******
I know this is had to follow, but essentially, I set the recipe to both open and close the garage door. Then, I skip whichever one doesn't need to be done, and adjust the SMS message accordingly.
I know this could also be done with a THEN: Tailwind - Toggle garage door action, but I would think there are other uses for a query like the one I outlined.
Please sign in to leave a comment.
Comments
5 comments