-->
Page 1 of 2

Question: How can three ESP-modules talking to each other

PostPosted: Wed Jan 20, 2016 4:29 pm
by Silber.Rahmen
Hello,
my skills:
I can handle the ESP (via NodeMCU) via Arduino-SDK.
I can read and write DIN/DOUT.
I can send my temperature-values via HTTP-Request into the cloud.

But how can two or more ESP modules talk to each other (in the same 'Home'-WLAN)?
What I basically want to do:
In three similar rooms in my house with each 2 or 3 windows I want to check the state of all the windows: Are all windows closed in all rooms?
In each room I want to know if the windows in the other rooms are closed or open.
So each module should be able
* to send the state of its own windows
* to request the state of the other windows
So push and pull should be available for each module.
Each ESP-Module has (2+3+3=) 8 LEDs to show the state of all 8 windows.

Is there a easy way to do that?

Thanks!

Re: Question: How can three ESP-modules talking to each othe

PostPosted: Wed Jan 20, 2016 9:52 pm
by WereCatf
There is an HTTP-server and client (including example sketches) there, you could just use those. Doing it via HTTP would also have the benefit of you being able to use your own desktop web-browser to check them, too. Might at least be worth thinking; there are plenty of ways, both UDP and TCP, but adapting one of the example sketches for a quick-and-dirty solution is a very easy route to take.

Re: Question: How can three ESP-modules talking to each othe

PostPosted: Thu Jan 21, 2016 5:41 am
by eduperez
When IoT projects become too complex for a simple one-to-one communication, I would suggest using a central MQTT server: each node can send status reports to the central MQTT, and later you can attach as many nodes or applications to the same MQTT server as you need.

Re: Question: How can three ESP-modules talking to each othe

PostPosted: Thu Jan 21, 2016 3:25 pm
by Silber.Rahmen
Hello,
well, yes, a central MQTT server will be probably a very nice solution...but I do not want to use any external servers. Just this 3 modules.

This evening I started trying talking via UDP and static addresses. Well, this works.
But: Is there a easy way to find the other modules in the WLAN if using not static adr. but DHCP?

Thanks!