HTTP GET Request for IFTTT with ENC28J60 Ethernet Shield

Hi,
I want to sent an Email via IFTTT with my Arduino and the EthernetShield. I tried to do it with the following Code but it wont trigger my Event.
It is just a Test-Code for sending one Email.
My Pinout is:

ENC28J60 Modul   Arduino Uno
5V               5V
GND              GND
SCK              PIN 13
SO               PIN 12
ST               PIN 11
CS               PIN 10
RST              RESET
#include <UIPEthernet.h>


EthernetClient client;
uint8_t mac[6] = {0x00,0x01,0x02,0x03,0x04,0x05};
char server[] = "maker.ifttt.com";

 int t = 10;
 int h = 50;
  
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
 
  if(Ethernet.begin(mac) == 0){
    Serial.println("Failed to configure Ethernet using DHCP");
    while(1); // kein Netzwerk? Dann Ende!
  }

   if(client.connect(server,80)) {
    client.print("GET /trigger/Tmp/with/key/Vq****************?value1="); 
        client.print(t);
        client.print("&value2=");
        client.print(h);
        client.println(" HTTP/1.1");
    client.println("Host: maker.ifttt.com");
    client.println();
   }
   else{
          Serial.println("Connection to server failed");
          delay(5000);
      }
  
}

void loop() {
  // put your main code here, to run repeatedly:

}

print the http response

I did it like this but there is no other Output than "Connected to server"

#include <UIPEthernet.h>
#include "utility/logging.h"


EthernetClient client;
uint8_t mac[6] = {0x00,0x01,0x02,0x03,0x04,0x05};
char server[] = "maker.ifttt.com";

 int t = 10;
 int h = 50;
  
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
 
  if(Ethernet.begin(mac) == 0){
    Serial.println("Failed to configure Ethernet using DHCP");
    while(1); // kein Netzwerk? Dann Ende!
  }


   if(client.connect(server,80)) 
   { 
      Serial.println("Connected to server");
    
      client.print("GET /trigger/Tmp/with/key/VqTnw5WtC6mDlL5tmd6Fr?value1=");
      client.print(t);
      client.print("&value2=");
      client.print(h);
      client.println(" HTTP/1.1");
      client.println("Host: maker.ifttt.com");
      client.println();

      while(client.connected()) 
        {
          if(client.available())
          {
          // read an incoming byte from the server and print it to serial monitor:
          char c = client.read();
          Serial.print(c);
          }
        }
      client.stop();
      Serial.println();
      Serial.println("disconnected");
   }
   else
   {
      Serial.println("Connection to server failed");
      delay(5000);
   }
  
}


void loop() {
  // put your main code here, to run repeatedly:

}

What happens if you try the same thing from a browser?

If I type this "https://maker.ifttt.com/trigger/Tmp/with/key/Vq************?value1=10" in my Browser, the Event is triggered and I'm getting a notification.
The Browser is showing me this "Congratulations! You've fired the Tmp event"

But you are hitting port 80 in your code, so it looks like http not https.

oh okay, so how do i know which port i should use?

  1. However, do you know if your library supports https and if so, how you tell it to use it?

No I dont know how to use, i think thats why I have a Problem with my code.
The library should be able to do it in my opinion.

UIPEthernet doesn't support secure connection. you could use the EthernetENC library with the SSLClient library if your Arduino has an ARM MCU

I've got an Arduino Uno with an ATMEGA328P.
I'm not sure if this is an ARM MCU

it is not ARM. it is AVR

Okay, so there is no way to send a Notification with my Arduino and the Ethernet-Shield via IFTTT?
Or does anybody can help me with it?

No, there is no way to handle a HTTPS connection (which require SSL encryption) with a such low computational power MCU, at least as far as I'm aware.
You need a different board.

WiFi shields and modules can do secure connection. of course Ethernet modules with secure connection support exist too, but there is no Arduino library for them. for example ENC424J600

Okay good to know, thank you!
Is there any special wifi shield/module which i should use?

esp8266 is used most because it is cheap. it communicates over Serial and usually causes troubles for beginners. I wrote the WiFiEspAT library for using esp8266 as WiFi shield.

Adaruit ATWNC1500 shields and modules use SPI and are reliable. they are derivatives of the Arduino WiFi 101 shield design and are used with the Arduino WiFi101 library.

both libraries are very similar to the Ethernet library

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.