In this guide we will explain the setup of notifying IFTTT that an event has occurred, in the case of this example Input 1 on our controller has closed. This gives us endless possibilities for triggering other actions on IFTTT such as sending email/text notifications, triggering relays on other boards, etc.The firmware in your controller will post events to the Particle server. IFTTT can monitor the Particle server on your account’s behalf to see if anything interesting has happened and if so do something about it. Events published to the Particle server have an Event name and a value. If you want to check the status of Input 1 then the name of that event is Input_1 The same goes for other inputs(Input_2, Input_3, etc). These events also have values which in the case of these digital inputs are either On or Off. If the input on the board is closed the value will be ON, if the input on the board is Opened the value will be OFF. Keep in mind these event names and values are case sensitive. So enough talking lets get cooking.
Our Trigger channel in this Recipe will be Particle. The Action Channel will be Android Notifications. We will be getting a Notification on our Android device when Input 1 on our board closes which is probably a PIR sensor at the bottom of a well because Timmy fell down there again. He cant expect us to keep bailing him out though. Make sure you have the IFTTT app installed on your Android device, if not just search IFTTT on the google play store and install it. You will also need to make sure the Android Notification Channel says connected on IFTTT. Once you have your Android device connected to IFTTT we are ready. So go to www.IFTTT.com and click My Recipes at the top, make sure you are on the IF tab, then click the Create a Recipe button.
Step 1. Start typing Particle in the channel search box, the select the Particle Channel.
Step 2. We will be monitoring an Event that the controller posts so select New event published
Step 3. Enter Input_1 for Event Name and ON for Event Contents. Then select your Particle module from the Device Name or ID drop down menu.
Step 4. Start typing Android into the channel search box, then select Android Notifications.
Step 5. Click on the only option for Android Notifications which fittingly is Send a notification.
Step 6. Enter the Notification you would like to receive when Input 1 on the board closes like: “Guess what, Timmy fell down the well again.”
Step 7. Enter a name for this recipe.
Now generate a contact closure on the first Input on your board. You should get a notification on your device letting you know that Timmy, who I am beginning to believe has some deep seeded issues, has once again fallen down the well.
You may also monitor events on your board through Particles new Dashboard This is handy for monitoring whether or not your controller is online when Events occur, when IFTTT checks in, etc.
Often we will refer to inputs 1, 2, 3, etc. This does not however always correspond to the labeling on your controller. When we refer to Input 1 we are referring to the first GPIO port on your controller. Keep in mind some controllers do not have GPIOs and some controllers do not have relays.