← Back to context

Comment by toomuchtodo

1 month ago

Is there any documentation and a specific esp32 Bluetooth proxy you would recommend?

esp32 bluetooth proxy: There's a standard esphome component that just turns any esp32 with appropriate h/w into a BTLE proxy: https://esphome.io/components/bluetooth_proxy/

I'm just using a cheap ESP-WROOM-32 but the recommended way to do it is with an wired ethernet-based ESP32 so you don't have interference with the wifi and btle. For a scale this works well enough. I haven't yet received the athom smart plug so I can't recommend it yet. Should be here in a week or so.

Once you've got the proxy you can just use the eufylife integration: https://www.home-assistant.io/integrations/eufylife_ble/

To setup the esphome bluetooth proxy you install esphome, and then create a yaml file that you'll use to configure the board, like this:

   esphome:
     name: bluetooth-proxy
   
   esp32:
     board: esp32dev
     framework:
       type: esp-idf
   
   # Enable logging
   logger:
   
   # Enable Home Assistant API
   api:
     encryption:
       key: "YOUR_KEY_HERE"
   
   # Enable OTA updates
   ota:
     - platform: esphome
   
   # WiFi configuration (matching the settings from your other devices)
   wifi:
     ssid: "YOUR_WIFI_SSID"
     password: "YOUR_WIFI_PASSWORD"
   
     # Enable fallback hotspot (captive portal) in case wifi connection fails
     ap:
       ssid: "Bluetooth Proxy Fallback"
       password: "proxyfallback"
   
   captive_portal:
   
   # Enable ESP32 BLE Tracker
   esp32_ble_tracker:
     scan_parameters:
       active: true
   
   # Enable Bluetooth Proxy
   bluetooth_proxy:
     active: true

Once that's done, plug in your board to your system and use esphome run bluetooth-proxy.yaml (you might have to find the device it's showing up as in tty.usbserial or whatever).

  • Thanks so much, I appreciate the time you put into this comment. It is highly relevant to a project I’m currently working on, and has saved me at least a day of time.