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

Help, unable to run webhook

Guys

Having a problem with webhooks see below, can any one help me ?

Example 1
curl -v http://45.55.96.146/MYTOKENREMOVED/pin/V0?value=1

  • Trying 45.55.96.146…
  • Connected to 45.55.96.146 (45.55.96.146) port 80 (#0)

GET /MYTOKENREMOVED/pin/V0?value=1 HTTP/1.1
Host: 45.55.96.146
User-Agent: curl/7.47.0
Accept: /

< HTTP/1.1 404 Not Found
< connection: keep-alive
< access-control-allow-origin: *
< content-length: 0
<

  • Connection #0 to host 45.55.96.146 left intact

curl -v http://45.55.96.146/MYTOKENREMOVED/pin/V0

  • Trying 45.55.96.146…
  • Connected to 45.55.96.146 (45.55.96.146) port 80 (#0)

GET /MYTOKENREMOVED/pin/V0 HTTP/1.1
Host: 45.55.96.146
User-Agent: curl/7.47.0
Accept: /

< HTTP/1.1 404 Not Found
< connection: keep-alive
< access-control-allow-origin: *
< content-length: 0
<

  • Connection #0 to host 45.55.96.146 left intact

What IP is that?.. if for your Local Server, then you need port 8080

And you seem to have incomplete syntax in your API commands… for example…

http://xxx.xxx.xxx.xxx:8080/<AUTHTOKEN>/update/V0?value=Hello Blynker - To send V0 the string “Hello Blynker”

http://xxx.xxx.xxx.xxx:8080/<AUTHTOKEN>/get/V2 - Get the value of V2

Sorry sir this is the blynk cloud I updated to topic to blynk cloud

curl -v http://46.101.143.225/TOKEN_REMOVED/get/V0

  • Trying 46.101.143.225…
  • Connected to 46.101.143.225 (46.101.143.225) port 80 (#0)

GET /TOKEN_REMOVED/get/V0 HTTP/1.1
Host: 46.101.143.225
User-Agent: curl/7.47.0
Accept: /

< HTTP/1.1 400 Bad Request
< connection: keep-alive
< content-type: text/plain;charset=utf-8
< access-control-allow-origin: *
< content-length: 14

The IP is what i get when pinging the cloud

ping cloud.blynk.cc

Pinging blynk-cloud.com [45.55.96.146] with 32 bytes of data:
Reply from 45.55.96.146: bytes=32 time=229ms TTL=52
Reply from 45.55.96.146: bytes=32 time=228ms TTL=52
Reply from 45.55.96.146: bytes=32 time=228ms TTL=52
Reply from 45.55.96.146: bytes=32 time=228ms TTL=52

Ping statistics for 45.55.96.146:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 228ms, Maximum = 229ms, Average = 228ms

So,based on your screenshot, this is an IFTTT issue, not an issue relating to the Blynk Webhook widget.

You shouldn’t be using a curl command in IFTTT. I suggest you search the forum for recent posts about IFTTT.

Pete.

Okay I got working now I had to use the auth token of my raspberry PI. Any one know how to switch a relay on and off ideally when i send [“1”] the garage now opens however after sending [“1”] I also need to send [“0”] immediately after or with a pause. Any one know the syntax for this ?

More info needed about where you’re sending this [“1”] from.

Pete.

Hi Pete

from ifttt

as per below

Okay, let me put it another way…
What are you using to trigger the sending ofthis command?

Is it coming direct from Google Assistant, as in your screenshot, or is it coming from an MCU of some sort, and what method are you using to initiate this trigger?

Where does Blynk fit into the equation, and what’s the bigger picture?

Pete.

Okay so let me break it down apologies for vagueness

I have a raspberry pi that is hooked up to my garage via relays…
The PI then connect to the blynk cloud with the auth token.
The Blynk App on my phone works perfectly to open the garage.

Now I want google integration for that I am using IFTTT
Key word with google assistant which fires a webhook which needs to send value of 1 and then 0. So far its partially working but I am still trying to send a value of 1 then 0 (This is like a push button to open the garage because if I send 1 only the relay is triggered but the relay remains On)

I’m not familiar with Google Assistant, so don’t know if there’s a simple solution available directly.

If not then my approach would be to solve the problem using code.
I have no idea what language you’re using for your Pi code, but in C++ terms, when the webhook puts your Blynk virtual pin High, that will trigger a BLYNK_WRITE event. This event triggers on both High and Low values, so you’ll need to detect if it’s a High event and start a timer (probably a Blynk time-out timer) to stop your relay after a pre-defined time.

Pete.