Commit graph

46 commits

Author SHA1 Message Date
J. Nick Koston
804e4ab989
Prefilter noisy apple devices from bluetooth () 2022-09-04 20:57:40 -04:00
J. Nick Koston
40e8979951
Add bluetooth api to get the count of connectable and non-connectable scanners () 2022-08-29 10:21:30 -04:00
J. Nick Koston
a28aeeeca7
Hide bluetooth passive option if its not available on the host system ()
* Hide bluetooth passive option if its not available

- We now have a way to determine in advance if passive
  scanning is supported by BlueZ

* drop string
2022-08-27 19:18:54 -04:00
J. Nick Koston
8e88e039f7
Add diagnostics to bluetooth () 2022-08-27 16:41:49 -05:00
J. Nick Koston
61d5ed1dcf
Index bluetooth matchers to resolve performance concerns with many adapters/remotes () 2022-08-26 23:07:51 -04:00
J. Nick Koston
109d5c7084
Fix bluetooth discovery when advertisement format changes () 2022-08-24 17:36:21 -05:00
J. Nick Koston
d1486d04d9
Add support for bleak passive scanning on linux () 2022-08-24 12:17:28 -05:00
J. Nick Koston
c76dec138a
Discover new bluetooth adapters when they are plugged in () 2022-08-22 15:45:08 -10:00
J. Nick Koston
3938015c93
Add support for scanners that do not provide connectable devices () 2022-08-22 14:02:26 -04:00
J. Nick Koston
f3e432c9c7
Reduce bluetooth logging noise when an adapter is recovered () 2022-08-21 12:03:14 -10:00
J. Nick Koston
ced8278e32
Auto recover when the Bluetooth adapter stops responding () 2022-08-20 11:58:14 -10:00
J. Nick Koston
cd59d3ab81
Add support for multiple Bluetooth adapters () 2022-08-18 21:41:07 -04:00
J. Nick Koston
071cae2c0b
Implement auto switching when there are multiple bluetooth scanners () 2022-08-17 12:38:04 -10:00
J. Nick Koston
7bf13167d8
Prevent bluetooth scanner from being shutdown by BleakClient not using BLEDevice () 2022-08-17 11:42:12 -10:00
J. Nick Koston
3bcc274dfa
Rework bluetooth to support scans from multiple sources () 2022-08-17 10:51:56 -10:00
J. Nick Koston
6f3cdb6db1
Reorganize bluetooth integration to prepare for remote and multi-adapter support () 2022-08-16 14:52:53 -10:00
J. Nick Koston
4890785299
Fix bluetooth callback registration not surviving a reload () 2022-08-15 10:19:37 -10:00
Jc2k
0639681991
Add new Bluetooth coordinator helper for polling mostly passive devices () 2022-08-10 18:56:34 +01:00
Jc2k
7d427ddbd4
Allow parsing to happen in PassiveBluetoothProcessorCoordinator () 2022-08-09 06:36:39 +01:00
J. Nick Koston
1fe44d0997
Ensure bluetooth recovers if Dbus gets restarted () 2022-08-07 11:03:56 -04:00
Joakim Plate
cdde4f9925
Add bluetooth API to allow rediscovery of address ()
* Add API to allow rediscovery of domains

* Switch to clearing per device

* Drop unneded change
2022-08-05 14:49:34 +02:00
J. Nick Koston
5d7cef6416
Fix race in bluetooth async_process_advertisements () 2022-08-04 17:58:15 +02:00
J. Nick Koston
bf931f1225
Handle additional bluetooth start exceptions () 2022-08-02 13:46:43 -10:00
J. Nick Koston
80a9659524
Update to bleak 0.15 () 2022-07-29 17:53:33 -07:00
J. Nick Koston
702cef3fc7
Add startup timeout to bluetooth ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-07-28 11:14:13 -10:00
Jc2k
10356b9379
Fix Xiaomi BLE not detecting encryption for some devices () 2022-07-28 19:10:37 +01:00
J. Nick Koston
1e85ddabfd
Fix startup race in BLE integrations () 2022-07-26 09:29:23 -10:00
J. Nick Koston
a813cf987b
Add bluetooth options flow to pick the adapter () 2022-07-25 16:52:35 +02:00
J. Nick Koston
22ca28b93d
Ensure bluetooth can be reloaded when hot plugging a bluetooth adapter () 2022-07-24 19:23:23 -05:00
J. Nick Koston
bbb9443b00
Fix bluetooth integration matching with service_data_uuids and service_uuids ()
* Fix bluetooth integration with service_data and service_uuids

We would only dispatch a new flow when the address was seen for
the first time or the manufacturer_data appeared in a followup
advertisement. Its also possible for the service_data and
service_uuids to appear in a followup advertisement so we
need to track these as well

* improve logging to avoid overly large messages

* improve logging to avoid overly large messages

* adjust

* adjsut

* split

* coverage

* coverage

* coverage

* coverage

* fix matcher

* more coverage

* more coverage

* more coverage

* revert switchbot changes and move to seperate PR
2022-07-24 16:39:53 -05:00
J. Nick Koston
da131beced
Split bluetooth coordinator into two classes () 2022-07-23 19:33:47 -05:00
J. Nick Koston
c5afaa2e6a
Refactor PassiveBluetoothDataUpdateCoordinator to support multiple platforms () 2022-07-23 13:03:01 -05:00
J. Nick Koston
240bbfa080
Retry later if bluetooth fails to start () 2022-07-23 12:00:34 -05:00
Franck Nijhof
8d6247446b
Automatically set up Bluetooth during onboarding () 2022-07-23 10:47:12 -05:00
J. Nick Koston
326e05dcf1
Fix async_get_scanner to return the correct bluetooth scanner () 2022-07-22 18:12:08 -05:00
J. Nick Koston
38bccadaa6
Add support for setting up and removing bluetooth in the UI ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-07-22 13:19:53 -05:00
J. Nick Koston
90ca3fe350
Improve availability tracking and coordinator setup in bluetooth () 2022-07-21 19:16:45 -05:00
J. Nick Koston
f3c4bf571b
Raise on bad update data instead of log in PassiveBluetoothDataUpdateCoordinator () 2022-07-21 09:44:53 -05:00
J. Nick Koston
6da25c733e
Add coordinator and entity for passive bluetooth devices ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-07-20 15:54:37 -05:00
J. Nick Koston
41e4b38c3a
Add device and advertisement to BluetoothServiceInfoBleak () 2022-07-18 17:58:08 -05:00
J. Nick Koston
91f2550bc3
Change manufacturer_data_first_byte to manufacturer_data_start () 2022-07-17 17:25:45 -05:00
J. Nick Koston
a95c2c7850
Avoid throwing on unsupported bleak client filter ()
* Avoid throwing on unsupported bleak client filter

* Avoid throwing on unsupported bleak client filter
2022-07-17 16:13:12 -05:00
J. Nick Koston
ecc219fbc1
Include the source in the bluetooth service info () 2022-07-16 11:02:08 -05:00
J. Nick Koston
a3c1926da5
Add mock_bluetooth fixture () 2022-07-14 07:40:17 -05:00
J. Nick Koston
c2fefe03b2
Add support for subscribing to bluetooth callbacks by address () 2022-07-11 08:14:00 -07:00
J. Nick Koston
a697672944
Add bluetooth integration ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-07-08 18:55:31 -05:00