IFTTT is widely integrated with home automation applications. You can connect AiCam with your home automation devices through IFTTT using it Webhooks service. For example, when AiCam recognizes your mother's face, turn on air conditioner. Or during 11pm - 6am every day, when a person is detected in the living room, turn on the light. In this tutorial, we'll guide you through how to do so.
Prerequisite
- IFTTT app (Free download at https://ifttt.com)
- AiCam app (Download at App Store)
How It Works
To use AiCam as a trigger in IFTTT we need to use Webhooks service to connect AiCam with IFTTT. The flow is the following:
- First, when AiCam detect a person or an animal, it will send a web request to IFTTT Webhooks service
- This request triggers an event in a IFTTT Applet
- When the applet is triggered, it executes any action you configured.
Now let's go to the set-up process following these steps.
Step 1: Set up IFTTT Maker Webhooks
What we need for this to work is the URL of the Webhook service. We can get the URL from 2 locations:
- In the web browser, open setting page of IFTTT Maker Webhooks.
- In IFTTT app, tap your username and go to My Services > Webhooks > Settings symbol.
If it is not already, you should sign in with your IFTTT account. There you will see the URL we need. It looks like this:
https://maker.ifttt.com/use/{key}
The last string after the slash is your private key. If you now copy the URL and open it in a new tab in browser, you will see the guide for IFTTT Webhook. It says to trigger an event we need to send a post request to the URL displayed there.
What we need to do now is to create a new applet in IFTTT then replace the placeholder {event} with your actual event name.
Step 2: Create a IFTTT Applet to automate your flow
![](https://cdn.prod.website-files.com/605dc8b092408a00ace472f8/60633e753e0c0f6847279567_ifttt.png)
Now we need to do the following steps in IFTTT app:
1. Create a new applet in IFTTT app or website
2. In "If This" search for Webhooks service and choose "Receive a web request" as the trigger
3. Enter the name for the event. For example, we can enter "human_detected" to create a new trigger
4. In "Then That" you can choose any service and action you want to run when this event is detected. For example, I choose "Send me an email"
Step 3: Set up web request notification in AiCam app
![](https://cdn.prod.website-files.com/605dc8b092408a00ace472f8/60633e268916881141a414cc_webrequest.png)
Now we need to do the following steps in AiCam app:
1. Open Setting > Notification then turn on "Send web request on event detected" (You need premium version of AiCam to use this feature)
2. Tap on "Web request configuration" to edit the configuration
3. In the URL box, enter the URL you have from above. Remember to replace "human_detected" with the event name you entered and the key "{key}" with your actual key.
4. For method select POST and for Content Type select JSON. You can edit the body or leave it prefilled. It should look like
{
"value1": "${eventName}",
"value2": "${eventID}",
"value3": "${deviceName}"
}
5. Tap on "Send test request". A green banner should appear saying that the web request is sent successful. The action you configured in IFTTT app should also run.
Now open the camera in AiCam app and use it as your security camera. When an event you selected in Event card occurs, your IFTTT applet will be executed. If you have some smart devices in your home, combine AiCam with Apple's Shortcuts app and Webhook request enable many automation scenarios.