View on GitHub

ESP32-mqtt-room

An ESP32 based presence detection node for use with the Home Assistant mqtt_room component for localized device presence detection.

Generic BLE Hardware

Here is a list of devices known to be “trackable”:

Add to the list

If you have a different BLE-enabled piece of hardware that you have gotten to work with this project, please let me know about it! You can open an issue or just submit a pull request to update the documentation right in the repository!

Device ID

To track generic BLE advertisements, you will need to know the hardware MAC address of the device. You can use an app on your smart phone to scan for and identify the correct device - I recommend NRF Connect from Nordic Semiconductor for Android (and I believe there is an iOS version as well).

Alternatively, you can subscribe to the room_presence topic and view what devices are being reported there. Note that modern smart phones will randomize their hardware MAC address when broadcasting advertisements, so you must use a beacon app to track your phone (see the section on tracking phones for more information).

To track the device, specify the device_id entry as the hardware MAC address, without the colons.

configuration.yaml

Here is an example of how an entry into your configuration.yaml file should look:

sensor:

# One entry for each beacon you want to track
  - platform: mqtt_room
    device_id: C80F104DC7EB # Match the Bluetooth MAC address of the device
    name: 'Mi Band'
    state_topic: 'room_presence'
    timeout: 60
    away_timeout: 120