Bluetooth Dongle (added) how to scan for devices?

TL;DR - Supported BTLE devices with new-stye integrations are in GitHub with an explanation and plans in HACS

Basically, bdraco (J. Nick Koston) has created a set of BTLE foundations making it easier to create integrations for individual BTLE devices/ brands/ types (e.g. Bleak client + DBUS integration + BLE parser, etc).

Originally, he had a Passive BLE Monitor integration which lists lots of devices and can be installed from HACS. The current work is to create individual integrations for different devices using the new BTLE foundations.

The BLE Monitor docs hopefully better explain the list of devices that WERE supported, and shows the work-in-progress creating new integrations.

UPDATE: HASS 2022.11 includes more BTLE integrations

This process was originally written using 2022.08, before developers had started to add support for BTLE devices. 2022.11 now includes the Oral-B integration so several toothbrush devices are now supported without any set-up needed - detection is automatic.

These instructions may still be useful for contributors to gather and debug BTLE manufacturer_data to allow new devices to be supported with additional work from developers. :hammer_and_wrench: :mage:t2:

Sniffing BTLE with the new foundations - ADVANCED

I tried installing the Passive BLE Monitor from HACS, but removed it and instead used bdraco’s live demo on the 2022.08 video as a guide to change the new Bluetooth component log level.

  • Add a line into configuration.yaml to get access to the Logger Service:
# Get access to logger.set_level service following bdraco live demo
# https://youtu.be/m9gKFH8WlzY?t=3297
logger:
  default: warn
  • Restart HASS
  • Set Bluetooth logging back to debug
    • Developer Tools → Services → logger → YAML (change from warn to debug)
service: logger.set_level
data:
  homeassistant.components.bluetooth: debug
  • Terminal tail -f /root/config/home-assistant/.log
  • Watch for devices in the log, noting addresses and data
  • Set the logging back to warn to not fill up the uSD
    • Developer Tools → Services → logger YAML (change from back to warn)
service: logger.set_level
data:
  homeassistant.components.bluetooth: warn

By doing this, I was able to see my Oral-B toothbrush, which for no useful purpose has an App and broadcasts via BTLE:

2022-08-13 16:30:02.239 DEBUG (MainThread) [homeassistant.components.bluetooth] Device detected: DE:AD:BE:EF:00:00 with advertisement_data: AdvertisementData(local_name='Oral-B Toothbrush', manufacturer_data={220: b'\x03V\x05\x02 \x00\x0e\x04\x01.\x04'}) matched domains: set()

Why? Do you really need to ask? :slight_smile: :hammer_and_wrench: :mage:t2:

Kudos to Nick / bdraco for this work (and performing a live demo so I could follow his lead).

UPDATE: Release 2022.11 now includes the Oral-B integration which installs automatically when a supported device is detected.

2 Likes