Presence detection with low cost BLE devices and Raspberry Pi/Zero W

I too saw the video from “the guy with the Swiss accent” and modified his code

ESP32 presence detection

to send ‘Home’ and ‘Away’ MQTT presence messages to Homeassistant.

To make the build as small as possible I used an ESP-WROOM-32 which can be picked up for under £4 on AliExpress. I housed mine in the case from an old faulty USB Bluetooth stick so it can be plugged into any USB 5v charger.

ESP32 presence detector wiring

ESP32 USB stick

I used a HT7333 to drop the 5v to 3.3v and put a capacitor across the output as I was getting brownout reboots. I’m currently running the detector to make sure long term stability is good, so far everything is working well.

2 Likes