Direct connection between two ESPEASY modules?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
bennybubble
Normal user
Posts: 44
Joined: 31 Jan 2016, 21:05

Direct connection between two ESPEASY modules?

#1 Post by bennybubble » 21 Nov 2017, 13:49

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

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Direct connection between two ESPEASY modules?

#2 Post by vader » 21 Nov 2017, 16:48

Yep, can be done with the internal communication over UDP....

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

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: Direct connection between two ESPEASY modules?

#3 Post by toffel969 » 21 Nov 2017, 16:59

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.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: Direct connection between two ESPEASY modules?

#4 Post by toffel969 » 21 Nov 2017, 17:07

Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Direct connection between two ESPEASY modules?

#5 Post by papperone » 21 Nov 2017, 17:37

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.
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

kumaxx
New user
Posts: 3
Joined: 22 Apr 2019, 18:44

Re: Direct connection between two ESPEASY modules?

#6 Post by kumaxx » 22 Apr 2019, 18:53

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

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: Direct connection between two ESPEASY modules?

#7 Post by kimot » 22 Apr 2019, 21:21

But you still need wifi accespoint.
That was question of previous post.
ESP-NOW is solution for this.

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests