IFTTT Integration
Introduction
This guide explains how to connect the Surpuissant SDK to IFTTT to, for example, automate the activation of lights.
For this, we assume that you already have a webhook configured on IFTTT as follows:
Configuration
Function Configuration
Create the Function
To integrate the function that will execute a webhook, start by defining the parameters that the Surpuissant SDK will use. Name the webhook active_light and use the following description:
The user will say if, yes or no he wants to turn on the light.
Next, fill in the function parameters as follows:
{
"type": "object",
"required": [
"turn_light"
],
"properties": {
"turn_light": {
"type": "boolean"
}
}
}
The goal here is to determine whether or not the user wants to turn on their lights.
Webhook Configuration
Create the Webhook
Create a new webhook with the function_name corresponding to the name of the function configured previously. The function_name indicates which webhook should be triggered when the selected function is executed. Use your endpoint_url from the IFTTT webhook configured in the introduction.
Configure the Webhook
- method: Set the method to GET.
- headers: Leave the field empty.
- body_template: Leave the field empty.
Everything is set, your webhook is ready.
Integration test
So now we can just run the SDK as usual with WakeWord and then say a phrase "Turn on the light please" so it runs the webhook and can send a message.
By following these steps, you can automate the activation of your lights using the Surpuissant SDK and IFTTT.