My Blynk project was not detecting arduino, so when i entered ‘blynk-ser.bat -c COM8’ in command prompt, blynk detected arduino. But when I removed the cable, again it went offline.
@iot1 post your formatted sketch and presumably with the very limited Uno you don’t have access to Serial Monitor as the TX / RX pins are connected to the ESP.
USB-link and WiFi are two completely different methods of connecting your Arduino to Blynk.
The Arduino can connect to Blynk via the USB and the blynk-ser.bat file, but the Command Window must stay open and UNO must stay plugged in to USB, in order to maintain the connection.
If using the ESP to connect the UNO, you only need the USB for power and programming… and once programmed you can switch to external power (battery or AC adapter).
As you have noticed, Arduino/ESP mergers get much tricker from there. but you seem to be on the correct path toward getting that to work.
As Costas mentions, you can try to connect to the ESP via the UNOs RX/0 & TX/1 pins. No SoftSerial library or commands, just treat as normal serial and NO USB connection - except as power only - but probably even better to use external power (And unplug the ESP when programming the UNO).
Or connect to the ESP via SoftSerial Library with the pins used typically being RX/10 & TX/11, this way you should be able to also use the USB serial monitor.