Comments on: ESP8266 NodeMCU HTTP POST with Arduino IDE (ThingSpeak and IFTTT.com) https://randomnerdtutorials.com/esp8266-nodemcu-http-post-ifttt-thingspeak-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Thu, 27 Oct 2022 16:53:03 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Sheikh Osmani https://randomnerdtutorials.com/esp8266-nodemcu-http-post-ifttt-thingspeak-arduino/#comment-784936 Wed, 21 Sep 2022 07:47:32 +0000 https://randomnerdtutorials.com/?p=96920#comment-784936 I have implemented your solution for sending http post request to my custom webhook point in my website (not ThingSpeak or IFTTT). But it is showing response code 301. From postman.co or reqbin.com the post request can be sent successfully to my server.

I want to send information of two variables ( ph and temperature) in the body (content type: application/json). My webhook receiving URL is: https://iot.insightsautomata.com/wp-json/gf/v2/workflow/webhooks/4/#############################

(######################### is the api key which should be included in the URL). Should I need to send same api key in the body also?

Please let me know if the following code is correct for sending data in body:
http.addHeader(“Content-Type”, “application/json”);
// JSON data to send with HTTP POST
String httpRequestData = “{\”ph\”:\”” + String(random(40)) + “\”,\”temperature\”:\”” + String(random(40)) }”;
// Send HTTP POST request
int httpResponseCode = http.POST(httpRequestData);

]]>
By: Nikhil M https://randomnerdtutorials.com/esp8266-nodemcu-http-post-ifttt-thingspeak-arduino/#comment-740859 Sat, 23 Apr 2022 18:59:42 +0000 https://randomnerdtutorials.com/?p=96920#comment-740859 Really saved a lot of time and was on point. Thank you so much!!

]]>
By: Stoyan Nikolov https://randomnerdtutorials.com/esp8266-nodemcu-http-post-ifttt-thingspeak-arduino/#comment-556128 Sat, 13 Feb 2021 10:29:23 +0000 https://randomnerdtutorials.com/?p=96920#comment-556128 Can this example be applied to Binance Crypto Exchange? I want to make a dashboard for the prices of coin and various other features, send new order and other but they must be signed with an Akey and Skey. If possible post example. Thanks a lot.

]]>
By: Fred https://randomnerdtutorials.com/esp8266-nodemcu-http-post-ifttt-thingspeak-arduino/#comment-508164 Mon, 19 Oct 2020 23:30:31 +0000 https://randomnerdtutorials.com/?p=96920#comment-508164 Hi Rui – Hi Sara

I have a tricky one for you (or could it be basic !)
I run a Async Web server on an ESP8266 with several sensors
Asynchroniously I want, on a particular event (internal trigger level or web button),
to send a request to an other ESP,
i.e. While I am in server mode I want to send a client request !!!!
I fiddled with a flag to trigger a sequence in the loop … Mummm!
some time it works ….
some time it crash the ESP !!!!
Any clue ?

Thanks anyway for your slick tutorials
RGS
Fred

]]>
By: Steve https://randomnerdtutorials.com/esp8266-nodemcu-http-post-ifttt-thingspeak-arduino/#comment-459299 Fri, 22 May 2020 19:05:18 +0000 https://randomnerdtutorials.com/?p=96920#comment-459299 Thanks for introducing me to ThingSpeak. I got your example to work great but I am having problems when I (try to) assign my 8266 with a dedicated IP address. My intent is to have several 8266s which send dht (temp, humidity) readings to an aggregator 8266 which then uploads to ThingSpeak. I’ve actually got it all working BUT when I set up a dedicated IP address like this.

IPAddress ip(192, 168, 10, 148);
IPAddress gateway(192, 168, 10, 1);
IPAddress subnet(255, 255, 255, 0);

and WiFi.config(ip,gateway,subnet); in the setup prior to Wifi.begin(ssid,pw);

Then it fails with an HTTP Response code of -1.

Why does ThingSpeak care what my ip address is. Actually my guess is that it doesn’t but why doesn’t this work?

Thanks.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-http-post-ifttt-thingspeak-arduino/#comment-458886 Thu, 21 May 2020 15:06:31 +0000 https://randomnerdtutorials.com/?p=96920#comment-458886 In reply to Ron Brinkman.

Hi Ron.
That’s a great idea.
Thank you so much for the suggestion.
Regards,
Sara

]]>
By: Ron Brinkman https://randomnerdtutorials.com/esp8266-nodemcu-http-post-ifttt-thingspeak-arduino/#comment-458731 Thu, 21 May 2020 04:29:20 +0000 https://randomnerdtutorials.com/?p=96920#comment-458731 Hi Rui – great tutorial as always – Thanks!

I have a suggestion. Many ESP8266/ESP32 tutorials require authentication credentials. I hate to place them directly in the sketches, because:
1) I might share a sketch sometime and would have the risk of forgetting to remove the credentials.
2) My credentials might change, thereby requiring that I update all my sketch source code rather than simply recompile.

I suggest that your tutorials use the precedent of creating a file in the Arduino library called myLogin.h (or something like that) to contain the ssid, password, API key, or any other confidential information. Then, in each sketch requiring credentials include the following line:

#include <MyLogin.h> // Needed to keep login credentials out of the source code

I have used the same approach to consolidate things commonly used by numerous of my applications into a single easy to manage location. Nothing confidential in this case, but easier to maintain and prevent mistakes/overlooking yet another place that needed to be updated.

]]>