I am working on a Home Automation project and I want to connect an Mobile Application to ESP8266.
I can Publish a message from Mobile App to AWS server which is setup as a broker. (Working)
I can Publish a message from AWS to Raspberry PI. (Working)
I can also Publish a Mqtt message from Raspberry PI to NodeMCU / ESP8266. (Working).
But the problem occurs when I am trying to set all these together. While Publishing a message from AWS it is received by Raspberry PI but it is not reflected on the NodeMCU / ESP8266.
Here is the code in use.
This is what I am using in my ESP8266. When I Publish from Raspberry PI it is working fine, even when I am connecting PI will MQTT client app on my mobile it is working. But there is no reaction on ESP8266 when I publish from AWS, but the PI as able to receive the message.