Announcement

Collapse
No announcement yet.

Can HS3 control an IFTTT Applet?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can HS3 control an IFTTT Applet?

    I am new to IFTTT but not to HS. I can control HS events from IFTTT applets successfully. How can I get HS to operate an IFTTT applet the other way? For example, how can I get HS to control my Air Conditioner that is currently able to be controlled from an IFTTT applet?

    Thanks,
    -Rick

  • #2
    I use IFTTT's HTTP Maker as the trigger. Then I use the code below to trigger from Homeseer, passing in which maker trigger to use.

    Code:
    Imports System.Net
    Imports System.IO
    Public Sub Main(parms As Object)
      Dim parm As String = parms.ToString()
      Dim request As WebRequest, response As WebResponse, ds As Stream, reader As StreamReader, b() As Byte, sUrlResponse As String
      Dim url As String = "https://maker.ifttt.com/trigger/"
      url = url + parm
      url = url + "/with/key/<get_your_own_key>"
      Try
        request = WebRequest.Create(url)
        request.Method = "GET"
        request.ContentType = "application/json"
        response = request.GetResponse()
        ds = response.GetResponseStream()
        reader = New StreamReader(ds)
        sUrlResponse = reader.ReadToEnd()
        reader.Close()
        response.Close()
        hs.writelog("Ifttt Resp", sUrlResponse)
      Catch ex As Exception
        hs.writelog("Ifttt Err", ex.ToString)
      End Try
    End Sub
    https://ifttt.com/maker_webhooks

    Comment


    • #3
      David, thanks very much. I will try this. I don't have a lot of experiences with scripts. I assume I put my IFTTT URL key into <get_your_own_key> and run this script from an event. How to I pass the maker trigger? I don't know enough about IFTTT. I have working applets there that turn the A/C on and off. How do I call them from this script?

      Rick, W1RHS

      Comment


      • #4
        Originally posted by Archcantor View Post
        David, thanks very much. I will try this. I don't have a lot of experiences with scripts. I assume I put my IFTTT URL key into <get_your_own_key> and run this script from an event. How to I pass the maker trigger? I don't know enough about IFTTT. I have working applets there that turn the A/C on and off. How do I call them from this script?

        Rick, W1RHS
        I use events to trigger the script. When you set the event to run a script, you can specify the function (within the script file) to run, and a parameter, which in this case is the specific name of the IFTTT trigger you gave it. If you do not see the text boxes for function name and parameter, try pressing the airplane icon to bring up the advanced fields.

        Follow the IFTTT documentation on setting up maker, then the "applet". The trigger (IF) will be Maker (with that name you gave it), the THEN will be your A/C ifttt functions.

        Comment


        • #5
          At its most basic level, I have HS send a one-line command to my Webhooks app on IFTTT when an event fires on HS.

          For example, I use this for all my water sensors around my home. If the sensor detects water, it closes my water valve and sends a Webhooks "command" to IFTTT so I can do a bunch of stuff. Here is the link I send:

          result=hs.GetUrl("http://maker.ifttt.com/trigger/water_leak/with/key/<YOUR KEY>?value1=Dishwasher","/",TRUE,80)

          This triggers the Webhooks applet I've titled "water_leak" on IFTTT and sends the value "Dishwasher" to the applet as well (you can send up to three values). Then the IFTTT water_leak applet runs and sends notifications specifying it was the Dishwasher sensor.

          I had to do this as HS->IFTTT used to work directly (I'd turn on a virtual device and IFTTT would recognize that). Unfortunately I, and others, have had real reliability issues going HS->IFTTT even though IFTTT->HS is pretty rock solid.

          Comment


          • #6
            Originally posted by Wazoo View Post
            At its most basic level, I have HS send a one-line command to my Webhooks app on IFTTT when an event fires on HS.

            For example, I use this for all my water sensors around my home. If the sensor detects water, it closes my water valve and sends a Webhooks "command" to IFTTT so I can do a bunch of stuff. Here is the link I send:

            result=hs.GetUrl("http://maker.ifttt.com/trigger/water_leak/with/key/<YOUR KEY>?value1=Dishwasher","/",TRUE,80)

            This triggers the Webhooks applet I've titled "water_leak" on IFTTT and sends the value "Dishwasher" to the applet as well (you can send up to three values). Then the IFTTT water_leak applet runs and sends notifications specifying it was the Dishwasher sensor.

            I had to do this as HS->IFTTT used to work directly (I'd turn on a virtual device and IFTTT would recognize that). Unfortunately I, and others, have had real reliability issues going HS->IFTTT even though IFTTT->HS is pretty rock solid.
            I do pretty much the same to indirectly control my Trane XL950 thermostat that has no direct HS integration.

            HS Event > IFTTT Webhook Applet > Mynexia.com Automation

            Here's an example immediate script that I use.
            Click image for larger version

Name:	Capture.PNG
Views:	154
Size:	13.3 KB
ID:	1316416
            -Wade

            Comment


            • #7
              THANK YOU EVERYONE! The biggest hurdle for me was the IFTTT web site learning curve. I didn't realize I had to create my own private applet on the platform! Once I got the AC controllable with a regular url then doing it in HS is easy. Lots more to learn but I really appreciate you all chiming in here!

              -Rick

              Comment


              • #8
                Originally posted by Archcantor View Post
                THANK YOU EVERYONE! The biggest hurdle for me was the IFTTT web site learning curve. I didn't realize I had to create my own private applet on the platform! Once I got the AC controllable with a regular url then doing it in HS is easy. Lots more to learn but I really appreciate you all chiming in here!

                -Rick
                Yeah. I don't find it the most intuitive service.... but it is very useful. Once you connect the Webhooks service to your IFTTT account and then create a Webhooks applet, it all kinda falls into place.

                Comment

                Working...
                X