BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Wemos D1 mini disconnects on local server

localserver
esp8266
#1

The sketch is the default ESP8266 Standalone . It connects to the local server but after ~2 minutes it disconnects and the log file says:

14:40:17.526 TRACE- Incoming id=59, command=Ping, body=''
14:40:23.057 TRACE- State handler. Hardware timeout disconnect. Event : READER_IDLE. Closing.
14:40:23.058 TRACE- Hardware channel disconnect for UserKey{email='default@blynk.cc', appName='Blynk'}, dashId 1150481750, deviceId 0, token 2523e8259fb04d8c89ab00a18c73d5b4.
14:40:23.058 TRACE- Changing device status. DeviceId 0, dashId 1150481750
14:40:23.058 TRACE- Sending device offline message.

Any idea?

The sketch is correct because it does work with other boards.
The ip of the server is correct because the Wemos does connect to the server
There is no IP conflict with the Wemos because i reserved a static address with the MAC of the Wemos

0 Likes

#2

What version of the ESP core are you using?

Pete.

0 Likes

#3

2.5.2

0 Likes

#4

Try downgrading to 2.4.2 and see if that makes any difference.

Pete.

0 Likes

#5

Unfortunately it’s still the same

1 Like

#6

Have you chosen a static IP address outside the DHCP range?

0 Likes

#7

No I haven’t. I have other 3 devices connected to the server and they work fine. I tried removing the static ip of the Wemos but it doesn’t work too

0 Likes

#8

Also what are logs useful for if there is no documentation about them? What does READER IDLE mean?

0 Likes

#9

Give it a try.

0 Likes

#10

Just tried and it doesn’t work. Tried using another wemos D1 mini and it doesn’t work. @Pavel ideas?

1 Like

#11

is there anyone active in this community?

0 Likes

#12

I’m active :wink:

0 Likes

#13

Lots of active volunteers here… but what little, and contradictory, information you have provided points more to something on your side, possibly your network? or faulty board? WiFi interference?

1 Like

#14

Looks like something on the espressif side, possibly not a Blynk error? Where are you seeing these stuff, in the Blynk logs or on the Serial monitor?

EDIT -

On closer inspection, it looks like the Blynk logs… and basically saying the hardware stopped talking, so the server disconnected the now idle link.

Focus on the reason for the hardware losing connection… as already mentioned, probably somthing in your environment and/or network, or even that particular board?.. Not much about that we can do from here.

1 Like

#15

the other boards are arduinos with esp-01 as a shield and esp-01 standalone. the wemos don’t work. to me it’s absolutely a Blynk error because when the wemos disconnects, they don’t connect anymore and contunue to say “connecting to 10.0.1.100:8080” every 5 seconds. Also the same boards 3 months ago worked fine.

0 Likes

#16

my netork has absolutely nothing because the problem is blynk. on one type of ESP8266 (esp-01) works and on the wemos it doesn’t. the logs are copy-pasted directly from the Blynk.log file on myh local server which again is not the problem because other hardware works fine.

I can demonstrate all I say.

Wemos D1 mini:

[3593] Connecting to CASA
[4788] Connected to WiFi
[4788] IP: 10.0.1.7
[4788] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on ESP8266
[4860] Connecting to 10.0.1.100:8080
[4925] Ready (ping: 14ms).
[29099] Heartbeat timeout
[31102] Connecting to 10.0.1.100:8080
[31189] Ready (ping: 49ms).
[65029] Connecting to 10.0.1.100:8080
[67946] Ready (ping: 2903ms).
[98212] Heartbeat timeout
[100215] Connecting to 10.0.1.100:8080
[105216] Connecting to 10.0.1.100:8080
[110217] Connecting to 10.0.1.100:8080
[115218] Connecting to 10.0.1.100:8080
[120219] Connecting to 10.0.1.100:8080
[125220] Connecting to 10.0.1.100:8080

Wemos D1 mini PRO with external antenna

[2754] Connecting to CASA
[3890] Connected to WiFi
[3890] IP: 10.0.1.10
[3890] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on ESP8266

