For this project, just the Lifely Agrumino Lemon will be needed. We will use the IFTTT Maker to realize the system that allows us to send an email whenever a POST is done by our device.
STEP 1: Create an account on IFTTT
Go to Get Started - IFTTT and create a free account, it's really easy.
STEP 2: Create an Applet that connects Webhooks and Email
An Applet is a piece of software that connects two or more services to offer something that the services alone couldn't provide. While on https://ifttt.com, you can go to Create, and after this page will be shown:
Our service can be articulated as "IF I receive a Post, THEN I send an email". So we press "Add" for "If This" and we search for Webhooks.
Then we press on " Receive a web request".
And finally we can select the name of the event, and we can press "Create trigger".
We do the same with "Then that" (first image)and we write "Email" in the search bar.
Then we click on "Send me an email".
Finally we can characterize our email and conclude the process.
After completing this steps (and filling the requirements for the two services selected) we can go to My Profile -> My services -> Webhooks -> Documentation, and change the event name (the one we have chosen is "umidita"). We can copy the URL and save it for later.
STEP 3: Agrumino Setup
Go to Setup - Lifely to Setup your Agrumino with your WiFi Connection.
STEP 4: Code Download
You can download the code with the provided link. Once opened, you have to change the SSID and Password field with your WiFi SSID and Password, and also substitute the URL provided in the STEP 2, and just upload the code.
The led will blink in different ways depending on the program's execution state: it will blink two times when the board turns on, three times when the transmission is completed, four times if the device is connected to the WiFi but the connection isn't completed, and five times if the device couldn't connect to the WiFi.
CONCLUSIONS:
This code provides a simple way to realize a notification system, and this project can be seen as a starting base for a more complete system to provide information about the plant. For example, data about the plant could be added to the POST.
Good luck with your work!
Comments