Commit Graph

36 Commits

Author SHA1 Message Date
J. Nick Koston
667f4b1ca8 Mark Bluetooth scanner as not scanning when watchdog timeout is reached (#100738) 2023-09-26 05:29:46 -05:00
Ville Skyttä
3094991236 Upgrade ruff to 0.0.285 (#98647) 2023-08-19 08:17:17 -04:00
Marc Mueller
a9ade1f84d Use asyncio.timeout [core] (#98447) 2023-08-15 08:36:05 -05:00
J. Nick Koston
c67a1a326f Improve chances of recovering stuck down bluetooth adapters (#96382) 2023-07-12 06:39:32 -10:00
J. Nick Koston
146a31163c Use bluetooth address instead of uuid on MacOS (#89926) 2023-03-20 12:07:41 +01:00
J. Nick Koston
94d1375be3 Avoid creating a task in the bluetooth watchdog when everything is OK (#84669) 2022-12-27 16:00:24 -10:00
J. Nick Koston
070aa714a0 Switch to a different local Bluetooth adapter when one runs out of connection slots (#84331) 2022-12-23 08:58:33 -10:00
Franck Nijhof
b0cee0bc46 String formatting and max line length - Part 1 (#84390)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-12-22 10:12:50 +01:00
J. Nick Koston
0e2ebfe5c4 Move bluetooth watchdog into the scanner base class (#83888) 2022-12-13 11:57:40 -10:00
J. Nick Koston
876258e68a Bump bluetooth-auto-recovery to 1.0.0 (#83800)
fixes https://github.com/home-assistant/core/issues/83673
2022-12-12 11:49:57 +01:00
J. Nick Koston
80a8d5443d Improve remote bluetooth scanner diagnostics and add missing test cover (#83796) 2022-12-11 21:33:30 -10:00
J. Nick Koston
9008006ac8 Restore remote discovered devices between remote scanner restarts (#83699) 2022-12-11 09:02:55 -10:00
J. Nick Koston
1ee9c0cb8d Fix bluetooth device connection failure when device is seen by dbus but not bleak (#83281) 2022-12-05 22:34:21 -05:00
J. Nick Koston
a7caa038be Accept advertisements from alternate scanners when a scanner stops scanning (#82448) 2022-11-21 21:23:07 -05:00
J. Nick Koston
7801cd96de Split bluetooth models into base_scanner and wrappers (#82291) 2022-11-20 08:44:28 -06:00
J. Nick Koston
47c66dbed4 Offload platform specific bluetooth code to bluetooth-adapters (#82196)
* Offload platform specific bluetooth code to bluetooth-adapters

* adjust

* fix some more patch targets

* more test fixes

* almost there

* may not be setup yet

* more fixes

* fixes

* fix test

* fix merge
2022-11-17 14:34:19 -05:00
J. Nick Koston
89959e7cda Reduce complexity of bluetooth scanners for local adapters (#81940)
This is a small refactor to align the bluetooth scanner class
to the same design used in the esphome scanner to pass the
callback for new service infos in the constructor.

The original thinking was that multiple callbacks would
be needed to send the service infos to different paths,
however with the creation of a central manager, this
designed turned out to not be needed and can be
simplified
2022-11-11 14:59:06 +01:00
J. Nick Koston
3184c8a526 Fix use of deprecated device.rssi in bluetooth scanner (#81690) 2022-11-07 12:06:38 +01:00
J. Nick Koston
1589c06203 Significantly reduce clock_gettime syscalls on platforms with broken vdso (#81257) 2022-10-31 09:35:08 -04:00
J. Nick Koston
03362bec1c Defer bluetooth scanner watchdog restart if one is already in progress (#80679) 2022-10-20 13:56:20 -05:00
J. Nick Koston
da14acb3b6 Speed up restart when bluetooth adapter is in a failed state (#80640) 2022-10-20 16:35:09 +02:00
J. Nick Koston
d12cbab6c4 Bump bleak to 0.19.0 (#80349) 2022-10-15 13:57:23 -04:00
J. Nick Koston
0c76e3a97e Automatically determine the advertising interval for bluetooth devices (#79669) 2022-10-14 14:39:18 -04:00
J. Nick Koston
2768b2445a Remove call to deprecated bleak register_detection_callback (#79558) 2022-10-03 21:15:09 -04:00
J. Nick Koston
75f6f9b5e2 Improve performance of Bluetooth device fallback (#79078) 2022-09-26 09:12:08 -04:00
J. Nick Koston
635c2f3738 Change bluetooth source to be the address of the adapter on Linux (#78795) 2022-09-19 20:58:18 -04:00
J. Nick Koston
18eef5da1f Restore history from bluetooth stack at startup (#78612) 2022-09-17 16:58:19 -05:00
J. Nick Koston
392548fe6e Bump bleak to 0.17.0 (#78333) 2022-09-13 14:31:34 +02:00
J. Nick Koston
8e88e039f7 Add diagnostics to bluetooth (#77393) 2022-08-27 16:41:49 -05:00
J. Nick Koston
d1486d04d9 Add support for bleak passive scanning on linux (#75542) 2022-08-24 12:17:28 -05:00
J. Nick Koston
3938015c93 Add support for scanners that do not provide connectable devices (#77132) 2022-08-22 14:02:26 -04:00
J. Nick Koston
f3e432c9c7 Reduce bluetooth logging noise when an adapter is recovered (#77109) 2022-08-21 12:03:14 -10:00
J. Nick Koston
2d0b11f18e Add a new constant for multiple bluetooth watchdog failure hits (#77081) 2022-08-20 13:41:25 -10:00
J. Nick Koston
ced8278e32 Auto recover when the Bluetooth adapter stops responding (#77043) 2022-08-20 11:58:14 -10:00
J. Nick Koston
18246bb8c8 Improve bluetooth logging when there are multiple adapters (#77007) 2022-08-20 13:22:42 -04:00
J. Nick Koston
3bcc274dfa Rework bluetooth to support scans from multiple sources (#76900) 2022-08-17 10:51:56 -10:00