[3912] Connecting to 10.0.1.100:8080
[8915] Connecting to 10.0.1.100:8080
[9267] Ready (ping: 20ms).
[28482] Heartbeat timeout
[32648] Connecting to 10.0.1.100:8080
[33876] Ready (ping: 133ms).
[65029] Connecting to 10.0.1.100:8080
[70033] Connecting to 10.0.1.100:8080

ESP8266-01

[290] Connecting to CASA
[5773] Connected to WiFi
[5774] IP: 10.0.1.172
[5774] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on ESP8266

[5847] Connecting to 10.0.1.100:8080
[5903] Ready (ping: 4ms).

the other thing that makes me think it’s a Blynk problem is the fact that 3-ish months ago it was the other way around: the wemos were working while the 01 weren’t. Then somehow they started working and now the wemos are not anymore.

0 Likes

#17

btw the sketch is the following

#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG Serial


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


char auth[] = "RlmNkc5i0RpEyUfm8WHvKCFu08KwOiNr";   // HUB
char ssid[] = "CASA";
char pass[] = "**********";

void setup()
{
  Serial.begin(9600);
  //Blynk.begin(auth, ssid, pass, "*********.dlinkddns.com", 8080);
  Blynk.begin(auth, ssid, pass, "10.0.1.100", 8080);

}

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

#18

Have you any idea how many people are using Wemos D1 Minis with Blynk, without any problem?

We see this type of query many times and it almost always turns-out to be one of these problems:

  • Local networking issues
  • Inadequate power supply issues
  • Dodgy breadboard connections
  • Faulty hardware
  • Poor choice of GPIO pins for sensors/relays
  • Incorrect choice of device in App, IDE or Sketch Builder
  • Outdated Blynk library version
  • Outdated local server version
  • Use of a buggy ESP core
  • Poor code
  • Any combination of the above

In almost every case, people will say “I’ve tried everything, it must be Blynk”. One guy even threatened to sue Blynk, even when he was using the free developer version which is clearly labelled “use at your own risk”.

My advice would be to accept that Blynk itself works correctly with a good D1 Mini when everything else is done correctly, then to start diagnosing what’s causing your particular problem.
You could start by trying to connect to the Blynk cloud server, in an effort to eliminate some of the variables involved in the equation.

I’d also reboot your router, and unplug/disconnect any other devices from the router to ensure that you’re not getting any other problems like multiple DHCP servers, lack of available IP addresses, IP or MAC address conflicts etc.

Pete.

1 Like

#19

I agree with everything you said and i know the fact that it could be my fault. But what triggers me is the fact, as I said 2-3 times, that it used to work but now it doesn’t.

I’m doung a sort of control center/hub with a nextion display that controls other hardware in my house. i started developing the code 5 months ago and i paused after 3 months. the code was mostly done and after making sure it worked perfectly without any disconnections i decided to concentrate on the school because it was the end of the school-year. I used the sketch and the simulator in the nextion editor to simulate the physical display. And at the end of the school i purchased the 120€ monitor.

now the wemos disconnects and obviously the whole project is unusable.

so i tried the default esp standalone and it didn’t work so i’m here to ask you what could’ve happened.

at first i thought it was the bridge with other devices because i had 3 bridges. secondly i thought that there were too many variables and then i moveds to the basic sketch and it also doesn’t work.

i don’t know what to do next

thanks to everyone who spent their time to help me. sorry if sometimes i was a little angry but you can understand that for a 16 yo person buying a 120€ monitor and seeing that the sketch doesn’t work anymore is not something nice. also sorry for my English, i’m Italian and i have basic English knowledge because i’m still at school.

i’ll keep you informed

0 Likes

#20

As I said, this is where I’d start.
I’d also make sure that all my Wemos tests were done with nothing attached to the board other than a USB serial/power connection to a computer with a USB port that is known to be good.

I have a similar setup with a Nextion display controlling multiple devices and showing data from multiple sensors (about 20 devices in total at the moment). Running Blynk Bridge code with this setup would be a nightmare, so I use MQTT messaging to communicate between devices, and Node-Red running on a Pi with Blynk, Alexa and IKEA Tradfri plug-ins for Node-Red. It works very well.

Pete.

0 Likes