Good day, guys. I’m working with IFTT and the Google Assistant service. The trigger is correct and Google Assistant tell me what I programed but the instruction isn’t read by the virtual pin.
I’m using the example Blynk.Edgent in my ESP-32, my virtual pin is V5 and I want to turn on/off a relay. I already do it with the application in my cellphone and that’s awsome.
The content type and the body syntax is the same? I already try to change my URL like in the link but doesn’t work
Now i’m using a dimmer for the light, but the virtual pin it is the same.
The new URL
https://{blynk.cloud}/external/api/update?token={token}&v5=100
Also, I change the PUT to GET
The program I use is this
#include <RBDdimmer.h>
// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "TMPLtqRZP2Qm"
#define BLYNK_DEVICE_NAME "Esp32 52596"
#define BLYNK_FIRMWARE_VERSION "0.1.0"
#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG
#define APP_DEBUG
// Uncomment your board, or configure a custom board in Settings.h
#define USE_WROVER_BOARD
//#define USE_TTGO_T7
#include "BlynkEdgent.h"
const byte outputPin = 25; // PWM pin for dimmer
const byte zerocross = 26; // for boards with CHANGEBLE input pins
dimmerLamp dimmer(outputPin, zerocross); //initialase port for dimmer for ESP8266, ESP32, Arduino due boards
int outVal = 0; // Intialisation value for dimmer
int dim_val; // dimmer value to dim the appliance
void setup()
{
Serial.begin(115200);
delay(100);
dimmer.begin(NORMAL_MODE, ON);
BlynkEdgent.begin();
}
void loop() {
BlynkEdgent.run();
}
BLYNK_WRITE(V5) { // Set to your virtual pin
outVal = param.asInt(); // Get State of Virtual Button
dim_val = map(outVal, 0, 100, 0, 100); // mapped the value for dimmer
dimmer.setPower(dim_val); // Set dimmer power
Blynk.virtualWrite(V1, dim_val); //sending to Blynk
}
It’s impossible to tell from what you’ve posted exactly what url you’re using.
It would make more sense if you posted the exact url, but replace your Auth token with the word “REDACTED”
As far as the server address is concerned, you need to read the rest of the documentation…
That won’t work, because 45.55.96.146 is the IP address of the Legacy New York cloud server.
As I’ve said before, you need to read the documentation:
and look at which server you are using (bottom right of your Blynk.console browser window or in the About section of the app) and use that in your API call.
ALL of the API call should go in the URL section of the IFTTT recipe, the body section should be empty and the method should be GET