Two ESP8266 communicate with each other via MQTT broker

Discussion in 'Embedded Systems and Microcontrollers' started by Priya Garg, Mar 17, 2017.

  1. Priya Garg

    Thread Starter New Member

    Feb 24, 2017
    Hello everyone,
    I have worked on ESP8266 and recently I'm working over ESP8266 interfacing with MQTT protocol. I have read stuff on MQTT through HiveMQ documentation and getting familiar with MQTT protocol. I have successfully built a basic application to control the LED on ESP8266 through PC as a client with HiveMQ broker. I am trying to communicate two esp8266 together (both will act as clients) with MQTT broker means there should not be any app or web command. Everything will be written in the firmware of both publisher and subscriber client. I tried but I am unable to do this.
    Ca you please tell me whether this is feasible or not:
    ESP (01) will send the message LED_ON with topic and ESP (02) will be subscribed to the topic and will receive the message LED_ON and then the led on GPIO02 of ESP(02) will lit up.
    This can be very basic question but please guide me on this. Any help will be appreciated.