BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

Wemos D1 Blynk wasn't online yet

I am beginner in this topic, especially using blynk. i want to make a project similarly like this
http://www.jogjarobotika.com/blog/modul-iot-internet-of-things-untuk-smart-home-appliance-b136.html

i got an error in the blynk app when i start it, it shows “Smarthome is not online yet” i am using a Wemos D1 R1, when i upload the program there is no error

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266_SSL.h>
#include <DHT.h>
#include <Servo.h>

#define DHTPIN D2
#define DHTTYPE DHT11

char auth[] = "BpbIgYw3wu9j7rPKAJ6jNAPnzKlH9KBI"; 
char ssid[] = "xiaomi"; 
char pass[] = "aaabbbccc"; 

#define pirPin D5
int pirValue;
int pinValue;        

DHT dht(DHTPIN, DHTTYPE);
BlynkTimer timer;            
Servo servo;

BLYNK_WRITE(V0)
{
pinValue = param.asInt();
}

BLYNK_WRITE(V3)
{
servo.write(param.asInt());
}


void sendSensor()
{
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(h) || isnan(t)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
Blynk.virtualWrite(V5, h);
Blynk.virtualWrite(V6, t);
}

void setup()
{
Serial.begin(9600);
delay(10);

Blynk.begin(auth, ssid, pass);

pinMode(pirPin, INPUT);

dht.begin();

timer.setInterval(100L, sendSensor);

servo.attach(D10);
}

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

void getPirValue(void)
{
pirValue = digitalRead(pirPin);
if (pinValue == HIGH)
{if (pirValue==HIGH)
{
Serial.println("Motion detected");
Blynk.notify("Motion detected");
Blynk.virtualWrite(V1, 1);
}
if (pirValue==LOW)
{
Serial.println("Motion undetected");
Blynk.virtualWrite(V1, 0);
}}
else{
if (pirValue==HIGH)
{
Serial.println("Motion detected");
Blynk.virtualWrite(V1, 1);
}
if (pirValue==LOW)
{
Serial.println("Motion undetected");
Blynk.virtualWrite(V1, 0);
}
}
}

for the auth token, I copy it from my blynk, and for SSID and password, I think there is no error.
i don’t know where the error is, I appreciate if there is an explanation for this, thank you.

@Budiman_Prasetyo please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

@PeteKnight I have edited my post, thanks for the information

Until now, my program is still not able to connect to Blynk even though I have adjusted the library

What does this mean?
Adjusted the library in what way?

The serial monitor is your most valuable debugging tool. What does it show?

This is a Blynk Legacy sketch and SSL is no longer supported by the Legacy servers.
You should swap to using #include <BlynkSimpleEsp8266.h>

Pete.

thank you for the information, now my program has successfully connected to blynk