Connecting to blynk-cloud.com:80

Hi all, some weeks ago I made a small project and it was running quite good. Now the last days I tried reconstructing it and I get this message. Sometimes the project works sometims it doesn’t connect. I use Wemos D1 and I assume it has to do something with Blynk libraries. I use latest Esp and Blynk Libraries in arduino

Big assumption… have any data, code, repeatable dataum, etc. to back it up :stuck_out_tongue_winking_eye: Or are we just guessing what to do about this little issue of yours?

Try answering some of the requirements in all those instructions you deleted in order to post this… version numbers, not “latest”… as that seems rather subjective :wink:

Where do you “see” this “message”?

Show your code

Tell us about any changes you have made since it last worked, etc


Before creating the topic

  1. Search forum for similar topics
  2. Check http://docs.blynk.cc and http://help.blynk.cc/
  3. Add details :
    • Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
    • Smartphone OS (iOS or Android) + version
    • Blynk server or local server
    • Blynk Library version
    • Add your sketch code. :point_up:Code should be formatted as example below.

Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.

```cpp

void loop()

```

Ok first of all today I connected my board and opened serial monitor after “Connecting to blynk-cloud.com:80” after that it written ping ok and everything run ok, BUT I wanted to be sure so I re-uploaded the code and I had the same issue it keeps giving me “Connecting to blynk-cloud.com:80” again and again, I’ve tried to reset the board to put it external power but still no solution…I use Wemos D1 mini with arduino 1.8.2 I have 2.4.0 Esp Library and Installed 0.5.1. blynk library. And here is my code :

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

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "75c20255b1154645b8efa5aa927d880b";

SimpleTimer timer;

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "XXXXXX";
char pass[] = "XXXXXX";

int state;
int condition = 0;
int timerOn = 0;
int flag = 1;
WidgetLED led1(V1);
WidgetLED ledmove(V2);

void myTimerEvent()
{
 condition = condition + 1;

 if (condition == 5) // Led to be on in Blynk app, now for example is 5 secs
 {
   ledmove.off();
   condition = 0;
   flag = 1;
 }
 //The next 9 lines are if we want to have for small period of time energized output, if we don't want time we can just comment them!
 timerOn = timerOn + 1;

 if (timerOn == 25) // The time of our output (relay,led,light) to be on for example now is 25 secs
 {
   led1.off();
   digitalWrite(D4, HIGH);
   timerOn = 0;
   flag = 1;
 }

 int MoveOfPerson = digitalRead(D7); //read pin7 for any movement
 if (MoveOfPerson) // You can write any condition to trigger e-mail sending
 {
   if (flag == 1)
   {
     Serial.println("Kapoios Erxetai"); // This can be seen in the Serial Monitor
     // Blynk.email("Subject: PIR Sensor", "Kapoios Erxetai...");
     // This line will automatically send an email to the address we set in the application widget.
     Blynk.notify("Κώστα Προσοχή Κάποιος έρχεται...");
     //We have to keep in mind that there are limits for notifications and they are 1 notification every 15 seconds, nothing else.
     digitalWrite(D4, LOW);
     led1.on();
     // Or, if you want to use the email specified in the App (like for App Export):
     //Blynk.email("Subject: Button Logger", "You just pushed the button...");
     ledmove.on();

     flag = 2;

   }
 }
}




void setup()
{
 Serial.begin(74880);
 Blynk.begin(auth, ssid, pass);
 pinMode(D7, INPUT); // Where the pir sensor is connected
 pinMode(D4, OUTPUT); //Connection of the relay or a small led
 timer.setInterval(1000L, myTimerEvent);
}

BLYNK_WRITE(V0)
{
 state = param.asInt();
 if (state == 1) {
   digitalWrite(D4, LOW);
   led1.on();
 }

 else {
   digitalWrite(D4, HIGH);
   led1.off();
 }
}


void loop()

{
 Blynk.run();
 timer.run(); // Initiates SimpleTimer
}
1 Like

Which lwIP have you chosen in the IDE?

If you are using the default try switching to v1.4.

1 Like

Yes Costas I was using the default and changed to v1.4 still no luck though.

