IFTTT integration with Domoticz

From Domoticz
Jump to: navigation, search

Medium.png


IFTTT has a channel called Maker which can be used to send and receive HTTP requests to/from Domoticz. The Maker Channel allows you to connect IFTTT to your personal DIY projects. With Maker, you can connect a Recipe to any device or service that can make or receive a web request (aka webhooks).

Note: This is feature requires Domoticz stable version 4.9700 or higher.

Adding a single device to IFTT

Send a trigger to IFTTT

First you need to add a Applet containing the Webhook in IFTTT.

For example create an event with the name 'Doorbell" and let it send an email.

When you are logged in at IFTTT, visit https://ifttt.com/maker_webhooks

Next press the Connect button, and after being connected, click Documentation, and copy the API/Key and paste this in Domoticz under Settings->Notifications->IFTTT (Also enable IFTTT here and Apply Settings.)

Now you can use Blockly to trigger an event. For example when the 'Doorbell' = ON send an IFTTT trigger You will find the 'IFTTT trigger' under "Messages" in Blockly

Receive a web request from IFTTT

This Action will make a web request from IFTTT to a publicly accessible URL (your Domoticz server).

Action fields: URL, Method, Content Type, Body

This could be used in conjunction with Domoticz, when using user/password, for example as:

 THIS part : If SMS is received (for example)
 THAT part : Add "Maker" and configure it that way :
 - URL :  http://<user>:<password>@<domoticz public IP or URL>:8080/json.htm?type=command&param=udevice&idx=<id>&nvalue=0&svalue={{ContactName}}
 - Method : GET
 - Content-Type : text/plain
 - Body : Nothing

Adding multiple devices to IFTTT

A PHP script is available that makes it easier to have all of your devices on IFTTT while only requiring you to create two IFTTT applets.

You can read more about it and download here: https://github.com/dswinton/domo-ifttt