"App can't initialize a connection to server " problem with local server

Okay, so your phone can’t see your local server, but your PC can.
I’m guessing that your phone isn’t using the WiFi connection and is using the mobile data connection instead. As you haven’t yet set-up DDNS and port-forwarding, there is no data route from your phone to your server.

Pete.

what you mean by its used mobile data , my phone is connect to a wifi !!
What can I do now ?

the pi is getting an ip through the ethernet cable !! May this is the problem ?

No, that’s not the problem. The Pi is visible to your PC on the same network, so it’s fine

Try turning off mobile data on your phone, or removing the SIM card to force it to use the WiFi connection.

Pete.

Hello everyone,

Have you tried looking in the file “useremail@gmail.com.Blynk.user” to see what username and password are there? Maybe this is why he won’t let you in. You can find this file in the Blynk folder.

I removed the SIM and no changes :frowning:

i sign in the app using create new account and putting a gmail !!

Look in the Blynk folder and open that file and see what user is created there just in case.

the admin user and it is pass just

In that file you have to put your username, which in this case is the email and the “password” field your password. Save the file and restart the server.

Okay, with the SIM out of the phone restart the phone and check which WiFi network it is connected to. This has to be part of the same network that the server and your PC are connected to.
You may also want to restart your router and any WiFi repeaters on your network.

You have to get to the point where you can ping your server from your phone. Until you can do that, there is no point in trying anything else.

Pete.

The phone can’t ping any of the devices on the network not only the server , it always give timed out

The raspberry can ping the phone but not vice versa
that means the pi see the phone

Have you tried restarting the router, wireless access points and phone as previously suggested?
I’m trying to help you here, but you’re not giving me any useful feedback about the steps you’ve taken to enable me to suggest sensible next steps.

Do you have any other devices (tablets, phones etc) that are capable of running the Blynk app?

Do you have WiFi enabled on you’d Pi 4?
If so, your Pi will have multiple IP addresses. Are you sure that you’re using the correct one?

Pete.

It works now , i opened the router setting and the pi take another ip than the one appear when i do ifconfig

In that case, I’m a little surprised that your initial approach to the Blynk aspect of this was to look at a full-blown central heating controller project as your starting point.
I’m also a little confused about why you need to go down the ESP32 route to control a single relay.

Either way, I think I’ve contributed enough to this discussion and I’ll leave it to others to take it forward if you require further assistance.

Pete.