ESP to ESP communication using Wifi Router

Hi guys!
I have a project about water pumping system. The system is consisting two Esp32 , two water tank located in the Groundfloor and rooftop of the building and a motor.
Does anyone here has a code for the communication of 2 esp32?? If the ultrasonic senses that the rooftop tank is almost emtpy it automatically commands the groundfloor esp to turn on the relay vice versa… by means of WIFI router as the center of communication. Without the blynk app or codes.

P.S: I will use Blynk app in the future if someone solved this problem

Personally, I’d use MQTT messaging.

The other alternative is a local Blynk server.

Do you have plans to add any other control, monitoring or Home Automation systems? (The answer will influence what is the best way forward).


For now, I dont want any Application (blynk or mqtt or local blynk server) I just really need a Program without using any of these. Do you have any codes for this? Im sorry Im really new at these but Im studying it.

I understand what you want for now, but what are your long term plans?


I’ll integrate the automation(can be used even if there’s no internet connection, just wifi router) and monitoring system of the water pump( which can be view anywhere, no limit)

So your water pump project is likely to be the only thing that you use MCUs for in your home?



ESP Now !

1 Like

But I think that rules-out being able to use Blynk as well, unless @Patrick does something very clever with the dual cores.

It’s quite a bit of effort to set up and maintain, but a local Blynk server might be the best option. At least then it’s just a simple bit of Blynk Bridge code.

Slightly easier to set up and maintain would be a local MQTT server on a Pi, with Node-Red to give the Blynk capability, but that’s a bit more of a learning curve.

Using something like:

is an alternative, but it would still need some MQTT code and some MQTT to Blynk bridging code too.


That’s is exactly what I’m planning. Im going to use the other core of the esp for automation while the main core is for monitoring.
I’m thinking about local blynk server but I want my monitoring system to be access anywere.
Is there a method of integrating blynk server and a local server?

A Blynk local server can be accessed from anywhere if you forward the correct ports and use a DDNS service if you don’t have a static IP address.
The only time you wouldn’t be able to do this is if your ISP uses a double NAT system.
Read this for more info:

No, not for what you want.

That’s slightly different to what I was discussing for the ESP-Now functionality, but either approach will test your coding skills (and aren’t really necessary unless you’re planning on using ESP-Now).