Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

MaQiaTTo ESP8266 Lua Client

Preparing Firmware

  • You need to burn Lua firmware to your ESP8266 before proceeding. Please follow this link for one of the best practice of firmware burning.
  • When you navigate to NodeMCU custom build page, do not forget to select MQTT from Select Modules to Include tab. PRovide your e-mail address and start build. Once build is completed, you will be notified and firmware download link will be provided.
  • Download the ESPTool to burn your firmware.
  • We offer to use pip to install ESPTool :
pip install esptool
  • Copy downloaded image under downloaded esptool directory and change directory into it.
  • Use below command to burn downloaded firmware :
python ./ --port /dev/tty{YOUR_DEVICE_NAME} write_flash 0x00000 {YOUR_DOWNLOADED_FIRMWARE}

Running with MQTT Sample

  • Firstly, download MaQiaTTo client sample repository via git or just download as zip :
$ git clone
  • From gathered directory, navigate into ESP8266 Lua related code :
$ cd maqiatto/esp8266_lua
  • Open init.lua file and modify below credentials with yours :
  • Get LuaTool.
  • Navigate into the luatool directory where resides.
  • Write our two lua script into the device with below commands :
./ --port /dev/tty{YOUR_DEVICE_NAME} --baud 115200 --src {PATH_TO_YOUR_INIT_LUA_FILE} --dest init.lua --verbose
./ --port /dev/tty{YOUR_DEVICE_NAME} --baud 115200 --src {PATH_TO_YOUR_MQTT_LUA_FILE} --dest mqtt.lua --verbose
  • You will saw the writing process line by line. After both completed, open a serial monitor to /dev/tty{YOUR_DEVICE_NAME}. You will see below like logs that proves your connection is done :
NodeMCU custom build by
	branch: master
	commit: c16adb5dfb8c02b692034bbd553502765b9733cc
	SSL: false
	modules: file,gpio,mqtt,net,node,tmr,uart,wifi
 build created on 2019-06-17 19:51
 powered by Lua 5.1.4 on SDK 2.2.1(6ab97e9)
> Connecting to AP...
Connecting to AP...
maqiatto test
You can’t perform that action at this time.