Page 1 of 1

Direct connection between two ESPEASY modules?

Posted: 21 Nov 2017, 13:49
by bennybubble
Hi,

I have an application where I need to switch a waterpump remotely, however the contact (switch) is about 15 meters away and I cannot use cables in between.

Can I setup an ESPEASY module that 'watches' the contact closure and transmits this information to a second ESPEASY (Sonoff device) which actually controls the waterpump?
In other words, the pump has to follow the contact closure.

I know this can be done using MQTT etc but I do not want anything else involved, only a wifi connection between those two modules.
The electrical interfacing on both sides is not a problem but my problem is the wifi part, one acting as a client and the other s a server.

Can this be done and/or is there a better/smarter/easier way to do this?

-ben

Re: Direct connection between two ESPEASY modules?

Posted: 21 Nov 2017, 16:48
by vader
Yep, can be done with the internal communication over UDP....

https://www.letscontrolit.com/wiki/inde ... GlobalSync

Re: Direct connection between two ESPEASY modules?

Posted: 21 Nov 2017, 16:59
by toffel969
vader wrote: 21 Nov 2017, 16:48 Yep, can be done with the internal communication over UDP....

https://www.letscontrolit.com/wiki/inde ... GlobalSync
Yes UDP is possible, but due to protocol it is not very reliable (no ack)

Rather use http for that purpose. Everything you need to know for this is summed up in the rules tutorial in the wiki, https://www.letscontrolit.com/wiki/inde ... rial_Rules particularly the sections on "Event value" and "HTTP call".

If after reading the wiki, you still have questions on your setup, don't hesitate to ask.

Ah and by the way, both ESP still need to connect to a wifi AP. I do not see a way with ESPEasy to get away without one. Cheap routers start from 10 €. I guess for this special application two Arduinos with an ISF-RF could prove the better solution.

Re: Direct connection between two ESPEASY modules?

Posted: 21 Nov 2017, 17:07
by toffel969

Re: Direct connection between two ESPEASY modules?

Posted: 21 Nov 2017, 17:37
by papperone
I understood he wants to connect the 2 ESPs in a 1:1 connection, not using any WiFi access point...
As far as I know this is not possible as ESPEasy is build to act as a client only and not server.

Re: Direct connection between two ESPEASY modules?

Posted: 22 Apr 2019, 18:53
by kumaxx
Hi.
Who prevents to make one ESP as server and other ESP as client ?
Give the same name to all ESP, and on the client write wifi config of our server ESP.
I write litle "how to" for setup P2P network for ESPEasy modules (on russian language, sorry :) https://ku.spb.ru/%D1%82%D0%B5%D1%85%D0 ... %D0%B8-esp

Re: Direct connection between two ESPEASY modules?

Posted: 22 Apr 2019, 21:21
by kimot
But you still need wifi accespoint.
That was question of previous post.
ESP-NOW is solution for this.