Skip to content

NicoIIT/esphome-components

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BLE ADV ESPHome Components

Custom components for ESPHome using BLE Advertising.

Requirements

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.

Fans / Lamps controlled by BLE Advertising

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'

Components

  • 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

Basic How To

  1. 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.
  2. Add to your up and running ESPHome configuration the reference to this repo using (ESPHome external component)
  3. Listen to the traffic generated by your Paired phone App and / or you Remote using the ble_adv_handler.
  4. 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.
  5. Add one or several light or fan entities to the configuration with the ble_adv_controller platform
  6. Find the relevant variant and duration corresponding to your device thanks to Dynamic configuration
  7. 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
  1. Synchronize your Physical Remote with ble_adv_remote

More details are available in the documentation of each component.

Credits

Based on the initial work from:

About

Custom BLE ADV based components for ESPHome

Resources

License

Stars

Watchers

Forks

Languages

  • C++ 69.8%
  • Python 30.2%