Can't get the web hook demo working on WeMos D1 R2

Hi all,
I am trying hard to get the web hook demo to work.
All I am getting is on the output window is.

 / _ )/ /_ _____  / /__
 / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
 /___/ v0.4.8 on Arduino
 
 [9427] Connecting to blynk-cloud.com:8442
 [10054] Ready (ping: 1ms).
 WebHook data:
 Array

In the webhook widget I am using.

https://api.sunrise-sunset.org/json?lat=50.4495484&lng=30.5253873&date=2016-10-01/0/

Something is wrong, with my widget code ?
Edit.
I have tried /V0/
Using GET and json

Study this [SOLVED] Webhook widget demo does not return any value and come back and let us know if it solves your issues.

Thanks for that link.
But I had been trying to get it working using that link, and still can’t get it going.

Paste the smallest sketch possible that demonstrates your problem and we will try to take a look at it.

#define BLYNK_PRINT Serial
// Allow for receiving messages up to 512 bytes long
//#define BLYNK_MAX_READBYTES 512

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

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

char ssid[] = "xxxxx";
char pass[] = "xxxx";

BLYNK_WRITE(V0)
{
	Serial.println("WebHook data:");
	Serial.println(param.asStr());
}

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

	Blynk.begin(auth, ssid, pass);
	// You can also specify server:
	//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
	//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);

	//Blynk.virtualWrite(V0, "https://raw.githubusercontent.com/blynkkk/blynk-library/master/extras/logo.txt");

	// You can perform HTTPS requests even if your hardware alone can't handle SSL
	// Blynk  can also fetch much bigger messages,
	// if hardware has enough RAM (set BLYNK_MAX_READBYTES to 4096)
	Blynk.virtualWrite(V0, "https://api.sunrise-sunset.org/json?lat=50.4495484&lng=30.5253873&date=2016-10-01");
	Serial.println("https://api.sunrise-sunset.org/json?lat=50.4495484&lng=30.5253873&date=2016-10-01"); //I just put this here to make sure it was hitting this.
}

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

This is what I have put into the web hook
I have it on a tab on another page.

My original Humidity and temperature widgets are on the other one. They are using V1 and V2 and are working when I upload my humidity .ino.

https://api.sunrise-sunset.org/json?lat=50.4495484&lng=30.5253873&date=2016-10-01/0/

I left the auth token in … you may be able to see something at your end ?

Do I have to use this instead ?
https://api.sunrise-sunset.org/json?lat=50.4495484&lng=30.5253873&date=2016-10-01/pin/0/
It’s not very clear ?
I tried it … but still no luck.

That is much better but lose the 0/ from the end.

Ok… I tried these.
``https://api.sunrise-sunset.org/json?lat=50.4495484&lng=30.5253873&date=2016-10-01/pin/0
https://api.sunrise-sunset.org/json?lat=50.4495484&lng=30.5253873&date=2016-10-01/pin/V0
https://api.sunrise-sunset.org/json?lat=50.4495484&lng=30.5253873&date=2016-10-01/pin/v0```

Still no luck…
Thanks for the quick replies.
Much appreciated.

I have a working sketch for you, will send asap.

Here is Serial Monitor:

[5079] Connecting to MTN WIFI 19996
[8080] Connected to WiFi
[8080] IP: 192.168.10.168
[8080] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.4.8 on Arduino

[8086] Connecting to blynk-cloud.com:8442
[8283] Ready (ping: 102ms).
WebHook data:
{"results":{"sunrise":"3:59:32 AM","sunset":"3:35:01 PM","solar_noon":"9:47:16 AM","day_length":"11:35:29","civil_twilight_begin":"3:27:09 AM","civil_twilight_end":"4:07:24 PM","nautical_twilight_begin":"2:49:16 AM","nautical_twilight_end":"4:45:16 PM","astronomical_twilight_begin":"2:10:35 AM","astronomical_twilight_end":"5:23:58 PM"},"status":"OK"}

As per the sketch below just set the url in the app to https://api.sunrise-sunset.org/pin/

// WebhookSunrise.ino for https://community.blynk.cc/t/cant-get-the-web-hook-demo-working-on-wemos-d1-r2/17486
// in the app set the url as https://api.sunrise-sunset.org/pin/
#define BLYNK_PRINT Serial
//#define BLYNK_MAX_READBYTES 512  // Allow for receiving messages up to 512 bytes long

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char ssid[]   = "xxxx";
char pass[]   = "xxxx";
char auth[]   = "xxxx";
char server[] = "blynk-cloud.com";
String tosendtoWebhook = "/json?lat=50.4495484&lng=30.5253873&date=2016-10-01";

BLYNK_WRITE(V0)
{
  Serial.println("WebHook data:");
  Serial.println(param.asStr());
}

void setup()
{
  Serial.begin(115200);
  Serial.println();
  Blynk.begin(auth, ssid, pass, server);
  Blynk.virtualWrite(V0, tosendtoWebhook);
}

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

Compile error in visual studio.

I tried also in the Arduino IDE also errors.

Cancel that… my fault.

Ok…
I made a completely new project.
Rebooted the iPhone.
Uploaded the sketch you kindly supplied.
Typed the full url
https://api.sunrise-sunset.org/json?lat=50.4495484&lng=30.5253873&date=2016-10-01/pin/0 into the webhook widget checking very carefully that this is what I have typed in.
Selected GET as the method
Selected application/json as the type.
Ran the project in the blynk app.
Compiled and uploaded to the board.

But still get this.

Uploading to I/O board
Opening port
Port open

[8959] Connecting to GamerShrimp-25G
[10459] Connected to WiFi
[10460] IP: 192.168.1.19
[10460]
___  __          __
/ _ )/ /_ _____  / /__
/ _  / / // / _ \/  '_/
/____/_/\_, /_//_/_/\_\
/___/ v0.4.8 on Arduino

[10466] Connecting to blynk-cloud.com:8442
[13430] Ready (ping: 1ms).
WebHook data:
Array``

Edit .. I just noticed a mistake on my end.
I have just put in 
```https://api.sunrise-sunset.org/pin/0```
In the widget URL as per your instructions.

But still not working

Will try tommorow.
Too tired.

Thanks very much for your assistance!

No you didn’t or you would have the same Serial Monitor as me.

If you were to bang your url into a browser you would see the same “array” as Webhook is giving you.

Where in my working code is there a url ending with /0 ?

Lose the /0 as per my earlier instruction.

Success !

[9321] Connected to WiFi
[9322] IP: 192.168.1.19
[9322]
___  __          __
/ _ )/ /_ _____  / /__
/ _  / / // / _ \/  '_/
/____/_/\_, /_//_/_/\_\
/___/ v0.4.8 on Arduino

[9327] Connecting to blynk-cloud.com:8442
[13132] Ready (ping: 0ms).
WebHook data:
{"results":{"sunrise":"3:59:32 AM","sunset":"3:35:01 PM","solar_noon":"9:47:16 AM","day_length":"11:35:29","civil_twilight_begin":"3:27:09 AM","civil_twilight_end":"4:07:24 PM","nautical_twilight_begin":"2:49:16 AM","nautical_twilight_end":"4:45:16 PM","astronomical_twilight_begin":"2:10:35 AM","astronomical_twilight_end":"5:23:58 PM"},"status":"OK"}

Thanks Costas.
I had a long day.
Cheers !

P.S. This is my first ever json query :slight_smile: On any project.