Trigger Conrad Connect with IFTTT

ndesilvandesilva Member Posts: 20

Hi Christian, I'm coming over from Stringify trying to get CC to do few simple things... hope I can get it to work.

I connected IFTTT using https://community.conradconnect.de/discussion/534/

I also connected my TP-Link lights to CC.

I have an Applet on IFTTT when my garage door opens to turn the lights to Red. What I want to CC to do is when the Garage door closes to turn the lights off if it's daytime, and turn them on to a different color if it's night.

Step 1 is to create a IFTTT Applet to trigger Webhook when garage is closed. What URL do I put in for the Make Web Request? For instance Step 4 on...
https://community.conradconnect.de/discussion/535/how-to-trigger-conrad-connect-projects-via-ifttt

Where do I get this link on Step 4... https://dashboard.conradconnect.de/api/webhook/ifttt?key=dAG-????

Thank you very much for your help!

-Nam

Tagged:

Comments

  • ChristianChristian Administrator, Moderator Posts: 1,420 admin
    edited July 11

    Hi @ndesilva, welcome to Conrad Connect! So, your door sensor works with IFTTT, that is, you want two IFTTT applets to fire, one in case the door opens, one in case it's been closed. The THAT part of these applet shall be outgoing webhooks that trigger the desired projects in Conrad Connect, right?

    1) IFTTT must connected to Conrad Connect (is done, you said)
    2) The so called Webhook key is being provided by IFTTT, go here, then click on Documentation. Be careful not to change a once established key by accident.
    3) If the previous steps have been completed, the webhook URL is https://dashboard.conradconnect.de/api/webhook/ifttt?key=HERE_THE_VALID_WEBHOOK_KEY
    4) Use POST, application/jason and for the body: {"event":"garageopen"}
    5) create a second applet that is being triggered when the door closes with {"event":"garageclosed"}

    The event names are: garageopen and garageclosed. Now use the IFTTT Maker Channel Event Sensor in order to trigger your lamps with it as desired.

  • ndesilvandesilva Member Posts: 20

    Hi Christian, thank you so much for your quick response!

    So far so good. Next step is once IFTTT trigger event (when Garage door closes), which will trigger my project in CC through IFTTT Webhook (as I already completed) how do I use the Time Function in CC? I want if it's Day time to turn off my lights, or if it's night time then turn them on to a different color.

    See attached Screenshot how I have it configured so far...

    Thank you very much!

  • ndesilvandesilva Member Posts: 20

    Sorry, I changed it a bit. I figured I need 2 Timer Functions. 1 to trigger if it's Day time, and another to trigger if it's Night time. How do I tell 1st Timer Function to trigger if it's Day time, and 2nd to trigger if it's Night time.

    Thank you!

  • ChristianChristian Administrator, Moderator Posts: 1,420 admin

    Hi @ndesilva, please proceed as shown below. The IFTTT Maker Channel event sensor (which itself is being triggered when door closes) is to be combined as shown below. That is IF (Door = open) AND (Is Day? = Day) THEN turn off the lights.

    Then simply clon the setup in order to create a rule for the night. Both flows will fit into one project.

  • ndesilvandesilva Member Posts: 20

    Thanks Christian. I did exactly per your instructions. Seems like IFTTT is not triggering the Webhook. In the IFTTT Applet for the URL I have https://dashboard.conradconnect.de/api/webhook/ifttt?key=MY_WEBHOOK_KEY that I copied per your previous instructions.

    Rest is as per attached screenshot. Is this correct? Why is it not triggering my lights?

  • ndesilvandesilva Member Posts: 20

    Here's the CC Recipe I made per your instructions.

  • ChristianChristian Administrator, Moderator Posts: 1,420 admin

    Hi @ndesilva, just in case my instruction was misleading, the URL must include the exact key as provided by IFTTT. So if the key is kqjwefhqewufn845huf the URL is https://dashboard.conradconnect.de/api/webhook/ifttt?key=kqjwefhqewufn845huf. As a second validation step, please use a message actuator directly after the IFTTT Channel Maker Event. This way you'll see if the the sensor really does something. If yes, we know everything works until here.

  • ndesilvandesilva Member Posts: 20

    Hi Christian, yes I followed your instructions and copied the Webhook key from Documentation. And I added message actuators to the Recipe as per attached picture. No joy... :(

    What am I doing wrong? Thank you very much.


  • ndesilvandesilva Member Posts: 20

    I tried with Action Button in place of the IFTTT Channel Maker and the recipe works fine. Something is not right with the IFTTT.

  • ndesilvandesilva Member Posts: 20

    When I have the Action Button BEFORE the IFTTT recipe does NOT work. For sure something is not right with IFTTT in my recipe.

  • ChristianChristian Administrator, Moderator Posts: 1,420 admin
    edited July 13

    Hi @ndesilva, good to know that it works with the Action button, so we can focus on the IFTTT part. As next steps, please do this: 1) Set up a new IFTTT Applet as such: "IF Door Closes, send me a text message", so we know for sure, that the sensor works in combination with IFTTT. 2) Next, please check here to see if the connection between CC and IFTTT is still established. 3) Now please check your [webhook settings] once again, click on Documentation, then verify the entire URL incl. the key. 4) As a last step, please post a screenshot of your entire IFTTT applet here (please grey out the key). I'll have a loook at it.

  • ndesilvandesilva Member Posts: 20

    Hi @Christian, I followed your steps:
    1) I created new IFTTT trigger to turn off the lights and that worked. So we know that when the Garage door closes it does trigger IFTTT correctly.
    2) Followed your link and refreshed the IFTTT connection in CC.
    3) I copied and pasted only the Key into the URL you provided earlier. See attached screenshot of the Applet.
    4) Attached. Bottom part of the IFTTT Applet is on my previous message. Sorry I can't get them all on one shot.

    Thank you very much!

  • ChristianChristian Administrator, Moderator Posts: 1,420 admin
    edited July 14

    Hi @ndesilva, looks all good until here. Also, re-examing this part, all is fine (just verify that there are no unwanted space characters)

    .

    Let me therefore now look at the IFTTT Maker Channel Event sensor:

    .

    The setup looks right to me (again, please verify that there are no unwanted space characters).

    Is the subsequent actuator (or logical gate) set in a way that it listens to event?

    .

    Let's please focus on getting a message actuator triggered for now, so this is our next step.

  • ChristianChristian Administrator, Moderator Posts: 1,420 admin

    PS: You should activate the mode where IFTTT sends you a push message each time the applet runs.

  • ndesilvandesilva Member Posts: 20

    Hi @Christian I verified there are no spaces. I copied what you had before and pasted. One thing I noticed was that when I tried with the Action Button it worked, but only when I had No Event selected in the And gate. It did not work when I had Event selected.

    For some reason in IFTTT this Applet keep turning off the push message option. All my other Applets have that turned on and is working. But when I created Applet to turn off lights when Garage Closed it did work and sent me a message. Just not with Webhook it keeps turning it off after I Save it. Not sure why.

    Thank you very much!

  • ndesilvandesilva Member Posts: 20
    edited July 14

    For instance I get notification with this Applet when the Garage Closes.

  • ChristianChristian Administrator, Moderator Posts: 1,420 admin

    Hi @ndesilva, let's please neglect the project with the AND gate. Let's focus on getting a message actuator triggered by the IFTTT Maker Channel Event sensor. I have published a similar project here. If you have Pushover, which I recommend, you may import it directly so as to study it. Otherwise I'll post you screenshots.

  • ndesilvandesilva Member Posts: 20
    Hi @Christian I don't have Pushover. So I removed it and added Mail. I did one with your Recipe and also created a new one with Action Button. Neither one worked. Seems like my IFTTT in CC is not working. So I went to Devices. Revoked access and delete data on IFTTT in CC. Re-established access. Re-did the Recipes using yours and created new one. Still not working... :(
  • ndesilvandesilva Member Posts: 20

  • ChristianChristian Administrator, Moderator Posts: 1,420 admin

    Hi @ndesilva, I will try to cover this in a detailed tutorial. What is the brand of your sensors? Thanks.

  • ndesilvandesilva Member Posts: 20
    Hi @Christian I have Garadget for the Garage door and TP-Link lights.

    Why isn't my IFTTT getting triggered in CC?
  • ndesilvandesilva Member Posts: 20
    Hi @Christian so I was testing with few things and I got it to work! For the trigger I have both Event and No Event from IFTTT in my recipe. When I have Event only it doesn't work.

    Now I'm going to try with AND gate. I'll let you know what happens.

    Thank you for your help!
  • ChristianChristian Administrator, Moderator Posts: 1,420 admin

    Hi @ndesilva, great to hear. However, what you describe shouldn't be the case. Because only "event" is desired triggering signal. Let's see how you progress and then get in touch once more here.

  • ndesilvandesilva Member Posts: 20

    Hi @Christian I've been testing it and so far it's working great. I have 2 separate recipes even though I could probably incorporate them into one.

    Is there a function where I can say if the garage door is open 1 hour before Sunset then... ? I can't really use "Is Between Hours" gate since Sun set at different times during the year. I have the lights to come on about an hour before Sunset and currently if the garage is opened before Sunset it turns off the lights and I have to manually turn them on.

    Thank you very much!

  • ChristianChristian Administrator, Moderator Posts: 1,420 admin

    Hi @ndesilva, yes, as part of the free plan, you may use up to eight actuators and/or sensors within one project, even if they constitute independent routines. You are right, the said project can neither be solved with the Between Hours nor Is Day? sensor. In such cases, I usually recommend Switchur because it allows storing and processing variables. If you are patient enough, start creating a Switchur Switch variable that represents the status of the door, then we'll talk about the final part. This is a bit more sophisticated though.

  • ndesilvandesilva Member Posts: 20

    Hi @Christian great. I have options. I will give Switchur a try and let you know. Thank you very much!

Sign In or Register to comment.