Reputation: 185
What is the best possible way to make two esp8266 to communicate, if both are in different locations, say one in India and another is in Dubai, both are connected to internet. Should I use mosquitto to make them communicate, or is there any better way?
Upvotes: 0
Views: 311
Reputation: 23535
This question is actually way too broad for Stackoverflow. We don't know enough details and answers may be primarily opinion-based.
Here's my $0.02, though.
I wouldn't expose ESP8266, or any other IoT device for that matter, to the Internet directly. That means they can't directly talk to each other without some special network/firewall configuration (NAT). So, you're right that you need an intermediary to which both devices can talk. If the communication between the two devices is of a "publish-subscribe nature" then yes, MQTT is a great choice.
If you don't want to set up a Mosquitto broker yourself I suggest you look into https://www.cloudmqtt.com/.
Upvotes: 2