Skip to the content.

Tutorial: IFTTT

This tutorial explains how crelay can be controlled via the IFTTT cloud service, using crelay’s HTTP API. Since crelay does currently not implement any authorization method, it is a security hazard to expose the crelay API to the public Internet. Please read the disclaimer below.

How to use crelay with IFTTT

  1. Setup your crelay, and make sure it’s working correctly.
Once again, this can be a major security hazard, if you do not secure your connection properly. Please do not use this method unless you know what you are doing.
  1. Forward the crelay port (By default it’s 8000, though i recommend changing it, if you have shared your IP with anyone.) through your router. (This guide can be helpful)

  2. Find your public IP, eventually by using WhatIsMyIPAddress, and looking under IPv4.

  3. Go to IFTTT, and create an account.

  4. Create a new applet, by going under “My Applets”, and then pressing the “New Applet” button.

  5. Press the “+this”, and choose a service, which in this case, will be Google Assistant.

  6. Then choose a trigger, (I chose the one called “Say a simple phrase”.) and set it up to your likings.

  7. When you have set up your trigger, press the “+that”, and choose the service called “Webhooks”, then the action called “Make a web request”.

  8. Under “URL” you have to put in “https://YourPublicIP:YourcrelayPort/gpio?pin=RelayNumber&status=Status”, with YourPublicIP being the IP you got from WhatIsMyIPAddress, and YourcrelayPort being the port you use for crelay, and RelayNumber being the relay that you wan’t to turn on, and Status being “1” for “On” and “0” for “Off”.

  9. The method should be “GET”, and the Content Type should be “text/plain”, and the Body should be left empty.

  10. Now press “Create action”

  11. Now press “Finish” (And disable notifications)

  12. Now repeat the steps from 5 to 12, only with the “1” in “&status=1” being a “0”

Disclaimer

The risk of forwarding your crelay port.

By forwarding the crelay API port from the public Internet you agree with the following terms:

You alone are responsible for securing your connection, at least by changing the default port.

Neither the author of crelay ondrej1024 nor the author of this tutorial Luna are responsible for any security hazards which may occur with opening your crelay port to the public Internet.

Opening the port for your crelay can be a major security hazard if you don’t know how to protect your things correctly.