@KOTSOS5 On reading the code in myTimer event, all the conditions are timer driven, although with your own code - 5, 25 and 1 sec. Why not just put them as 3 separate routines and get them invoked by 3 different timers? Much cleaner that way. I still do not know why the system is trying to reconnect after connecting. This probably will not solve the problem but makes the code clean and easy to work with. May solve if this solves some flooding issues, not sure.

You should try and use BLYNK_CONNECTED() event call to figure out what happens after that. Hope this helps.

Hi, i’m a rook at programming that’s why you may see some faults in code, this doesn’t mean that the code doesn’t work as I wanted though :slight_smile:

True… but when combining ‘gud nuff’ code with the timing needs of Blynk the result may be a factor in the issue that results in you requesting assistance… thus it has been recommended that you consider cleaning up and/or changing the timing routines, if for no other reason then easier troubleshooting on your part as well as ours. :wink:

You might also consider ditching the SimpleTimer library as Blynk has already integrated it with BlynkTimer… it may already superseded Simple timer, but better to code it correctly.

#include <SimpleTimer.h> //  <-- Remove

BlynkTimer timer;  //  <-- Change

Ok changed that also, but still…

After I connected I took these messages :

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
~ld
[57] Connecting to OTEdae998
[5150] Connected to WiFi
[5150] IP: 192.168.1.9
[5150] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.5.1 on Arduino

[5158] Connecting to blynk-cloud.com:80
[5483] Ready (ping: 148ms).
Kapoios Erxetai = Somebody is coming
Kapoios Erxetai
Kapoios Erxetai
Kapoios Erxetai

Ok all work great but I pressed reset and then…

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
~ld
[57] Connecting to OTEdae998
[1558] Connected to WiFi
[1558] IP: 192.168.0.100
[1558] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.5.1 on Arduino

[1567] Connecting to blynk-cloud.com:80
[6568] Connecting to blynk-cloud.com:80
[11569] Connecting to blynk-cloud.com:80
[16570] Connecting to blynk-cloud.com:80
[21571] Connecting to blynk-cloud.com:80
[26572] Connecting to blynk-cloud.com:80
[31573] Connecting to blynk-cloud.com:80
[36574] Connecting to blynk-cloud.com:80

As you can see no luck the system works totally random

This part tells me you may not be using the correct board setting in your IDE. I always use the Wemos D1 R2 & Mini, 4M (1M SPIFFS) and the rest are all defaults, including v2 prebuilt and honestly have not been seeing all these WiFi disconnect issues that some others have… perhaps I am just one of the lucky ones?

I use the exact same settings with you, I also tried Costas suggestion but nothing happened, I’ve also tried to switch to other Wemos board settings but still no luck, you better try to start thinking about lottery though… :slight_smile:

Yuppie!!! I found the solution after so long, but maybe you can guide me how this happens. The basic difference since the last time it was running like a charm it was that I just had one modem in my house,now I use an ethernet cable to connect another modem so I can split the signal to the second floor, once I’ve pulled out this cable and had only the main modem running, blynk doesn’t have a connection problem anymore. Any thoughts about this?

Is your second “modem” acting as a DHCP server ?

Pete.

Hi Pete, I really don’t know what is DHCP server I just use it as an access point to split the signal to second floor, I also haven’t done any changes to the factory settings except the wi-fi password.

It’s the DHCP server that allocates IP addresses on your home network. Your original router will have had DHCP turned on for your network to function correctly.
If you go into your router setup there will be a section that controls LAN settings and you’ll have the option to control the range of IP addresses that are used, and you’ll probably be able to allocate specific IP addresses to certain devices if you wish. You’ll probably be using an address range like 192.168.1.xxx with your router sitting at 192.168.1.1
Don’t change these settings on your router

Now log in to your new access point and look at the LAN settings.
First of all, you’ll need to make sure that the IP address of the access point is different to the IP address of the router, but that it’s in the same IP address range (only the last three digits are different, the others must be the same).
Next, look to see if the access point is also running a DHCP server and is trying to allocate IP addresses on the network. If it is then you need to turn the DHCP server off in the access point.

Pete.

hey, i was got this problem. and i solved it when i use other wifi. first time i use home wifi but didnt connect and then i use handphone hotspot and it’s work.