The broker does support:- a subset of MQTT v3.1.1 (CONNECT, DISCONNECT, SUBSCRIBE, UNSUBSCRIBE, PUBLISH, PING)- a smaller number of clients (at least 5 have been tested) based on the config of lwip- up to 100 topic subscriptions- arbitrary publications- QoS level 0

in the user_init() function. The code can be be used in any project that is compiled using the esp-open-sdk. Thanks to Tuan PM for sharing his MQTT client library as a basis with us.

The current demo program is based on and included in the esp_wifi_repeater NAT router (without monitoring, ACLs, etc..), but it uses the router only as implementation environment. Binary firmware can be found in the firmware directory. For infos on flashing, building and using the provided demo program look into the master branch of this project (https://github.com/martin-ger/esp_wifi_repeater/).

User mini profile

- Thu Jun 01, 2017 6:46 pm#66624
The esp_uMQTT_broker has some new features:

it now supports retained messages and LWT

if contains a "LOCAL client", which means, the broker itself can publish and subscribe topics. This is meant to provide the basis for a local rule engine that can react on MQTT events, e.g. to switch GPIOs or send other messages (MQTT, HTTP,...)

the demo can now be compiled using the standard NONOS_SDK (or esp-open-sdk), it is no longer linked to my NAT router lib.

User mini profile

- Sun Jul 23, 2017 4:48 am#68461
Last weeks have enhanced the esp_uMQTT_broker to become the central node in a small distributed IoT system.

For an IoT system typically you have some MQTT-enabled sensors and actors, an MQTT broker and some kind of a rule engine that links the events together and implements the application logic. While the sensors and actors are often ESP8266-based, the latter are typically "Mosquitto" and "Node Red" running on a Raspberry Pi. There is nothing wrong with this setup, but it requires about 50$ of invest for an IoT application probably just consisting of 3 nodes.

This is where this esp_uMQTT_broker comes into play. It implements a basic MQTT Broker and (NEW) a simple scripted rule engine with event/action statements that links together the MQTT sensors and actors. Scripts are interpreted and can be uploaded over the air - no re-flashing of the ESP required. The esp_uMQTT_broker can act as STA, as AP, or as both. It also can connect to another MQTT broker (i.e. in the cloud) and forward and rewrite topics in both directions.