Custom components for ESPHome using BLE Advertising.
Those components are ESPHome external component. In order to use them you will need to have:
- A basic knowledge of ESPHome. A good entry point is here.
- The ESPHome integration in Home Assistant
- An Espressif microcontroller supporting Bluetooth v4, such as any ESP32 based model. You can find some for a few dollars on any online marketplace searching for ESP32. ESP32-VROOM, ESP32-C3 and ESP32 Vemos Mini are known to work OK.
Use this for various Chinese lamps that are controlled via BLE advertising packets. Supported apps:
- LampSmart Pro
- Lamp Smart Pro - Soft Lighting / Smart Lighting
- FanLamp Pro
- ApplianceSmart
- Vmax smart
- Zhi Jia
- Zhi Guang
- Other (Legacy), removed app from play store: 'FanLamp', 'ControlSwitch'
- ble_adv_handler, Main Technical component centralizing the interaction with the BLE ADV Stack:
- listens to BLE ADV remotes / phone app and transmit the commands to ble_adv_remote and ble_adv_controller
- sends BLE ADV messages generated by ble_adv_controller to the controlled devices
- ble_adv_controller, the functionnal component representing a Controlled Device and its related entities (Fan / Light / Button)
- ble_adv_remote, the functionnal component representing a Remote, allowing to perform actions and control/publish to ble_adv_controller
- As a preliminary step, be sure to be able to create a base ESPHome configuration from the ESPHome Dashboard, install it to your ESP32, have it available in Home Assistant and be able to access the logs (needed in case of issue). This is a big step if you are new to ESPHome but on top of ESPHome doc you will find tons of tutorial on the net for that.
- Add to your up and running ESPHome configuration the reference to this repo using (ESPHome external component)
- Listen to the traffic generated by your Paired phone App and / or you Remote using the ble_adv_handler.
- Add a device controller ble_adv_controller with its configuration (encoding/variant/forced_id/index) as extracted from the Phone App traffic in Step (3). If several configs are available with several variants, use the variant with the higher value as a start.
- Add one or several light or fan entities to the configuration with the
ble_adv_controller
platform - Find the relevant
variant
andduration
corresponding to your device thanks to Dynamic configuration - Enjoy controlling your BLE light with Home Assistant created Entities:
- Light(s) entity allowing the control of Color Temperature and Brightness
- Fan entity allowing the control of Speed (3 or 6 levels), direction forward / reverse and Oscillation
- Synchronize your Physical Remote with ble_adv_remote
More details are available in the documentation of each component.
Based on the initial work from:
- @MasterDevX, lampify
- @flicker581, lampsmart_pro_light
- @aronsky, ble_adv_light
- @14roiron, zhijia encoders, investigations
- All testers and bug reporters from the initial threads: