How Does Presence Detection work?
There are various ways to detect presence in Home Assistant and trigger automation.
One of the most popular ways is via Wi-Fi data pipe connection.
However, it requires a supported Wi-Fi router or data pipe devices.
Thats where Bluetooth technology comes in.
After drivers are installed, restart the system.
Then connect the ESP32 board to your PC or MAC computer using a micro USB cable.
Then, select ESP32 from the drop-down and clickConnect.
Choose the serial port where ESP32 is connected.
It usually displays the chip name (CP2102 or CH340) orSer!
Once connected, clickINSTALL ESPRESENSE.
Then, click theErase devicecheckbox and selectNext.
After doing the above, selectInstalland wait for the installation to finish.
After the firmware is flashed, clickNextand then clickLOGS & CONSOLE.
This opens theLogswindow, where you might see the status of the module.
Step 3: Using ESPFlasher Tool
Download the latestESPresense firmwareand theESPHome-Flashertool.
Launch theESPHome-Flashertool, chooseCOMport, select theesp32.binfile and clickFlash ESP.
After the firmware is flashed, the ESPHome-Flasher tool will start displaying logs.
launch the web online window on your phone and visit the 192.168.4.1 IP address, before doing the following.
Leave rest of configs as default.
ClickSaveand reconnect the unit USB cable to restart the ESP32.
The ESP32 will connect to the Wi-Fi connection and start scanning nearby Bluetooth devices.
The information is displayed in theLogs.
Then, click thexx DevicesunderMosquitto broker.
To verify the equipment, you’re able to install annRF Connector for the Mobileapp.
The app displays the Mac address of nearby Bluetooth devices.
Match the mac address in-app with the one displayed in the Logs.
Afterwards, tap on theSaveicon.
Go toConfiguration > Settingsand clickCheck Configuration.
If theConfigurationis valid, clickRestart.
After the restart, go toDevelopers Toolsand enter the name of the machine.
It should display the distance.
You may also the rig entity on your dashboard.
Afterwards, selectStart with empty automation.
InAction, choose the gear or devices you want to turn on or off.