Пример
работ с mqtt

Simple alarm
with control via phone

 Program (sketch) written in Arduino IDE for esp8266 firmware

 

   Download the program to your phone