Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devices are no longer removed from .discovered_devices on the bluez scanner when InterfacesRemoved is fired #942

Closed
bdraco opened this issue Aug 12, 2022 · 1 comment · Fixed by #967 or #969
Labels
Backend: BlueZ Issues and PRs relating to the BlueZ backend bug Something isn't working

Comments

@bdraco
Copy link
Contributor

bdraco commented Aug 12, 2022

In 0.14.3, the devices would get removed from self._devices so when BleakScannerBlueZDBus.discovered_devices was enumerated we knew they were now gone.

Since the switch to the global bluez manager in 0.15, they now stay in BleakScannerBlueZDBus.discovered_devices forever since the scanner never gets a removal callback.

@dlech dlech added bug Something isn't working Backend: BlueZ Issues and PRs relating to the BlueZ backend labels Aug 20, 2022
bdraco added a commit to bdraco/home-assistant that referenced this issue Aug 23, 2022
- We now check the time of each service info in the history
  since bleak currently has a change that prevents them from
  disappearing

  See hbldh/bleak#942
@bdraco
Copy link
Contributor Author

bdraco commented Aug 23, 2022

It would actually be better to get a callback when a device is removed so we know to mark it unavailable right away. Then we won't be relying on the implementation details of discovered_devices

dlech added a commit that referenced this issue Aug 29, 2022
…d_devices

This fixes a regression introduced in v0.15 where device removed from
BlueZ while scanning were no longer removed from this list of discovered
devices. This caused the `discovered_devices` property to return
devices that could no longer be connected to by BlueZ since they were
removed.

Fixes #942.
dlech added a commit that referenced this issue Aug 30, 2022
…d_devices

This fixes a regression introduced in v0.15 where device removed from
BlueZ while scanning were no longer removed from this list of discovered
devices. This caused the `discovered_devices` property to return
devices that could no longer be connected to by BlueZ since they were
removed.

Fixes #942.
@dlech dlech mentioned this issue Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend: BlueZ Issues and PRs relating to the BlueZ backend bug Something isn't working
Projects
None yet
2 participants