I have a remote project that has been working successfully for a couple of years. Based on a ESP8266 Node MCU wifi module. Now it keeps getting long periods - hours, days - of disconnection. I have replaced the wifi hub (uses 4G) and even the whole NodeMCU module, in case the ESP has gone faulty. The hub is fault free and during the outages, it is still connected to the internet and working. I have monitored the serial during disconnections and am getting the following cycling request:
17:50:50.227 → / _ / / // / _ / '/
17:50:50.227 → ///_, /////_
17:50:50.227 → /__/ v0.6.1 on NodeMCU
17:50:50.227 →
17:50:50.227 → [575] Connecting to blynk-cloud.com:80
17:50:50.227 → [hostByName] request IP for: blynk-cloud.com
17:50:50.227 → [hostByName] Host: blynk-cloud.com IP: 139.59.206.133
17:50:55.197 → [5576] Connecting to blynk-cloud.com:80
17:50:55.197 → [hostByName] request IP for: blynk-cloud.com
17:50:55.197 → [hostByName] Host: blynk-cloud.com IP: 139.59.206.133
17:51:00.073 → pm open,type:2 0
17:51:00.213 → [10577] Connecting to blynk-cloud.com:80
17:51:00.213 → [hostByName] request IP for: blynk-cloud.com
17:51:00.213 → [hostByName] Host: blynk-cloud.com IP: 139.59.206.133
17:51:05.183 → [15578] Connecting to blynk-cloud.com:80
17:51:05.183 → [hostByName] request IP for: blynk-cloud.com
17:51:05.183 → [hostByName] Host: blynk-cloud.com IP: 139.59.206.133
17:51:10.185 → [20579] Connecting to blynk-cloud.com:80
17:51:10.185 → [hostByName] request IP for: blynk-cloud.com
17:51:10.185 → [hostByName] Host: blynk-cloud.com IP: 139.59.206.133
17:51:15.201 → [25580] Connecting to blynk-cloud.com:80
17:51:15.201 → [hostByName] request IP for: blynk-cloud.com
17:51:15.201 → [hostByName] Host: blynk-cloud.com IP: 139.59.206.133
17:51:20.218 → [30581] Connecting to blynk-cloud.com:80
17:51:20.218 → [hostByName] request IP for: blynk-cloud.com
17:51:20.218 → [hostByName] Host: blynk-cloud.com IP: 139.59.206.133
17:51:25.187 → [35582] Connecting to blynk-cloud.com:80
17:51:25.187 → [hostByName] request IP for: blynk-cloud.com
17:51:25.187 → [hostByName] Host: blynk-cloud.com IP: 139.59.206.133
When it is working, this is what I’d normally get:
As it’s worked perfectly for so long, I can’t imagine it is a problem with my code, so have to think that the Blynk server is somehow ignoring me. Could it just be a temporary system issue?? Been happening for a week or two now.
Dave
By legacy, do you mean the old Energy Balance purchase arrangement? I’ve not used Blynk since it went subscription based I still have credit!
In the UK.
Thanks,
Dave
Thanks Pete. Yes - old version. It will go off line for hours or days, then suddenly re-appear. Yesterday whilst monitoring the serial above, I noticed that if I kept resetting the processor, sometimes it would not connect, just getting as far as the cycling three requests, over and over. Most of the resets, it would re-connect without a problem. Normally of course, it is powered 24/7, so shouldn’t ever need to reconnect, once connected, but presumably this happens.
Sure have! Even replaced it - expecting it to be the weak link. I’m just about to re-create the whole project with a new token. See if that works. Is there a simple way to copy a phone project on the same phone? I can clone but it wants to share the setup with a different phone.
If you log in to the phone with your existing credentials the project will be available on both devices.
You can also refresh the token from within the app.
Okay, I copied my original project into a new one with a new token. I thought it was better for a few hours - then it failed again. I’ve monitored it over a couple of weeks and the server fails to respond for a few hours almost every day. Always seems to right itself after an hour or two. Sadly, this is unacceptable and my ideas for future projects using Blynk are now stopped.
Facts:
The 4G router is 100% solid connectivity, as demonstrated by the CCTV sharing it working perfectly.
The router is just a couple of metres from the ESP8266.
There are no other wifi signals or other interference sources locally (it’s in the back of beyond!)
The system has worked 100% up until a month or so ago. There have been no changes (other than me swapping out router, ESP, token in an effort to check if anything of mine is faulty).
The cynic in me does suggest that this is Blynk’s way of moving me from the legacy token system to a subscription, but I’m certainly not going to do that if I think it’s going to be this unreliable. It would be good to get to the bottom of the problem, as I love the Blynk format.
I have a couple of projects that I re-designed and re-configured when I migrated to Blynk IoT. Because of the differences, I decided to keep the old Legacy project running for the time being.
That legacy project is connected to the Frankfurt server (the same server that your serial output shows you are using), and is generally very reliable. It did go offline for 2 minutes yesterday between 05:01 and 05:03, but I suspect that was an issue with my router rebooting rather than the Blynk server.
The problem won’t be with the Blynk server, otherwise I’d be seeing these issues, as would hundreds of other Legacy users.
Thanks Pete. I remember when developing this project that it was quite thirsty - the location is battery/solar powered. I considered putting the processor to sleep and got familiar with other developers’ problems with maintaining a heartbeat. In the end I left it powered fully up and going for the ‘sensible’ 10 second cycle (when the phone app is not active). Could this be an issue?
Since setting up with the new token, I’ve not actually encountered a time when it’s offline. All I can see is that it has been ‘online since…’ some time a few hours ago - so I know it’s been off, but whether that was 2 minutes or 2 hours, I don’t know, of course.
Difficult to say without seeing your sketch and knowing more about your hardware etc.
But, putting effort into a Legacy project at this stage of the product lifecycle isn’t a good use of resources.
I agree, but I need to resolve it before feeling confident to continue with Blynk and the IoT subscription format.
Are you able to help me understand the dialogue below?
This is a segment of the working dialogue.
I’m unclear which ‘side’ is asking and which responding.
Line 1 tells me my ESP is trying to connect.
Line 2 request (by me) or response (from cloud)?
Line 3 ditto
[This is as far as the dialogue goes during the failed interchanges - just repeats lines 1-3]
Line 4 is me sending the token, I think?
Line 5 ack from cloud?
Line 6,7 just statements of progress, I’m guessing. Lines 1-3 similar?
Yes, I was just looking at the free version. Presume there’s no expiry time to this for a single device?
Also, I read somewhere that it includes 2 devices.
And somewhere else that extra devices can be added for a one-off $4.99 each (or has that deal gone?)
I’m afraid $4.99/month is beyond my means.
Grateful thanks for your replies. I’d figured that the <,> showed direction. So the statements without are verbose debug from the ESP. So line 3
is presumably getting no response from the server and waits for 10seconds before trying again. What kind of response does it get, as line 4
is the ESP sending the token. I can’t see what acknowledgement triggers that token send.
That (and the second line) looks like a message that comes from turning-on some sort of debugging in the ESP core, via Tools > Debug Level in the IDE, and is simply telling you that a request was sent to the DNS server to obtain the IP address for blynk-cloud.com and the response was that the url resolves to 139.59.206.133 which is the IP for the Frankfurt server.
The connection request is sent by the device to the server, when Blynk.begin or Blynk.connect is processed.
Thanks for all Pete. So line 3 does confirm that there is communication with the web, in order to resolve the cloud’s URL (so not a wifi or 4G issue at my end). Just no response from the URL. So has to be a server issue?