Is the IFTTT maker key is the Applet ID ?
Because I am getting only problem with integration. In thinger platform, output is showing. Plz reply asap plz
For the temperature sensor the tweet interval is changing only when I change the interval in the code. The tweeting interval is not changing when I change the tweet interval in thinger.io API.
for example I put 2min interval in the code but I put 1min interval in the thinger platform.
So whats happening is LED is blinking every one 1min but tweeting is happening every 2min as in the code
Dear, I’ve been trying to use the code adaptation below for the nodemcu to send tweets to me without success. The IFTTT Webhooks are working and I believe that the settings of the thinger.io are correct. Any suggestions for the code to work?
#include <ESP8266WiFi.h>
#include <ThingerWifi.h>
#include <SPI.h>
#include <DallasTemperature.h>
#include <OneWire.h>
#define ONE_WIRE_BUS 12 // Data wire is plugged into port 2 on the Arduino
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);// Pass our oneWire reference to Dallas Temperature.
#define USERNAME "orengo"
#define DEVICE_ID "nodemcu01"
#define DEVICE_CREDENTIAL "caritasCHICO6098"
#define SSID "tupinamba"
#define SSID_PASSWORD "caritasCHICO6098"
ThingerWifi thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
unsigned long previousMillis = 0; // to know when to post the temperature
unsigned int minutes_interval = 60; // variable in minutes for posting the temperature
void call_temperature_endpoint(){
digitalWrite(BUILTIN_LED, LOW);
pson tweet_content;
tweet_content["value1"] = sensors.getTempCByIndex(0);
tweet_content["value2"] = ((analogRead(A0)*0.00489)*3.3);
thing.call_endpoint("temperature_tweet", tweet_content);
digitalWrite(BUILTIN_LED, HIGH);
}
void setup() {
pinMode(BUILTIN_LED, OUTPUT);
thing.add_wifi(SSID, SSID_PASSWORD);
thing["temp"] >> [](pson & out) {
sensors.requestTemperatures(); // Send the command to get temperatures
out["TEMPERATURA"] = sensors.getTempCByIndex(0);
};
thing["PanelDC"] >> [](pson & out){
// Saída para tensão de 5V analógica out["VALORDC"] = ((analogRead(A0)*0.00489)*5);
out["VALORDC"] = ((analogRead(A0)*0.00489)*3.3);
};
// resource that will allow changing the tweet interval
thing["tweet_interval"] << [](pson& in){
if(in.is_empty()) in = minutes_interval;
else minutes_interval = (unsigned int) in;
};
// this resource will allow sending the tweet as requested
thing["tracker_tweet"] = [](){
call_temperature_endpoint();
};
sensors.begin();
}
void loop() {
thing.handle();
unsigned long currentMillis = millis();
if(minutes_interval>0 && currentMillis - previousMillis >= minutes_interval * 60000) {
previousMillis = currentMillis;
call_temperature_endpoint();
}
}