// the find
shmuelzon/esp32-ble2mqtt
A BLE to MQTT bridge running on an ESP32
A firmware image for ESP32 boards that turns nearby BLE peripherals into MQTT topics, so sensors and devices can be read and written from an MQTT broker without a phone or a Raspberry Pi in the middle. It suits people running MQTT-based home automation who have BLE sensors and want several ESP32s spread around the house.
- Broadcaster decoding happens on the scan path with no connection needed. iBeacon, Eddystone UID/URL/TLM, Xiaomi MiBeacon (with bind keys for encrypted devices) and ATC1441 thermometers all publish without tying up the sensor's radio.
- Several bridges can share one connectable peripheral. Instances coordinate through the Owner and Connected topics and re-publish when another instance drops off, so the coordination needs no extra service beyond the broker you already run.
- Device support is mostly configuration. GATT names, value types, white and black lists, passkeys and MiBeacon keys live in one JSON file, so adding a sensor usually means editing config rather than C code.
- OTA updates skip no-op uploads. Firmware is compared by git tag and config by MD5 hash, and the force variants exist for when you want to override that check.
- The README says it targets ESP-IDF v5.2.1 and that other versions 'might not be stable or even compile'. Moving to a newer toolchain is a separate project, and the repo has no visible plan for it.
- The GATT assigned-numbers definitions are fetched from http://www.bluetooth.org during the build, so a clean build needs network access and depends on that page layout staying the same. A failed fetch is a build failure with no offline fallback described.
- The last push was 2025-08-16, about 14 months before today. For a firmware project tied to a specific ESP-IDF release, that staleness matters.
- Ownership handoff relies on a shared MQTT topic with no lease or lock, and the README does not say what happens during a broker outage or when two instances reconnect at the same moment. Broadcaster topics are also published without the retained flag, so a consumer that restarts misses the last reading until the next advertisement arrives.