Beginner help with ESPHome / Bluetooth proxy

If you need the Bluetooth Proxy, it’s a good thing to try and get working. It is not something to just have for the sake of having. If your sensors work well with a proper USB bluetooth dongle, then great, use that, no need for a proxy. If you need it because of range, then have a go.
I would suggest try it first using a dedicated ESP32 device and using the script on ESPHome website to make it a dedicated BT Proxy first. Once you have that working, then look at shared devices if needed :slight_smile:

Well yes and no. At the moment everything works great, but I’ll be switching to the HA Yellow soon and it only has two usb ports (my current setup has four). So it basically has to do with trying to save the ports for other future projects.

Regarding the HA Yellow, if you need to you can use a USB Hub with the Yellow. Also, if you have a USB Zigbee dongle now, you will not need that with the Yellow as it has Zigbee radio built into it, and if you order the Pi 4 CM Separate, you could order the Pi 4 CM with the WiFi and BT onboard.
Mind you, given how long you have to wait for them, if you ordered just the full Yellow device, you won’t get the BT and WiFi.

I have a Yellow PoE Kit on the way and I ordered a 4GB / 32GB Pi 4 CM with Bluetooth and WifI separately.

I ordered a PoE version when it was released, so it should hopefully arrive Q1 of next year. I have several unused CM4s, think I’m gonna use a 8 GB/no MMC variant with WiFi/BT. And NVMe for OS + storage.

Lampyridae, I got the same thing - only after Adopting the Bluetooth proxy into ESPHome on HA. readded both devices - didnt add them to ESPHome, they are working fine.

I think when adding them to ESPHome, it pushes a different firmware??? I have been running my two ESP32’s now for about 5 hours, and no issues. before I lost connection within 5 minutes after ESPHome HA pushed an update…

Someone needs to make a device that plugs into a USB and then allows you to run 4 or even 8 more USB ports from it…oh wait, they do! Use a USB hub if you need more. They’re literally plug and play.

I’ll try that, thanks.

That’s a snarky reply. Yeah sure, you could do that, but I’m not interested in having a rats nest hanging from a USB-port.

@Fallingaway24
That was not much of a helpful reply. Not everyone wants to have hubs handing off there HA device.

@Lampyridae
Bluetooth Proxy in ESPHome still has some bugs with the Active Bluetooth Proxy. There are a couple of open issues working actively on these bugs. Passive proxy works fine though. Hopefully the bugs will get ironed out soon.

This one is being used to track some issues: Lock not connecting to Bluetooth Using YaleAccess Bluetooth integration · Issue #3761 · esphome/issues · GitHub

1 Like

@brendan Yeah, I’m very aware of that. So far my BT dongle with external antenna works just fine and I’m still waiting for my POE version of the HA Yellow. So at the moment I still have enough USB ports.

You wish it had more usb ports but adding more with 1 wire, that’s a rats nest but, if it had extra ports built-in, that somehow wouldn’t be the same rats nest? I don’t think you thought that one through very well.

@Fallingaway24 Let’s agree to disagree then, shall we?

Yep, sounds like a deal.

Is there some guide to make it work without that?

I can’t seem to figure out how to do anything with the “web based installer” on the ESPHome site to fetch the YAML I need, and I can’t tell if what I did on my own is working or not or anything.

I’ve also seen many mixed things about what to put for a board type on a ESP32 Mini WROOM-32 board.

There are guides to do just about anything, but I do not use it outside HA so I never used any guides on that.

But the addon isn’t that complicated i.m.h.o. It works best with Chrome for me, and it told me so when I used an unsupported browser. Also you may need a serial driver for your laptop to flash, but that too was explained to me by the wizard once I tried to flash it. Windows 11 on a new laptop seemed to include them and didn’t require further installs - there Chrome worked out of the box.

What was confusing to me is that I didn’t expect that the web based installer could flash when the device is plugged into the laptop itself. To me it wasn’t obvious or even expected that it would work that way, I figured I had to plug the esp in my RPi4. But that isn’t so - flashing is all done by the browser on your own machine. Only the build is done by HA, but that is automatically done.

A base yaml suited for your device is generated by the wizard when you press add device. That one is complete with wifi and integration into HA. It can be edited from the browser to fit your need, and lands in the config folder under esphome. That is way easier than building a yaml from scratch and trying to flash that. The times I had a complete yaml I first had one built by the wizard and then copied the relevant bits from the other yaml into it.

