IFTTT. Ime i prezime: Larisa Osmanović Broj indeksa: 8/21.
ŠTA JE TO IFTTT?. IFTTT (If This Than That) je aplikacija koja nam omogućava automatizovanje raznih procesa. Automatizacija se postiže pomoću takozvanih apleta, koji su poput makroa i koji povezuju više aplikacija za pokretanje automatskih zadataka. Možemo da uključimo ili isključimo aplet pomoću IFTTT sajta ili IFTTT mobilne aplikacije. Takođe, možemo da kreiramo sopstvene aplete ili pravimo varijacije postojećih..
Neke od najpopularnijih aplikacija koje mogu raditi sa IFTTT su : - Google kalendar - Dropbox - Google dokumenti - Google tabele - Google Drive - Facebook - Messenger - Skype - E-mail - Wikipedia - YouTube - ….
KO KORISTI IFTTT ? IFTTT može koristiti svako ko koristi više različitih aplikacija ili w eb usluga na jednom ili više uređaja ili sa jednim ili više pametnih uređaja. To je idealna usluga za sve koji žele smanjiti ručne, tehnološki vođene zadatke automatizacije. KAKO ZAPOČETI SA IFTTT-OM? IFTTT je besplatan za korištenje i zahtijeva samo adresu e-pošte, lozinku i korisničko ime za prijavu na nalog. To može mo učiniti iz web preglednika na IFTTT.com ili preuzimanjem IFTTT-a za iOS ili Android uređaje. KAKO SE KORISTI IFTTT ? Navođenje prim j era IFTTT apleta može n am pomoći da bolje shvati mo kako usluga funkcioniše. Npr . Ukoliko želimo da nam je temperatura sobe uvijek veća od 15 °C, onda možemo napraviti da nam na email stiže obavještenje da je temperatura sobe ispod 15 °C. U tom slučaju uključićemo grijanje ..
KREIRANJE IFTTT NALOGA. Idemo na zvaničnu stranicu: https://ifttt.com i kliknemo dugme “Log in” na vrhu stranice..
IFTTT Webhooks Space Q My Applets Explore Explore Developers v Create O Webhooks.
Zatim u prozoru Webhooks kliknemo na“Documentation” ..
Your key is. nb6LoOhslltrjv5FR9DNyHTnkG2ehgTOlzJiAw7U-O Back to service To trigger an Event Make a POST or GET wet) request to: https://maker.ifttt.com/trigeer/ {event) With an optional JSON Of: { "valuel" • , "value2" . , "valuer The data is cnrnpletely optional. and you can also pass valuel, value2. and value' as query parameters or form variables. This cnntent will be on to the action in your Applet. You try it with curl from a command line. curl •X PCST Please read our FAQ on using Webhooks for more info. Test.
C ifttt.com/create Cancel Create your own Upgrade for more, faster, better Applets with advanced features. You're using I Of 5 Applets Add Then That.
Potražimo “Webhooks” u pretrazi..
Web hooks Receive a web request with a JSON payload This trigger fires every time the Maker service receives a web request to notify it of an event. For information on triggering events, go to your Maker service settings and then the listed URL (web) or tap your username (mobile) Receive a web request This trigger fires every time Maker receives a web request to notify it of an event. For information on triggering events, go to your Maker service settings and then the listed URL (web) or tap your username (mobile).
U sljedećem prozoru unes emo naziv događaja kao email, a zatim klikn emo na “Create trigger”..
C ifttt.com/aeate Cancel Create your own for more, faster, Applets with advanced features. You're using I of 5 Applets Receive a web request Then That.
< Back Choose an action Email Send me an email This Action will send you an HTML based email. Images and links are supported..
This Action will send you an HTML based emaiL and Enks supported. Subject The event named "l EventName occurred on the Maker Webhooks service Add ingredient Body What: f EventName When: OccurredAt Extra Data: avaluel„, LVa1ue2 Value3 Add ingredient Create action.
U cilju realizacije navedenog primjera moramo napraviti kod. To možemo učiniti na sajtu http://easycoding.tn/ ..
9 C A Not secure I TUNIOT INIOUT Serial Various Conversion String IOT IOT Station IOT Acx:ess Point IOT Server IOT Client Web Services FireBase Web page Display serial LCD 12C OLED Advanced 1/0 I-cX)-ps Math Text Variables Functions FOR ESP32 Disconnect Network Main mp easycoding.tn omine version Starting connec•. ssid password Is Connected! maker.Itttl.com E 1ish (D G) Clean, safe code in your repo web Service IFTTT email VallR 3 The email was ænt!.
#include <WiFi.h> WiFiClient client; String MakerIFTTT_Key ; ;String MakerIFTTT_Event; char *append_str(char *here, String s);return here-1;} char *append_ul(char *here, unsigned long u) char post_rqst[256];char *p;char *content_length_here;char *json_start;int compi; void setup() Serial.println("Connected!"); } void loop() { if (client.connect("maker.ifttt.com",80)) { MakerIFTTT_Key =""; MakerIFTTT_Event ="email"; p = post_rqst; p = append_str(p, "POST /trigger/"); p = append_str(p, MakerIFTTT_Event); p = append_str(p, "/with/key/"); p = append_str(p, MakerIFTTT_Key); p = append_str(p, " HTTP/1.1\r\n"); p = append_str(p, "Host: maker.ifttt.com\r\n"); p = append_str(p, "Content-Type: application/json\r\n"); p = append_str(p, "Content-Length: "); content_length_here = p; p = append_str(p, "NN\r\n");.
Šema:.
#include <WiFi.h> #include "DHT.h" WiFiClient client; String MakerIFTTT_Key ; ;String MakerIFTTT_Event; char *append_str(char *here, String s);return here-1;} char *append_ul(char *here, unsigned long u) char post_rqst[256];char *p;char *content_length_here;char *json_start;int compi; float temp; #define DHTPIN 5 #define DHTTYPE DHT11 DHT dht(DHTPIN,DHTTYPE); void setup() Serial.println("Connected!"); } void loop() { temp = dht.readTemperature(); // read analog volt from sensor and save to variable temp Serial.print("TEMPERATURE = "); Serial.print(temp); // display temperature value Serial.print("°C\n"); delay(1000); if(temp<15){ digitalWrite (26, HIGH); Serial.println("Temperatura manja od 15 °C"); delay(10000);.
Ispis na Serial monitoru.
Email koji dobijamo.
KRAJ.