ESP32 BLE Sniffer for presence detection

Hi (from OZ)
Sharing my take on a BLE based presence detection using iPhone / iWatch BLE signal. I used an ESP32 chip for this and custom coded the sniffer and connection to Home Assistant. Using Home Assistant for TTS via Sonos Air.
Basically what I have built is a voice guided greeting system, that identifies users based on iPhone/iWatch BLE signature. It’s been working well so far. Had some issues around disconnect or halt on the ESP32 but was able to overcome that using Deep Sleep.
Still have an MQTT issue (Not receiving published data from Home Assistant mosquito MQTT. Would love a sample code or tips if anyone has solved it already).

Demo video here:

The details is here:

What never worked are these 2 culprits (If anyone knows a solve to this I would be grateful)
esp32_mqtt_callback
publish_to_esp32

Hope you enjoy.

1 Like

What never works is posting screenshots of text files.

1 Like

@nickrout I thought the image was clear enough to see the code. If not let me know if you would like me append the code in text here (assuming you have solution).

Please read this.