Tagged this as a FAQ as I did resolve the issue - not sure why.
Feedback on proper posting is welcomed.
New to using Blynk, and to be known, I am using it as a DIY—not commercial. And am still getting blood all over the keyboard ![]()
I am building a relay controller to control the switch panel—operating lights and such—in my camper via my mobile phone.
Problem: After initial success connecting my first device to the Blynk cloud - ran into not being able to reconnect after changing the sketch.
Resolution: Reboot network infrastructure, not just the router but all my mesh access points.
Follow-up question:
All other devices on the network were able to function whilst I could not connect the Blynk device. Even though the device seemed to be operating properly, compiling code, uploading, and scanning the SSID networks from the device, why was a reboot - especially of the mesh nodes - necessary?
Environment
- MAC dev environment
- com port well established
- Hardware: Wemos d1 Mini, breadboarding
- IDE: VSC Platform IO with appropriate libraries (initial ‘training’ was on the Arduino IDE)
Details:
Initially adding the device to Blynk, I did the quickstart method, and the device connected and got online with the basic sketch. As I said, I am new and noticed while I was playing around with the sketch and the breadboarded device that in no time I used up 7k+ messages of my allotted 200k messages. This was due to a timer function in the initial sketch that—tbh—I’m still trying to figure out. I just want to close relays via my phone.
I disabled the timer function/references and tried playing with datastreams (virtual pins) and the physical connections, and all of a sudden the device would not go back online after rebuilding the sketch. No errors. Compiling and uploading all worked.
Placed Serial.println() code in the loop() function of the sketch before the Blynk.run() call - no output.
I tried to back out my changes, but it still would not connect.
I deleted everything on the Blynk console- templates. devices, and datastreams, started again, creating new template, device, and datastreams. Still - could not go online.
IDE serial port connection to the board did not change. Compilation was successful, and upload was successful.
Thought I fried the D1 (or at least the 8266).
Went back to basic 8266 example sketches:
- Step A: Wemos D1 scan networks sketch (no need to connect to ssid) - Success
- Step B: Wemos D1 webserver (I forgot the name, but it’s the one that gives you a URL with a simple random graph). Needs to connect to ssid - Failure.
- All other devices appear to be normal on my SSID network.
TBH - I do not know how to debug the Blynk API - tried to use Serial.println (see above), but the experience was not as expected.
Reboot the router. The router connects to the internet, and mesh nodes are available. Other items on the network are fine—laptops, phones, etc. Rerun steps A and B. Same results B failure).
Reboot mesh nodes. Other items on the network are fine. Rerun steps A and B. B success.
Redid the Blynk template → Device → Datastreams, and it worked.
So, in conclusion, it was not a Blynk problem. (Spent way too much time thinking it was a Blynk/Pilot error issue.)
Some things I still do not understand:
-
Inside the Sketch loop() block, I put a Serial.println(“.”) before the Blynk.run(); line that did not execute. e.g.:
void loop()
{
Serial.println(“.”);
Blynk.run();
} -
Why did rebooting my mesh nodes seem to work, but everything on the network was fine (no exhaustive testing) prior to rebooting?
