Best way for inter-unit communication

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
ewaldharmsen
Normal user
Posts: 66
Joined: 16 Feb 2017, 09:23

Best way for inter-unit communication

#1 Post by ewaldharmsen » 26 Oct 2018, 08:16

Hi all,

Currently I send data between 2 units with the sendto command.
But I never know if this command arrives, so I just keep sending it every 5 seconds.

Is there another way to communicate in such a way that the receiving unit send a return message?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Best way for inter-unit communication

#2 Post by grovkillen » 26 Oct 2018, 10:13

In that case you should really consider MQTT, that protocol is doing just that - communication from 1 to MANY or MANY to MANY or MANY to 1. Super fast acknowledgement even in 10 000+ clients environment.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

ewaldharmsen
Normal user
Posts: 66
Joined: 16 Feb 2017, 09:23

Re: Best way for inter-unit communication

#3 Post by ewaldharmsen » 26 Oct 2018, 10:35

thanks, so I believe I need to use publish instead of sendto in that case.
But how do I know the publish action succeeds?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Best way for inter-unit communication

#4 Post by grovkillen » 26 Oct 2018, 12:38

One way is use MQTT import or have the other unit(s) to publish something when they receive a call.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Best way for inter-unit communication

#5 Post by TD-er » 26 Oct 2018, 19:56

Note that you will need a separate computer running a broker, to use MQTT.

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests