Triggering IFTTT From Arduino Using Lithouse





Introduction: Triggering IFTTT From Arduino Using Lithouse

In this instructable, we will build a motion detector and trigger IFTTT events from that device.

You may create IFTTT recipes for receiving email if someone is inside the house or switching a Belkin WeMo when you walk into a room.

As the motion detector cannot directly contact IFTTT, we will use Lithouse as the broker.

Step 1: DIY Motion Detector

You will need the following components:

  • LED, Breadboard and some Wires.

Please connect these components as shown in the image.

  • Mount the Ethernet Shield on Arduino.
  • Connect the 5V and GND pin of the PIR to the respective heads of the Arduino Ethernet Shield.
  • Connect the PIR’s output pin to the pin #2 of the Ethernet Shield.
  • Connect the negative (short) leg of the LED to GND of the Shield.
  • Connect the positive (long) leg of the LED to one of the end of the 330 Ohm resistor.
  • Connect the other end of the 330 Ohm resistor to the pin #7 of the Shield.

Step 2: Register With Lithouse

Now, let us register the device with Lithouse:

  • Go to Devices tab and click the '+' button. A new window will show up.
  • Provide a meaningful name and description for your device group.
  • Then hit Add.

Step 3: Software Setup

We are going to setup the Arduino development environment and configure the device:

  • Go to the Arduino IDE’s home folder. Then go inside the libraries folder. Now, unzip Lithouse client library here and rename it to Lithouse.
  • Launch the Arduino IDE. Open LithousePIR (File > Examples > Lithouse > LithousePIR).

You may have noticed that the device key is missing in the LithousePIR sketch:

char deviceKey [] = "YOUR_DEVICE_KEY"; 

We need to update this with an actual key.

  • Go back to Devices tab and expand the group you just created by clicking the '+' on the left of group name.
  • Then click the 'copy' icon beside the device key to copy it into the clipboard.
  • Paste the device key in your sketch.

The program is now ready. Please upload it to Arduino.
You can test by moving a hand in front of the PIR sensor. The LED should turn on.

For more information regarding setup and debugging, please visit our tutorial.

Step 4: Activate IFTTT

At this stage, the device is connected to Lithouse. But, it cannot trigger IFTTT events yet. That will happen once you activate IFTTT on Lithouse:

  • Open your profile and click on activate.
  • On the resultant pop-up, please provide your IFTTT email channel's address.
  • Once you hit Verify, you will receive a verification email from Amazon Web Service (We use AWS for sending emails to on your behalf).
  • Please check your inbox and accept the verification request.

Step 5: Sample Recipe

Congratulations! Your DIY Motion Detector can now trigger IFTTT events. Here is a recipe for turning on a WeMo switch. You may change the ‘that’ part of the recipe based on your needs.

Please contact us with your questions and suggestions.



  • Epilog Challenge 9

    Epilog Challenge 9
  • First Time Author Contest 2018

    First Time Author Contest 2018
  • Sew Warm Contest 2018

    Sew Warm Contest 2018

We have a be nice policy.
Please be positive and constructive.




(copy from another thread)

Thanks for the mention! We love being part of the Arduino community experiments. Feel free to grab yourself a free account with SMTP2GO - you can send 25 messages per hour and a total of 1000 per month. Paid plans offer more, of course! :)

Looks like lithouse is no more :(

I suspect lithouse has folded. At least the web pages this Instructable links to don't have the content they used to.

I've been trying to figure this out for a while: is there a way to have a Lithouse channel change based on an IFTTT. For example: I send a text to IFTTT, and it sends a message to Lithouse so that I can turn on an LED connected to my Arduino? I'm looking at the LithouseEthernet example and it does what I want, but how do I change the value of that ledChannel through IFTTT? As far as I can tell, this only works right now to send info from the Arduino to IFTTT, not the other way around.

At present, it only works one way i.e. from Lithouse to IFTTT. Two way communication is in our wish list.

For some reason, I'm having problems with my Arduino and Wiznet shield not getting connected to your API. Do you have any suggestions? I used the code in your example and the instructable above. The only thing I added was the device key from my own device in the list on What am I missing?

We haven't tested it in Wiznet. Do you have any log?

This is the shield I'm using: It's the Wiznet ethernet shield. I don't know if I'm being blocked by my router or maybe my ISP.

I can see values populate in the Serial Monitor

Connecting . . . to ethernet

Connecting . . . to lithouse

FSR Reading = 425

FSR Reading = 329

FSR Reading = 281

and so on.

I never see anything show up in lithouse.

same issue, it seems sending to lithouse just fine but it's never trigger.

I found the
device in our database. That means the device was created successful using the
Web UI. However, I could not find any write request from the device.

Perhaps you may
add some Serial.println inside the send() method in LithouseClient.cpp.