Dear friend,
see here: [SOLVED] How to run Blynk.run() only when WiFi connection is established
Best Regards, Mike Kranidis