#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.
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.
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!