MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
This change adds the possibility to run a MQTT broker instead of an MQTT client on the microcontroller.
To switch to broker mode, the MQTT_BROKER_MODE must be defined to true. A new environment configuration esp32dev-ble-broker has been added and it has this preprocessor macro defined. It is otherwise identical to esp32dev-ble.
Currently the broker is listening on the WiFi interface, on port 1883. To keep the PR small and simple, there currently are little configuration possibilities in broker mode. However, the code is extendible and support for listening on different ports, allowing websocket connections, or listening on Ethernet can be easily added.
Checklist:
[x] The pull request is done against the latest development branch
[x] Only one feature/fix was added per PR and the code change compiles without warnings
Description:
This change adds the possibility to run a MQTT broker instead of an MQTT client on the microcontroller.
To switch to broker mode, the
MQTT_BROKER_MODE
must be defined totrue
. A new environment configurationesp32dev-ble-broker
has been added and it has this preprocessor macro defined. It is otherwise identical toesp32dev-ble
.Currently the broker is listening on the WiFi interface, on port 1883. To keep the PR small and simple, there currently are little configuration possibilities in broker mode. However, the code is extendible and support for listening on different ports, allowing websocket connections, or listening on Ethernet can be easily added.
Checklist: