I tried to execute WEB HOOK GET example from here
->> Blynk Example Browser
for my project but it’s not work…
so I search similar documents to solve this problem
and I guess that webHook and virtual pin are not communicate each other. because when I tried to set webHook datastream to V0 and webHook url to /pin/, it cause error “URL is invalid”
++ /pin/ color is not green, just like other letters.
below code is my device code
WARNING!
It's very tricky to get it working. Please read this article:
http://help.blynk.cc/hardware-and-libraries/arduino/esp8266-with-at-firmware
This example shows how to fetch data using WebHook GET method
App project setup:
WebHook widget on V0, method: GET, url: /pin/
*************************************************************/
// Template ID, Device Name and Auth Token are provided by the Blynk.Cloud
// See the Device Info tab, or Template settings
#define BLYNK_TEMPLATE_ID "---"
#define BLYNK_DEVICE_NAME "---"
#define BLYNK_AUTH_TOKEN "---"
// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial
// Allow for receiving messages up to 512 bytes long
//#define BLYNK_MAX_READBYTES 512
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
char auth[] = BLYNK_AUTH_TOKEN;
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "blynkTest";
char pass[] = "98765432";
// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial1
// or Software Serial on Uno, Nano...
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX
// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600
ESP8266 wifi(&EspSerial);
BLYNK_WRITE(V0)
{
Serial.println("WebHook data:");
Serial.println(param.asStr());
}
void setup()
{
// Debug console
Serial.begin(9600);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);
Blynk.begin(auth, wifi, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, wifi, ssid, pass, "blynk.cloud", 80);
//Blynk.begin(auth, wifi, ssid, pass, IPAddress(192,168,1,100), 8080);
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");
}
void loop()
{
Blynk.run();
}
this is device code, and virtual pin V0 setting
I hope to find my mistakes and solve this problem😞