MQTT network with ESP8266

It’s possible to generate a network of ESP8266 and ESP32 using the MQTT protocol without using a RaspberryPI such as a broker.

On a ESP8266 is installed a micro broker called uMQTT-broker:

UPDATE=> A new version has been developed with a dedicated Git.

This node could be considered the Master or the Server and it’s called Broker in the MQTT protocol.
The Server node is a Access Point (AP) with address but also it is able to connect to a local Wifi network as a Station (STA).
The Server node shares together the MQTT messagges coming from the 2 networks.

The precompiled binaries are available at:
They can be flashed with: --port /dev/ttyUSB0 write_flash -fs 32m 0x00000 0x00000.bin 0x10000 0x10000.bin
For ESP-01: --port /dev/ttyUSB0 write_flash -fs 8m 0x00000 0x00000.bin 0x10000 0x10000.bin

The Server node could be configurated by the UART console or a telnet connection:
nc 7777
or using the local wifi network:
nc 7777

When the connection is started sending “help” is possible to see all the commands to log or set the server.
More details are available at:

A MQTT client for ESP8266 is:
The MQTT library for Arduino IDE is based on the Eclipse Paho projects

Another MQTT client for ESP8266 is:
The MQTT clients uses the MQTT V3.1.1

To test the MQTT broker on the PC I suggest MQTT-Spy GUI:

A more complex system could be built using a RaspberryPI (RPI) where is installed the Monsquitto MQTT broker:
Some instruction how to install Monsquitto on RPI:
Node-Red could run inside the RPI
Node-Red manages the MQTT messagges and generate actions between the IoT objects (RPI, ESP8266s. ESP32s, Arduinos, Telegram Bots..):

There is MQTT broker for Node-Red: