Problem with IFTTT + Webhooks and Google Assistant

Hello,

I have same problem with IFTTT + Webhooks and Google Assistant.

I use a normal relay, but I need similar function (one command for start request, and same command for stop request).

I tryed code writed above, was fine with Blynk, but when IFTTT triggered comand (voice comand), relay go ON (and remain ON), and Blynk do nothing. If I want to stop relay, need use voice command (applet with [“0”] at BODY).

Any thoughts?

code:

#define BLYNK_PRINT Serial
    #include "ESP8266WiFi.h"
    #include "BlynkSimpleEsp8266.h" 
    #include <SimpleTimer.h>
    SimpleTimer timer;

    // You should get Auth Token in the Blynk App. 
    // Go to the Project Settings (nut icon). 
    char auth[] = "aaaa2"; 

    // Your WiFi credentials. 
    // Set password to "" for open networks.
     char ssid[] = "aaa"; 
    char pass[] = "aaa"; 

    #define outputPin 15
    #define inputPin V1
    // pin 2= D4(Placa)  = V1(Aplicatie)


    void setup()
     { 
    // Debug console 
    Serial.begin(9600); 

    
    pinMode( 15, OUTPUT);  //2->5 placa

    digitalWrite( 15, HIGH);
   
        Blynk.begin(auth, ssid, pass); 
    }

    BLYNK_WRITE(V1) {
       if (param.asInt()==1){  // act only on the HIGH and not the LOW of the momentary
    digitalWrite(15, !digitalRead(15));  // invert pin state just once
    timer.setTimeout(1000L, [](){
    digitalWrite(15, !digitalRead(15));  // then invert it back after 1000ms
      Blynk.virtualWrite(V1, LOW); // sau HIGH
      
    });
    }
     }

    void loop() 
    { 
    Blynk.run(); 
    timer.run();
    }

Please don’t tack “Me Too” issues onto other’s topics… I have moved your post into your own topic. Thank you.

I’m sorry, my mistake, but I thought she could tell me more about this problem. I did not want to open a new topic with the same subject :slight_smile:

Well, that one was over 3 months old… and if we allowed that, then this forum would only have a about a dozen topics… but each going back a few years and consisting of hundreds of “Me Toos” :smile:

I think, vitoraugustodesm is still with us :stuck_out_tongue_winking_eye:

just joking

Sorry, but I am a little confused by your question.

Are you trying to pulse the relay for 1 second when a Google command is given, or are you trying to keep it on until another google command is given to turn it off?

I try to pulse the relay for short time with Google Assistant.

Until now, I see, Webhook use just URL, token and pin assignement from Blynk. Not any code.

Google wasn’t definitive on that word… who or what is a vitoraugustodesm? Or do I even want to open that can-o-worms :stuck_out_tongue:

@mircea, try this to see if it works:

1 - remove the “digitalWrite( 15, HIGH);” on your Void setup()
2 - Reduce the time it takes for toggling the state, substituting the “1000L” with “200L”

Then, your webhooks url should look like: http://IP adress for your region/Your Token/update/v1

The method “PUT”, the Content Type “application/json” and on the Body you should put [“1”]

:wink:

It’s me! :sweat_smile:

1 Like

I just clued in :blush: … I thought I was somehow being “labeled” when I saw the “just joking” part :rofl: never thought to compare user names… oops.

@mircea Doesn’t always work out this way… so basic policy is still valid :wink:

All is good then… carry on… :stuck_out_tongue_winking_eye:

1 Like

Thanks a lot!!!
It work :slight smile:
my mistake was in Webhooks, I put D15 instead V1 …
…and sorry for my earlier joke :sunglasses:

1 Like

Glad it worked !! you will see how its amazing to command devices like that through the google assistant ! I am addicted right now! every day, when its time to sleep it just takes one Ok google!.. :wink:

Google assistant (Alexa or other …) adds addiction. Within days, my family gives me mental hospital booking - hear me speaking alone in the house :stuck_out_tongue_closed_eyes:

1 Like