In this project, We will learn how to make HTTP POST request using ESP8266 NodeMCU with Arduino IDE. Here will use IFTT as Server side. If you didn't see my previous tutorial about how to make voice controll home automation using IFTT, can check from above link.
Connection
NodeMCU ___________ Soil moisture sensor
VV ______________ VCC
GND _____________ GND
A0 _______________ A0
Thanks UTSOURCE.net to offer electronic components for my projects
Creating an IFTTT AccountIf you don’t have an IFTTT account, go the IFTTT website: ifttt.com and enter your email address to create an account and get started.Creating an IFTTT Account
Next you need to create a new applet. follow my steps bellow that I have given.
1. Open the left menu in the IFTT website and click the “Create” button
2. Then Click on this word. Search for webhooks service and select it.
3. Choose the “Receive a web request” trigger and give a name to the event.
In this case, I’ve typed “soil_moisture”. Then, click the “Create trigger” button.
4. Click the “that” word to proceed. Now, define what happens when the event you’ve defined is triggered. Search for the “Email” service and select it. In my case I have used Soil moisture sensor to get the data. So I used three values to determine the Soil moisture. In the first value box will show the current state of soil moisture and another two box will show threshold value of soil moisture.
5. Press the “Finish” button to create your Applet.
Before proceed with another step, make sure to verify that your applet is working proper.
1. Search for Webhooks service or open this link: https://ifttt.com/maker_webhooks
2. Click the Documentation button of Webhooks service
3. you can see a web page with the API key. keep that API key as secret. You will have that in the future steps.
4. Fill the “To trigger an Event” section. Then, click the “Test it” button.
5. The event, when it should be sucessfully triggered you will see a message with the caption of “Event has been triggered".
Click here to see the soil moisture using blynk
6. Go to your Email account. You should have a new email in your inbox from the IFTTT service with the values you’ve defined in the previous step.
If you want to download the code and want to learn how the code will work please click here
Finally select the correct COM port and select your board type then click the upload button. when upload procces finish open your Serial monitor, you will find message printing the
HTTP response code 200 indicating that the request has succeeded.
watch the tutorial in You Tube
Comments