How to Control any Bluetooth Device Using ESPHome

I want to control a bluetooth enabled automatic air freshner (Godrej Aer Smart Matic) from my Home Assistant.
Below is the link of the product;

The first problem is that my HA is running on my Pi 3 which is sitting in an isolated far off room; so using my Pi 3’s Bluetooth to connect to the Air Freshner is not possible with this scenario. I am not even sure if I would have been able to control the air freshner if it was located near my Pi 3. But still, I would like for a way to use an ESP32 running ESPHome or something like that to act as a bridge/gateway between my HA & the end bluetooth device. I know Xiaomi has a gateway that has bluetooth, but to the best of my knowledge it reads sensor data only; please correct me if I am wrong. Anyways I wanted to use an ESP32 because I was going to use its WiFi to connect to my network & then if possible use its Bluetooth to connect to Bluetooth enabled devices. Although I am not sure exactly if the end bluetooth device that pair with a smartphone’s bluetooth & get controlled via a app will work with HA through a Bluetooth Gateway/Bridge or not. But I still want to give it a try.

1 Like

let us know if you got any way out. [

This project does the same thing for Switchbots, although without esphome, but still with HA integration via mqtt: GitHub - devWaves/SwitchBot-MQTT-BLE-ESP32: Allows for multiple SwitchBot bots and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Temperature, Motion, Contact sensors


Should the service_uuid & characteristic_uuid be changed?