Bermuda BLE Trilateration

repository·main·Indexed 23 days ago

https://github.com/agittins/bermuda

A Home Assistant integration for room-level (Area) Bluetooth device tracking and distance estimation. It utilizes Bluetooth proxies via ESPHome, Shelly devices, or local USB Bluetooth adapters to determine device presence and create Area and Distance sensors.

Tokens
1K
Snippets
0
Records
9
Agent score
82%

What's inside Bermuda

  1. Hardware requirements for Bermuda

    main

    To track devices effectively, you need one or more devices providing Bluetooth proxy information to Home Assistant. Supported hardware includes:

    • ESPHome devices: Any ESP32-based device with the bluetooth_proxy component enabled (e.g., D1-Mini32).
    • Shelly devices: Shelly Plus or later devices with Bluetooth proxying enabled via the Shelly integration.
    • USB Bluetooth: A USB Bluetooth adapter on the Home Assistant host. Note that this is less ideal because USB adapters often do not timestamp advertisement packets, which limits advanced tracking capabilities to basic 'Home/Not Home' and simple Area distance support.
  2. Install Bermuda via HACS

    main

    The recommended way to install Bermuda is through the Home Assistant Community Store (HACS).

    1. Open HACS in your Home Assistant instance.
    2. Search for "Bermuda".
    3. Install the integration.
    4. Restart Home Assistant.
    5. Go to Settings > Devices & Services > Add Integration and search for Bermuda BLE Trilateration.

    Note: The integration may autodetect if nearby Bluetooth devices are already visible to Home Assistant.

  3. Install Bermuda BLE Trilateration

    main

    To install the Bermuda BLE Trilateration component in Home Assistant, follow these steps:

    1. Click install (via your preferred package manager, e.g., HACS).
    2. In the Home Assistant UI, navigate to Configuration -> Integrations.
    3. Click the + (Add Integration) button.
    4. Search for "Bermuda BLE Trilateration" and select it to complete the setup.
  4. Configure tracked devices in Bermuda

    main

    After installation, you must specify which Bluetooth devices you want to track:

    1. Navigate to Settings > Devices & Services.
    2. Find the Bermuda BLE Trilateration integration.
    3. Click the CONFIGURE button.
    4. In the configuration dialog, use the field at the bottom to enter or list the Bluetooth devices you want to track. Choosing a device will add it to the configured list and trigger the creation of sensor entities for that device.
  5. Install Bermuda manually

    main

    If you prefer not to use HACS, you can install Bermuda manually:

    1. Locate your Home Assistant configuration directory (where configuration.yaml resides).
    2. Create a custom_components directory if it does not exist.
    3. Inside custom_components, create a folder named bermuda.
    4. Download all files from the custom_components/bermuda/ directory in the Bermuda repository.
    5. Place those files into your local custom_components/bermuda/ folder.
    6. Restart Home Assistant.
    7. In the Home Assistant UI, navigate to Configuration > Integrations, click the "+" icon, and search for Bermuda BLE Trilateration.
  6. Use the `bermuda.dump_devices` service

    main

    The bermuda.dump_devices service provides a full JSON/YAML dump of the internal data structures used to track and calculate device states. This is useful for troubleshooting or creating custom template sensors.

    Parameters

    • addresses: (Optional) A list of MAC addresses or iBeacon UUIDs to filter the results, returning only data relevant to those specific devices.

    Warning: The structure of the returned data is intended for internal use and may change in future releases without being flagged as a breaking change. Use it at your own risk for custom templates.

  7. Overview of Bermuda BLE Trilateration

    main

    Bermuda is a Home Assistant integration designed to track Bluetooth Low Energy (BLE) devices by Area (Room) within a house. It leverages Home Assistant's Bluetooth backend to provide room-level presence and distance estimation.

    Key Features

    • Area-based tracking: Determines which room a device is in.
    • Sensor Creation: Automatically creates sensors for Area and Distance for selected devices.
    • Device Tracker Entities: Creates device_tracker entities that can be linked to Home Assistant
  8. Supported Home Assistant Platforms

    main

    Bermuda BLE Trilateration exposes data and controls through the following Home Assistant platforms:

    • binary_sensor: Used to show a True or False state.
    • sensor: Used to display information retrieved from the API.
    • switch: Used to toggle a state between True or False.