ESP Bluetooth Proxy

Hey all;

Let me be up front; I am complete noob to this all… even the coding. So, I went to reading old posts and even the ESP32 documentation. Of course, now I am even more confused. So, I reach out to those in the know…

I ordered a bunch of ESP32s to use as bluetooth proxys. I am gonna use them for locating people within my home (we all have android phones we carry religiously) and this is the best way I can think of for HA to know what person is in what room and adjust things to that person’s liking (lighting, temp, etc.)

So, that brings me to TEMP… I was going to add a BME280 temp sensor to each proxy. From what I have read, that should be easy enough for the ESP32 to handle with the proxy function. The question is… how?

So, I know how to physically wire it up. However, I have to load code into the ESP32. So, for this, I was going to install the proxy programing from here

but if I am adding the sensor, I assume that programming needs modification. So, I went to the github site and looked at the firmware yaml. Which only made me more confused. I didn’t see ANY instructions in the github yaml file at all. It just read

packages:
moved: github://esphome/bluetooth-proxies/esp32-generic/esp32-generic-c3.yaml@main

So, now I am looking at it and going, “What in the world?” as I see NO programming in there, at all, let alone what I would need to modify to add the sensor. In short… help please??

That is a shortcut to here

Did you yet have a look at the getting started docs which explains how to work with esphome? :page_facing_up:

You need the esphome compiler/dashboard/builder or however it is called today add-on for this like explained :point_down:

In a nutshell take the yaml linked by @nickrout and add the example snippet from the docs for the sensor you want to your yaml, like bme280 :point_down:

I did read that page… and I understood enough to install the ESPHome Device Builder. That was about the limit of my understanding

You are very close already then… About the half way already :+1:

If you installed the ready made ble proxy you should even be able to “adopt” the device when it is online/discovered in the device builder and then it’s only to add the sensor yaml snippet you want and hit save& install :rocket:

So, when I click the “connect” button does it load the YAML from the page I saw, does it reach out to the one you linked, or does the page I saw cause the ESP32 to use OTA and retrieve the one you linked to? I am really confused as to the mechanism of getting the program into the ESP32 now. I have seen quite a few YouTube videos that made it seem it would just load the programing from the website (which wont work for my needs anyway)

First flash needs to be via serial after that you just can use OTA (WiFi) :signal_strength:

Dangerous and probably even confusing when they are older… :grimacing:

Did you yet gave the thread how to ask a good question a short read? Otherwise this here might go on forth and back till we finally know where you are and what are your pain points actually :point_down:

Ok… but that is kind of where I am lost. I install the ble proxy from the website. HA recognizes and connects to it. From there, how do I get to the onboard programing to reprogram and add what I need?

For that matter, what do I add and where?

BTW - I haven’t installed anything yet. The ESP32 arrives on Tueday and I want to receive it, plug it into my computer, install the ble proxy from the website, and then start figuring out how to add the functions I want to it. All I have, at this moment, is a functioning HA with ESPHome installed and ESPHome Device Builder (not even sure if I am supposed to have both installed at the same time)

1 Like

You need the device builder/compiler add-on for it which has its own webinterface! Like it is explained in the getting started guide linked above :point_up:

The esphome integration is always part of HA and if you only want to use ready made projects that is all you need. As you want to modify/build your own you need the add-on :bulb:

That much I understood… then what? ((no I am not being a smart ass here…) Seriously, I don’t understand that website for anything. I mean, seriously… it says things like

After creating your first configuration, you’ll need to install it on your device.

With no explanation as to HOW to create your first configuration or how to install it on the device. It just assumes the reader knows… This reader doesn’t know

Well, it comes with a wizard :mage:

The web UI will present a wizard which will walk you through creating your first configuration

Is what I read followed by screenshots of the web ui and a quick tour of the interface :person_shrugging:

The getting started docs even have this section which reads like the answer to your question(a) :sweat_smile:

Adding Features

After stepping through the wizard, you should have a device configuration (YAML) file. In the ESPHome Device Builder, click on “EDIT”

Once you use the web builder, the device builder add on will ask if you want to adopt it. Once you adopt it, you can modify the yaml to include the sensor you want. Then click install and the new firmware will be compiled and uploaded to the esp.

So, do I have the ESP 32 device connected to the computer via USB for the Device Builder? Cause if I load the prewritten ble proxy, it won’t be. Since it will be running the BLE Proxy, it will then be on my wifi. Also, is the builder just reconfiguring ESPHome on HA? Or is it actually reprograming the device? If it is reprograming the device, how is it retrieving the files from the device, updating them, and reinstalling them OTA? I have a TON of questions here… none of which I am getting out of that website. From what it looks like to me, I use the builder when it’s connected to the computer via USB and use the wizard to create the whole module from scratch. However, I am looking to start with a prebuilt firmware…

The builder compiles the firmware and uploads it via ota or serial (ie USB). Up to you.

I think you should wait for your esp32 to arrive… Most of the questions will probably dissapear quickly… Esphome is a no/low-code approach which does most of the hard work for you… Kind of “too easy” to write more intensive docs - BUT: You are always invited to improve them :+1:

How does it get the YAML file? Does it download the existing one from the ESP32 or am I building a whole new one from scratch in the wizard?

Let me rephrase… I am starting with an existing ESP32 with a YAML on board (cause I am starting with the prebuild BLE Proxy from the website). Is the wizard building one to replace that one or am I somehow editing the existing one? If I am editing the existing one, how does it get from on the device into the Wizard for me to edit?

Here is where I am getting lost…

I load the ESP32 with a firmware from

So, the device is up and running from that alone. Now, how does the Wizard retrieve that firmware and allow me to update it?

Or will using the Wizard just write a whole new firmware from ground up? If so, that actually means I have to learn more coding cause I have to recreate the BLE Proxy as well.

I wanted to keep it simple and start with just modifying something known to work so I can see how my modifications affect it. Will I break it or will it just work? If so why? Why did it work in the first place? I thought I would figure these things out starting from a known good. However, it appears to me, that the only way to modify it is to just start from scratch. At which point, there is no reason to start from a known good.

You really are over complicating things.

Follow these steps.

  1. Install esphome builder via the addon.
  2. Download the yaml for an esphome proxy
  3. Install that over USB to the esp device. Esphome builder will download the source code corresponding to the yaml, compile it and uploaded it to the esp.
  4. Check it is working
  5. Amend the yaml to add your component
  6. Install that firmware. It will be rebuilt (because you added stuff to the yaml) and uploaded via ota or USB (your choice).
1 Like

:point_down:

…in the first reply :roll_eyes:

If the device is adoptable yes :white_check_mark:

And yes, the ready made projects are adoptable… :hugs:

Also possible, your choice :person_shrugging:

Really, just get your hands dirty and then - if you have a proper question read this short thread and ask a good one :+1:

1 Like

I never tried it, but isn’t for location control espresence better - more accurate (developed for this purpose) than esphome?