Full instructable tutorial is available on this link. https://www.instructables.com/id/IOT-Base-Computing-Using-Nodemcu-and-Micropython/
the boot.py file execute first following by main.py mqtt.py is library file used to create mqtt socket. data.txt file is used to store the previous received status of the LED.
this project is fully working on mqtt connection which uses https connection type. before uploading the code please modify the main.py file with your details like ssid, password,username and secret key. the working video of this tutorial is also available on instructable page. For any bug or error you can free to ask at [email protected] Thanks for reading
Have a nice computing