-->
Page 1 of 2

Multiple esp8266 send/receive data to/from central RPi

PostPosted: Sun Mar 12, 2023 1:34 pm
by Dupolas
Some help wanted pointing me in the right direction.

I have 4-5 ESP8266s with small OLED and Sensors reading data. In the future the # of ESPs with sensor/screen can potentially grow up to 12-15.

I want to communicate with these ESPs from a single hub (Raspberry Pi or ESP32 still t.b.d.). Measurement data from ESP to Hub, commands from Hub to ESPs.

Communication layer wise, WiFi is not an option so the ESPs will be hardwired to the central hub.

I am not a big electronics guy, I know how to rig my ESPs with sensors, displays, etc. and program them using Arduino IDE or MicroPython. But this communication over wire is new for me. Is this something where I2C or SPI can play a role?

Any help/guidance on how I could make this work would be great.

If it could work with MQTT as protocol on top would even be more awesome. But sending/receiving messages in any structure is helpful as well.

Thx

Re: Multiple esp8266 send/receive data to/from central RPi

PostPosted: Fri Mar 24, 2023 9:33 am
by rooppoorali
I believe it will be good to establish communication between your Raspberry Pi and ESP8266 modules through MQTT. The problem is that you will not find any tutorial that may provide you with the A to Z of how to do this. Many tutorials like this one are available: https://www.hackster.io/ruchir1674/rasp ... qtt-ed9037
But they feature one Raspberry Pi and one ESP8266, unlike your setup.

Re: Multiple esp8266 send/receive data to/from central RPi

PostPosted: Fri Mar 24, 2023 12:46 pm
by AcmeUK
Communication layer wise, WiFi is not an option so the ESPs will be hardwired to the central hub

If WiFi is not an option, why are you using ESPs!!!!

Re: Multiple esp8266 send/receive data to/from central RPi

PostPosted: Sat Mar 25, 2023 6:22 am
by btidey
It would be good to know distances and why wifi is not an option.

Couple of thoughts.

1. Use 1 esp8266 as central wifi AP which the sensor devices talk to and then hard wire that t the raspberry.

2. If distance is a wifi issue then maybe use LoRa. Look at
https://www.hivemq.com/blog/lorawan-and ... ns-design/
for ideas.