Multiple ESP8266 Clinets Sending data to 1 ESP32

I am looking for a project, basic code, to have an ESP32 on an existing network receive data from a few ESP8266 clients sending T sensor data and serve up a webpage of the data on the ESP32. Sockets preferred to get regular updates, but open to suggestions.

I dont care if example code for includes some specific T sensor code, I will sub what I need
for that.

I have tried quite a few different web examples, many would not compile, fixed some
errors, but never got to the goal . Not a network guy, read a ton of stuff, and its a pile
of feathers swirling around in my raisin side brain pan.

I would need code for both ESP8266 basic > ESP32 aggregator.

Any help greatly appreciated, Dana.

how far apart are the nodes? are they on the same subnet?
you could

  1. assuming local WiFi coverage run a TCP or UDP server on the master node with slaves sending data packets to it
  2. run ESP-NOW or even ESP-MESH?
1 Like

The sample code for ESP32 and ESP8266 has what you need.


how far apart are the nodes? are they on the same subnet?

~ 50 feet, on same subnet.

try a web search for "ESP32 tcp/udp client/server"

  1. how much data how often?
  2. do you need reliable communications or if you miss the odd packet does it not matter?

Data rates just T and Humidity, every 5 minutes or so, total of 4-5 ESP8266's
sending the data. To be viewed on a web page on local network as served
by ESP32 on attached to local network. ESP32 not in STA mode as the web page
viewed over remote access, eg. property is remote, running its own network.
That way remote access is not broken moving local net to an ESP32 generated
net.

Reliability not issue as long as

You have many options like mentioned already here. Having one client or four doesn't really change anything.
Pick some quality tutorial and choose communication method.

you have several options for example UDP, TCP or HTTP and I suggest you read my general summary in a first step:

As you mentioned that your ESP32 should run a webserver anyway I would chose HTTP as protocol and set up a HTTP Client on the ESP8266. You just need to transmit the data as key value pairs from the client to the server and extract the transmitted data with some simple functions of the HTTP Server.

here I have example sketches with should work together as Client -> Server.