Bluetooth tracker not working at all

Hi,
I have tried to configure the blutooth_tracker on my home assistant, but it isn’t finding any new device.
Home assistant 2023.5.2 is running in a python venv on a raspberry pi 4.
I have two bluetooth adapters: the default raspberry (hci1, I believe) and a USB adapter with an external antenna for longer range (hci0, I believe).

root@hass:~ # hciconfig -a hci0
hci0:	Type: Primary  Bus: USB
	BD Address: 00:1A:7D:DA:71:06  ACL MTU: 310:10  SCO MTU: 64:8
	UP RUNNING 
	RX bytes:1053280 acl:0 sco:0 events:29412 errors:0
	TX bytes:4686 acl:0 sco:0 commands:338 errors:0
	Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH HOLD SNIFF PARK 
	Link mode: SLAVE ACCEPT 
	Name: 'GC01hass #1'
	Class: 0x000000
	Service Classes: Unspecified
	Device Class: Miscellaneous, 
	HCI Version: 4.0 (0x6)  Revision: 0x22bb
	LMP Version: 4.0 (0x6)  Subversion: 0x22bb
	Manufacturer: Cambridge Silicon Radio (10)

root@hass:~ # hciconfig -a hci1
hci1:	Type: Primary  Bus: UART
	BD Address: DC:A6:32:77:A1:CB  ACL MTU: 1021:8  SCO MTU: 64:1
	UP RUNNING INQUIRY 
	RX bytes:9268570 acl:0 sco:0 events:374785 errors:0
	TX bytes:3554897 acl:0 sco:0 commands:317447 errors:0
	Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH SNIFF 
	Link mode: SLAVE ACCEPT 
	Name: 'GC01hass'
	Class: 0x000000
	Service Classes: Unspecified
	Device Class: Miscellaneous, 
	HCI Version: 5.0 (0x9)  Revision: 0x17e
	LMP Version: 5.0 (0x9)  Subversion: 0x6119
	Manufacturer: Cypress Semiconductor (305)

This is my configuration.yaml section:

bluetooth:
device_tracker:
  - platform: bluetooth_tracker
    interval_seconds: 1
    track_new_devices: yes
    request_rssi: yes
    device_id: 1

I am not sure how it is supposed to work, but in my history no bluetooth devices are found.
However, if I run a scan from ssh, I see many devices, this is the result:

root@hass:~ # bluetoothctl scan on
Discovery started
[CHG] Device A4:C1:38:7C:BC:49 RSSI: -71
[CHG] Device 5A:9D:8E:23:C5:F6 RSSI: -65
[CHG] Device 4B:B5:23:EA:A8:F7 RSSI: -63
[CHG] Device 0B:19:4F:D5:F6:D9 RSSI: -70
[CHG] Device 0B:19:4F:D5:F6:D9 RSSI: -52
[CHG] Device D3:E1:71:59:37:52 RSSI: -59
.... and so on ....

In the configuration on the web interface, I see that there are some problems in configuring one of the two adapters, I don’t know if this influences the bluetooth_tracker component:
image

So I went to check the logs, but this is all I have found concerning bluetooth_tracker:

2023-07-03 13:54:41.345 INFO (SyncWorker_4) [homeassistant.loader] Loaded bluetooth_tracker from homeassistant.components.bluetooth_tracker
2023-07-03 13:54:44.591 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.bluetooth_tracker

Could somebody help, please? I’m really stuck!

From what I understood, this is a dependency issue. The more recent versions of Home Assistant require a newer Python version, which does not (yet) work well with pybluez. The pybluez dependency in turn hasn’t had a release since December 2019.

My info comes from this issue: Blue Tooth Tracker platform issue after upgrade to 2023.6 · Issue #94189 · home-assistant/core · GitHub

There are a couple of workarounds there as well. I will try of them out this evening.

1 Like