Controlling BLE ceiling light with HA

Nope, the same error

Are you sure you effectivelly refreshed the repo? Please be sure to specify the external_components refresh as ESPHome is specifying it to 1 day by default.

external_components:
  - source: github://NicoIIT/esphome-components
    refresh: 0s

All is ok. The light are working without problems which I told early

Not possible to update, got error that componnet not found

  
  Component not found: ble_adv_controller.
  - id: my_controller
    encoding: fanlamp_pro
    variant: v3
    duration: 200
    reversed: False
    forced_id: 0

this is my code:

external_components:
  - source: github://NicoIIT/esphome-components
    components: [ble_adv_controller]
    refresh: 0s
ble_adv_controller:
  # A controller per device, or per remote in fact as it has the same role
  - id: my_controller
    # encoding: could be any of 'zhijia', 'fanlamp_pro', 'smartlamp_pro' (the 2 last are the same)
    encoding: fanlamp_pro
    # variant: variant of the encoding 
    # For ZhiJia: Can be v0 (MSC16), v1 (MSC26) or v2 (MSC26A), default is v2
    # For Fanlamp: Can be any of 'v1a', 'v1b', 'v2' or 'v3', depending on how old your lamp is... Default is 'v3'
    variant: v3
    # duration: the duration during which the command is sent. 
    # Increasing this parameter will make the combination of commands slower, 
    # but it may be needed if your light is taking time to process a command
    duration: 200
    # reversed: reversing the cold / warm at encoding time, needed for some controllers
    # default to false
    reversed: false
    # forced_id: provide the 4 bytes identifier key extracted from your app phone traffic 
    # to share the same key than the phone
    # example: 0xBFF62757
    # For ZhiJia, default to 0xC630B8 which was the value hard-coded in ble_adv_light component. Max 0xFFFFFF.
    # For FanLamp: default to 0, uses the hash id computed by esphome from the id/name of the controller
    forced_id: 0

EDIT: Seems needed to delete componenet…

I splitted the component in 2: ble_adv_controller and ble_adv_handler, in order to ease future integration of ble_adv_remote component, and both are needed to have it work (even if it is transparent in the config). Still if you filter the components to only ble_adv_controller, you will miss ble_adv_handler.

For the adventurous ones, big update is available in dev branch: the components are now able to listen and decode the BLE ADV messages, and then new features are available:

  • Updated list of officially fully supported Phone Apps, with corrected variants to send exactly the same messages than the Phone Apps
  • Listening to Phone App traffic and extract parameters to shadow it with a ble_adv_controller without the need to pair the ESP32
  • Listening to physical remotes and update HA state when remote is used, or do whatever action you want
  • BLE ADV raw message decoding and injection, for the ones that have devices that cannot be controlled by the Phone Apps given.

doc (beta)

Configuring dev branch:

external_components:
  - source: github://NicoIIT/esphome-components@dev
    refresh: 0s

Please note some other changes have been done in the variant names, custom buttons and verifying the forced_id. Just follow the error messages if any and it should help you perform migrations.

Should you face issues or want your remote to be supported, you can open issues here, providing the needed DEBUG logs and your config.

3 Likes

I just updated things seem to work so far. My remote was working before does the update take the remote function away?

never mind remote still works