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

release v0.16.0 #969

Merged
merged 38 commits into from
Aug 31, 2022
Merged

release v0.16.0 #969

merged 38 commits into from
Aug 31, 2022

Commits on Jul 29, 2022

  1. version bump for develop

    dlech committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    92b20d9 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2022

  1. docs/troubleshooting: fix windows BTP link

    old link was getting 404 error
    dlech committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    22d008f View commit details
    Browse the repository at this point in the history
  2. Merge pull request #914 from hbldh/win-btp-link

    docs/troubleshooting: fix windows BTP link
    dlech authored Aug 1, 2022
    Configuration menu
    Copy the full SHA
    3d67036 View commit details
    Browse the repository at this point in the history
  3. Make callback logging lazy

    Fixes logging-format-interpolation (W1202)
    bdraco committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    8cc2222 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #912 from bdraco/lazy_logger

    Make callback logging lazy
    dlech authored Aug 1, 2022
    Configuration menu
    Copy the full SHA
    742b63d View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2022

  1. Fix disconnect in the global BlueZ manager

    ```
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup
        result = await component.async_setup_entry(hass, self)
      File "/usr/src/homeassistant/homeassistant/components/bluetooth/__init__.py", line 253, in async_setup_entry
        await manager.async_start(
      File "/usr/src/homeassistant/homeassistant/components/bluetooth/__init__.py", line 343, in async_start
        await self.scanner.start()  # type: ignore[no-untyped-call]
      File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/scanner.py", line 128, in start
        manager = await get_global_bluez_manager()
      File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 808, in get_global_bluez_manager
        await instance.async_init()
      File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 344, in async_init
        await self._bus.disconnect()
    TypeError: object NoneType can't be used in 'await' expression
    
    ```
    bdraco committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    6b70d94 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dfae35b View commit details
    Browse the repository at this point in the history
  3. Handle the race in the BlueZ D-Bus backend where the device disconnec…

    …ts during the connection process
    bdraco committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    7e334f6 View commit details
    Browse the repository at this point in the history
  4. Avoid reusing the MessageBus in the manager

    When the dbus socket gets disconnected from dbus, we cannot
    reuse the connection because dbus-next finalize will remove
    the underlying fds
    
    Fixes
    ```
    2022-08-02 09:29:00.722 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Bluetooth for bluetooth
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup
        result = await component.async_setup_entry(hass, self)
      File "/usr/src/homeassistant/homeassistant/components/bluetooth/__init__.py", line 253, in async_setup_entry
        await manager.async_start(
      File "/usr/src/homeassistant/homeassistant/components/bluetooth/__init__.py", line 343, in async_start
        await self.scanner.start()  # type: ignore[no-untyped-call]
      File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/scanner.py", line 128, in start
        manager = await get_global_bluez_manager()
      File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 808, in get_global_bluez_manager
        await instance.async_init()
      File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 290, in async_init
        await self._bus.connect()
      File "/usr/local/lib/python3.10/site-packages/dbus_next/aio/message_bus.py", line 149, in connect
        await self._authenticate()
      File "/usr/local/lib/python3.10/site-packages/dbus_next/aio/message_bus.py", line 380, in _authenticate
        await self._loop.sock_sendall(self._sock, b0)
      File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 441, in sock_sendall
        n = sock.send(data)
    BrokenPipeError: [Errno 32] Broken pipe
    ```
    bdraco committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    c581d5e View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2022

  1. Merge pull request #916 from bdraco/async_timeout

    Switch to using async_timeout for timeouts
    dlech authored Aug 3, 2022
    Configuration menu
    Copy the full SHA
    90aed10 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #918 from bdraco/disconnect_not_coro

    Fix disconnect in the global BlueZ manager
    dlech authored Aug 3, 2022
    Configuration menu
    Copy the full SHA
    6395e7e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b358549 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #919 from bdraco/fix_disconnect_race

    Handle the race in the BlueZ D-Bus backend where the device disconnects during the connection process
    dlech authored Aug 3, 2022
    Configuration menu
    Copy the full SHA
    10358b3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e7db0a1 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #920 from bdraco/no_reuse_dbus_socket_manager

    Avoid reusing the MessageBus in the manager
    dlech authored Aug 3, 2022
    Configuration menu
    Copy the full SHA
    90ead61 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    88c7e6b View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2022

  1. remove explicit inheritance from object

    In Python 3, we don't need to explicitly inherit from object.
    dlech committed Aug 5, 2022
    Configuration menu
    Copy the full SHA
    9363607 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2022

  1. Configuration menu
    Copy the full SHA
    9a1f31d View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2022

  1. Merge pull request #928 from bdraco/read_gatt_char_corebluetooth_stil…

    …l_timeout
    
    Adjust default timeout for ``read_gatt_char()`` with CoreBluetooth to 20s
    dlech authored Aug 26, 2022
    Configuration menu
    Copy the full SHA
    8f7e43e View commit details
    Browse the repository at this point in the history
  2. Merge pull request #922 from hbldh/explicit-object-inheritance

    remove explicit inheritance from object
    dlech authored Aug 26, 2022
    Configuration menu
    Copy the full SHA
    8515d22 View commit details
    Browse the repository at this point in the history
  3. bluezdbus: move dbus interface dict types to defs

    This moves the D-Bus interface property dict types to the defs module.
    This will help avoid circular imports of the manager module.
    dlech committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    579d0cf View commit details
    Browse the repository at this point in the history
  4. backends/characteristic: add max_write_without_response_size property

    This adds a new max_write_without_response_size property to
    BleakGattClient that can be used to ensure data will be able to be used
    in a characteristic write without response command without causing
    an OS error.
    
    The NUS example is updated to show how to make use of this property.
    dlech committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    529583f View commit details
    Browse the repository at this point in the history
  5. remove top-level Makefile

    This is not used, so can be removed.
    dlech committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    78f15ee View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f727f4f View commit details
    Browse the repository at this point in the history
  7. backends/bluezdbus: remove first seen filter in scanner

    This filter was originally added to get the same behavior as macOS.
    However macOS has changed so we receive duplicate events even when
    filter duplicates is enabled.
    
    This allows us to get RSSI change events to allow making proper user
    interfaces that show changing RSSI while scanning devices.
    dlech committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    41f28f9 View commit details
    Browse the repository at this point in the history
  8. bluezdbus: move dbus interface dict types to defs

    This moves the D-Bus interface property dict types to the defs module.
    This will help avoid circular imports of the manager module.
    dlech committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    c1f1bb9 View commit details
    Browse the repository at this point in the history
  9. backends/bluezdbus/manager: add object lookup maps

    This adds maps to improve performance when calling get_services().
    
    Previously we had to enumerate all BlueZ D-Bus objects for each service,
    characteristic and descriptor. When there were many devices, this was
    a performance bottleneck.
    
    Instead, we can create a map of the D-Bus object tree as new interfaces
    appear, then use this map as an efficient way to find the child D-Bus
    object paths in the GATT tree.
    
    Fixes #927.
    dlech committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    3b320f0 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2022

  1. Merge pull request #966 from hbldh/bluez-get-services-performance

    Bluez: improve get services performance
    dlech authored Aug 29, 2022
    Configuration menu
    Copy the full SHA
    f343136 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #964 from hbldh/bluez-no-ignore-rssi-change

    BlueZ: don't ignore RSSI change in detection callbacks
    dlech authored Aug 29, 2022
    Configuration menu
    Copy the full SHA
    775d426 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #963 from hbldh/remove-makefile

    remove top-level Makefile
    dlech authored Aug 29, 2022
    Configuration menu
    Copy the full SHA
    dbb716f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    03370c0 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #962 from hbldh/max-write-without-response-size

    Max write without response size
    dlech authored Aug 29, 2022
    Configuration menu
    Copy the full SHA
    6901c63 View commit details
    Browse the repository at this point in the history
  6. backends/bluezdbus/client: fix not disconnecting if get_services() th…

    …rows
    
    It is possible for get_services() to raise an exception, e.g. if
    external code cancels the task. If this happens, we need to be sure
    that the device disconnects so the BlueZClient is in a consistent
    state (if the connect() method raises and exception, is is expected
    that the device will not be connected).
    
    To fix this, we can just move the call to get_services() inside of the
    existing try block that will disconnect on any exception, then reraise
    the exception.
    
    Fixes #951.
    dlech committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    b93082a View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2022

  1. backends/bluezdbus/scanner: fix removed devices included in discovere…

    …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 committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    aa27f4c View commit details
    Browse the repository at this point in the history
  2. Merge pull request #967 from hbldh/bluez-fix-device-removed-while-sca…

    …nning
    
    BlueZ: fix removed devices included in discovered_devices
    dlech authored Aug 30, 2022
    Configuration menu
    Copy the full SHA
    bdfaea1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7999b2c View commit details
    Browse the repository at this point in the history
  4. Merge pull request #968 from hbldh/bluez-fix-bad-connect-state

    BlueZ: fix not disconnecting if get_services() throws during connect
    dlech authored Aug 30, 2022
    Configuration menu
    Copy the full SHA
    77d74ed View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2022

  1. release v0.16.0

    dlech committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    357e501 View commit details
    Browse the repository at this point in the history