BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Help with IFTTT and Blynk

Hello Blynk Community!

I need some help with my NodeMCU

First of all i started yesterday and i am stuck where i am now
My goal is to turn on and off a relay with my Google Home
I use IFTTT and Blynk together with a single relay

Everything works… I can open my phone and turn the relay on and off
I can also open a browser and use that with ?value=1 or ?value=0

https://139.59.206.133/[TOKEN]/update/D0?value=1
https://139.59.206.133/[TOKEN]/update/D0?value=0

NOTE: The ip is from using Command prompt to ping blynk-cloud.com

But whenever i try to use it with IFTTT it will prompt with a error (I tried with two methods: GET and PUT

With method PUT:
Unable to make web request. Your server returned a 500
With method GET:
Unable to make web request. Your server returned a 400

My webhook at IFTTT is made like this:

URL: https://139.59.206.133/[TOKEN]/update/D0
Method: GET / PUT
Content type: application/json
Body: ["1"]

The syntax for GET and PUT are slightly different.

This is an example for someone in a different part of the world (hence the different IP address):

If doing it this way doesn’t work then appending “:8080” to the end of the IP address would be worth trying. Also note that you’re using https and the example uses http.

Pete.

I think? you would need to use :9443 or :443 for HTTPS (SSL for Local Server)

1 Like

I have tried with HTTP and also with the port :8080
http://139.59.206.133:8080/[TOKEN]/update/D0

Have have tried it with both PUT and GET

This didnt help, but thank you for taking your time

@PeteKnight nevermind, i got i working by adding ?value=1 to the URL

But also i have another problem, is it possible for it to turn on and turn off a second later?

Hmmm, you mean like this?

image

Not directly within Google Home or IFTTT, but you can do it in code.
Here’s an example (although I’m NOT advocating the use of delay() within this function, you should probably use a non-blocking lambda timer instead).

Pete.

Hi Peter,
Just to say a big thank you for this, I have been struggling with the ‘PUT’ method and kept getting server returned a 500, but your method worked first time and (so far!) every time.
Thanks a million!

1 Like