ESP32-BLE2MQTT: Seamlessly Connect Your BLE Devices to the IoT World

ESP32-BLE2MQTT is a powerful tool that seamlessly connects your BLE devices to the MQTT message queue, enabling convenient IoT data transmission and control. It is developed based on the ESP32 chip and built using ESP-IDF v5.2.1, providing a stable and reliable bridge for your IoT projects.

ESP32-BLE2MQTT: Seamlessly Connect Your BLE Devices to the IoT World

The core features of ESP32-BLE2MQTT:

1. Bidirectional Communication:

ESP32-BLE2MQTT maps the GATT characteristics of BLE devices to MQTT topics, enabling bidirectional communication. This means you can obtain data from BLE devices by subscribing to MQTT topics, and you can also control BLE devices by publishing to the corresponding topics. For example, you can subscribe to a BLE device’s temperature sensor data on a mobile app and control a BLE device’s LED light from the same app.

2. Automatic Characteristic Registration:

Characteristics that support notifications will be automatically registered and published to MQTT topics when new values are available. This simplifies the development process, allowing you to avoid manually handling data publishing logic.

3. Active Reading:

You can actively read the characteristic data of BLE devices by publishing messages with a /Get suffix to the MQTT topic. This allows you to retrieve specific data as needed, rather than passively waiting for data updates.

4. Configuration File:

ESP32-BLE2MQTT uses a JSON configuration file, allowing you to easily configure network connections, MQTT server information, BLE device filtering, and other parameters. This enables you to customize the behavior of ESP32-BLE2MQTT according to your needs.

5. Broadcast Device Support:

ESP32-BLE2MQTT supports publishing information from BLE broadcast devices to MQTT topics. This allows you to monitor nearby BLE devices, such as iBeacon devices, Eddystone devices, and various smart home devices.

6. OTA Upgrade:

ESP32-BLE2MQTT supports OTA upgrades, making it easy to upgrade firmware and configuration files without a physical connection to the device. This allows you to easily fix vulnerabilities, add new features, or optimize performance.

Advantages of ESP32-BLE2MQTT:

  • Ease of Use: Simple configuration and an intuitive API make ESP32-BLE2MQTT easy to use.

  • Flexibility and Scalability: Powerful configuration options allow you to customize the behavior of ESP32-BLE2MQTT as needed.

  • Stability and Reliability: Developed based on ESP-IDF v5.2.1, it provides stable and reliable communication and data transmission.

  • Open Source: The open-source codebase allows you to freely modify and extend functionality.

Use Cases:

  • Smart Home: Control and monitor BLE smart home devices, such as smart bulbs, smart locks, smart thermostats, etc.

  • Industrial Automation: Monitor and control industrial devices, such as sensors, actuators, etc.

  • Health Monitoring: Retrieve and analyze data from BLE health monitoring devices, such as heart rate monitors, blood pressure monitors, etc.

  • Asset Tracking: Track and manage BLE asset tags, facilitating management in warehouses, logistics, and other scenarios.

How to Use ESP32-BLE2MQTT:

  1. 1. Install the ESP-IDF and ESP32 development environment.

  2. 2. Clone the project from the GitHub repository.

  3. 3. Modify the configuration file to suit your needs.

  4. 4. Build and flash the firmware.

  5. 5. Connect to the MQTT server and start using it.

Conclusion

ESP32-BLE2MQTT is a very practical tool that can help you connect various BLE devices to the IoT world, enabling convenient device management and data interaction.

Project Address: https://github.com/shmuelzon/esp32-ble2mqtt

Leave a Comment