Cease shopping for a brand new ESP32 for each sensor — your Bluetooth proxy has spare pins
ESP32 boards might be extremely low-cost. They’re so low-cost that it is easy to fall into the behavior of utilizing a brand new board for every mission that you just construct. Doing so could also be losing the capabilities of your ESP32s, which might deal with a couple of job at a time.
Your Bluetooth proxy continues to be a general-purpose ESP32
If it is only a proxy, you are leaving cash on the desk
A Bluetooth proxy is without doubt one of the simplest ESP32 projects you’ll be able to arrange. You can use a Bluetooth proxy to permit your smart home server to speak with Bluetooth units, even once they’re out of Bluetooth vary of the server itself. The Bluetooth proxy communicates with the system over Bluetooth and passes the knowledge forwards and backwards to the sensible residence server over Wi-Fi.
Since many ESP32 boards have onboard Bluetooth and Wi-Fi, you normally do not want any further {hardware}. ESPHome has a ready-made project that you should use to flash your ESP32 with the related code to work as a Bluetooth proxy, so it is so simple as hooking up your ESP32 to a pc and following the directions.
Just as a result of your ESP32 is working firmware that enables it to work as a Bluetooth proxy doesn’t suggest that is all it may be. It’s nonetheless an ESP32, and there is probably much more that you are able to do with it.
ESPHome lets your Bluetooth proxy do a couple of job
You can add sensors to the identical configuration
Many ESP32 boards include general-purpose input/output (GPIO) pins. These are bodily connections that permit the microcontroller to work together with exterior {hardware}, identical to the pins of a Raspberry Pi. A GPIO pin can do easy issues resembling figuring out whether or not a change is open or closed, or extra advanced issues resembling speaking with refined sensor modules.
Setting up an ESP32 as a Bluetooth proxy does not require utilizing any of those pins. If you are solely utilizing your ESP32 as a Bluetooth proxy, a variety of its potential goes to waste. That’s as a result of, utilizing ESPHome, you’ll be able to set up your ESP32 to do more than one job.
If you add the bluetooth_proxy part to your ESPHome configuration, you may also embody further parts that permit your ESP32 to do a couple of job. For instance, you’ll be able to add parts to show sensors that you just hook up with the GPIO pins.
It means you need not use one ESP32 as a Bluetooth proxy and one other to hook up with a sensor. You can get the identical ESP32 to do each jobs.
Spare pins can add surprisingly helpful sensors
One ESP32 can change a number of devoted units
This is strictly what I’m doing in my residence. I’ve been utilizing ESP32 boards round my residence as Bluetooth proxies for a while. I take advantage of one to speak with a SwitchBot finger robot that is too removed from my Home Assistant server to attach straight.
I even have a number of extra positioned across the residence that I take advantage of with the Bermuda integration. This integration measures sign power from my iPhone and Apple Watch at every Bluetooth proxy. The integration can then estimate which rooms these units are in, successfully giving me room-based presence detection that I can use in my automations, in addition to permitting me to ask Assist the place my telephone is each time I misplace it.
Initially, these ESP32s have been used purely as Bluetooth proxies, however I shortly realized that it was a waste of their potential. I added cheap soil moisture sensors to a few of these ESP32s, which hook up with the GPIO pins. My Bluetooth proxies now even have a second job as soil moisture screens, feeding their knowledge again to Home Assistant in order that I might be alerted each time a plant wants watering.
This is only one instance of what you’ll be able to add to an ESP32 that is already doing one other job. You can add all types of helpful sensors, together with temperature and humidity sensors, contact sensors, mmWave presence sensors, and extra. Depending on the sensors you are utilizing and the pins out there, you could possibly add a couple of sensor to your ESP32, making it much more helpful.
Not each spare-looking pin is definitely spare
Check your board earlier than you join something
While you’ll be able to add a variety of sensors to your ESP32, that does not imply you could hook one thing as much as each single spare pin you could have out there. Different ESP32 boards can have completely different usable pins, which can be in very completely different preparations.
Some ESP32 pins serve particular functions, resembling figuring out how the system ought to boot. Connecting a sensor to those pins could trigger the ESP32 as well incorrectly. You cannot simply plug any random sensor into any random pin.
These pins additionally use 3.3V logic, so even when a board can settle for the next voltage, the GPIO pins could not safely settle for 5V alerts. Carefully test the pinout diagrams in your ESP32 boards to find out which pins you should use in your sensors and what the sensor’s voltage and wiring necessities are. In many instances, the reply is normally pretty easy and simply includes connecting the precise wires to the precise pins, but it surely’s higher to be secure than sorry.
Make essentially the most of your ESP32s
If you could have ESP32 boards doing solely a single job, you could possibly get extra out of them. There’s a restrict to how a lot multitasking they will deal with, however easy sensors can usually be added with out stopping the ESP32 from persevering with to carry out its present job.