Most times the wizard also picked the right board for me, and but I don’t think using ESPHome separate will make it much easier.

This feels like it’s so much more complicated than being able to just toss some YAML in the /config/esphome folder and hit “install” that always just worked flawlessly and never had to install extra junk on my computer.

I didn’t realize I would have to go get the board and plug it into my computer every time that way instead of just using the wireless installer to try different things that might work after the initial flash I did the usual way thru the ESPHome addon in HA. Seems like a step backwards.

I installed Chromium (I’m on LInux) and the wizard let me “install” as a generic ESP32 device for the bluetooth proxy but now I don’t know what it named the device so I can’t add it to Home Assistant and the LED for status isn’t working with whatever it generated (which I don’t see a way to look at) so I can’t even tell if it’s connecting to the network. The logs in the web-installer stop at “starting cpu scheduler” so I think it may be even worse than what I made by guessing on my own…at least what I’d done by copying a known-working existing esp device got far enough I could see it connect to my network and to HA, even if the bluetooth parts didn’t seem to work.

This is so frustrating! Its like the wizard is making unspecified wrong assumptions it’s not telling me about or something.

I think I’ll now have to plug it back into my HA and reinstall the YAML that I already had…at least that was getting to the point I could manipulate it over the network even if bluetooth didn’t work.

EDIT So apparently HA did after a bit find something to “Adopt” but then asked the same connection questions again, and then had to re-build and re-install the firmware again, but then failed to connect to it (probably because it never asked for the DNS suffix or other network details). Ugh!

EDIT2: I see it generated this YAML that I’ve never seen before but includes a web address. Does this mean it needs it to be on an internet facing connection not an IoT VLAN?

substitutions:
  name: esp32-bluetooth-proxy-df49c0
packages:
  esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/esp32-generic.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

Nothing else has required internet access to work properly of all my other ESPHome things.

Certainly not, this is just for the first install. Once it is on wifi, it all works wirelessly in place.

Schermafbeelding 2022-12-10 140048
Huh? How can you not know wehat name the wizard uses? You gave it yourself as step one. The yaml is put in the config directory, it is in the second line of that file. And if it is added, it shows up in the dashboard as well.

It seems you cannot make up your mind you want it easy but make all the choices yourself, but every choice is too complicated. So either investigate and pick what you need yourself or trust the wizard to guide you. The generic option is usually just fine. If it is, no one is going to create a specific board definition that is the same as the generic one. Pretty much all my esp32’s I own use esp32dev.

It never prompted me for that with the wizard. It just started programming it and then asked for a WiFi network and nothing else.


I thought the wizard would help me figure out what the bluetooth stuff is I seem to be unable to make work…I already know the network bits to make the network work for my LAN.

That is not the ESPHome dashboard, I have no clue why they made that monstrocity. Just go to ESPHome in HA, add a new device though the wizard, edit the yaml and put this in:

esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms
    window: 1100ms
    active: true

bluetooth_proxy:
  active: true

Maybe, just maybe, for specific devices mentioned there, look at their yam

1 Like

So what I made on my own that connects to the network but doesn’t seem to show for bluetooth in HA nor the ESP logs (and keeps reconnecting periodically) was based on forum stuff. But I could at least hit it over WiFi to reflash and get logs.

But the bluetooth proxy stuff I don’t think worked…or I couldn’t see it working anywhere not showing bluetooth in HA nor the logs seeing devices I can see with a USB dongle.

esphome:
  name: bt_proxy_dining_room
  platform: ESP32
  board:  esp32dev

wifi:
  networks:
    - ssid: !secret ssid
      password: !secret password
      bssid: !secret bssid_basement_rear-EWS377AP-local
      priority: 2
    - ssid: !secret ssid
      password: !secret password
      priority: 1
  domain: !secret dns_suffix

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "bt_proxy_dining_room setup"

captive_portal:

# Enable logging
logger:
  baud_rate: 0
  level: DEBUG

# Enable Home Assistant API
api:

ota:


esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms
    window: 1100ms
    active: true

bluetooth_proxy:
  active: true


switch:
  # Allow forced-reboot from HomeAssistant
  - platform: restart
    name: "bt_proxy_dining_room Restart"



status_led:
  pin:
    number: GPIO2
    inverted: true