MQTT - Wwarrior1/NodeMCU GitHub Wiki

In order for the mqtt client on the NodeMCU to work, you need to:

  1. Include the 'mqtt' package in your NodeMCU firmware

  2. Execute and modify a bootstrap module provided in this project (examples/mqttclient.lua) - you need to provide network ssid and password (examples/wifi_credentials.lua) for the connection with wifi access point and the broker ip (examples/broker_ip.lua)

  3. An mqtt broker needs to be launched on a device connected to the same wifi access point as the NodeMCU. For launching an MQTT broker on your laptop, you can use an open source implementation: Mosquito.

last updated: 2017-01-23