We talked about how to send a tweet alert from any of our USB and WiFi devices back a few months ago. Now you can do a lot more using Thingspeak.com IoT platform in conjunction with IFTTT.com which is a free platform to do more with your apps and devices.
Using the IFTTT platform, you can send an email or an SMS when a sensor parameter exceeds or drops below a threshold value. You can get notification on Facebook Messenger or on Telegram or other communication services when a sensor parameter exceeds or drops below a threshold value.
Here is an example of using IFTTT platform to send an email when the humidity on our model LFS104AW WiFi device goes above a threshold value.
1- Setup an account with Thingspeak.com as we described in a previous post - Our Wifi Weather station sends sensor data directly to cloud
2- Setup an account with IFTTT.com. Click MyApplets, then click New Applet button on the right of the screen.
3- Click on + this (If + this then that). You need to choose a service when Thingspeak sends a web request to IFTTT. Search for Webhooks and select it. Click on Receive a web request and continue.
4- Type Humidity_Monitor for Event Name, and click Create trigger.
5- Click on + that (If this then + that). Choose Email for the action service. Click on send me an email and continue. On the next page click Create action button to complete the action.
6 - On the next page turn on the Applet that you just created and click Finish.
7- Click on Webhooks link and then Documentation. You will see your webhooks API key. Copy the https://maker.ifttt.com/trigger/Humidity_Monitor/with/key/xxxxxxx address.
8- Back on Thingspeak.com account, click on Apps, and create a ThingHTTP app. Paste the https address from webhooks in the URL entry and save the ThingHTTP app. See Figure 1 for details.
9- Click on Apps, and create a React app. Select Humidity as the field and ThingHTTP as the action. Figure 2 shows the React screen. Click Save React to complete.
Congratulations. You are now setup to receive an email from IFTTT (Webhooks) every time the humidity goes above 55 %RH. When humidity goes over the threshold value, the React app notifies the ThingHTTP app. The ThingHTTP app then sends a web request to IFTTT (Webhooks) to send an email.
Figure 1 - ThingHTTP app screen
Figure 2 - React app acreen