IFTT Virtual Pin-Webhook and ESP32

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.

In the webhook of the IFTT I got:

https://my_local_server/Auth/update/V5?value=1

PUT

Application/json

[“1”]

I’m confused by what you’ve written…

Are you using Blynk legacy with your own local server?
If so then why are you using Blynk Edgent?

If you’re using Blynk IoT then your API syntax is incorrect.

Pete.

I’m working with Blynk IoT. How is the API syntax?

Also, this is a GET not a PUT, and you should pul all of the API call in the URL field in IFTTT

Pete.

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
} 

I don’t understand the question.

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…

Pete.

Ok, sorry, sir.
https://45.55.96.146
/external/api/update?token=REDACTED&v5=100

image

This is what I mean with content type and body. Thank you a lot for answer my cuestions. Greetings from México.

OMG. I DID IT.
It was the server address. I used blynk-cloud.com when it is blynk.cloud.

The url that worked for me was:
https://64.225.16.22/external/api/update?token=REDACTED&v5=100

Thank you so much, Sir.

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

Pete.

please search the forum