home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.31k stars 30.62k forks source link

Could not connect to BTLE device if the bluetooth integration fired up `AdvertisementData` after `bleak.connect` #78576

Closed IATkachenko closed 2 years ago

IATkachenko commented 2 years ago

The problem

Calling of BleakClientBlueZDBus.connect() failed if the bluetooth integration fired AdvertisementData event while connecting.

My custom integration is using connect-communicate-disconnect method to communicate with BTLE device. All works fine in 2022.7, after migration to bleak.

Could you have a look?

What version of Home Assistant Core has the issue?

core-2022.9.4

What was the last working version of Home Assistant Core?

core-2022.9.4

What type of installation are you running?

Home Assistant Container

Integration causing the issue

bluetooth

Link to integration documentation on our website

https://www.home-assistant.io/integrations/bluetooth/

Diagnostics information

No response

Example YAML snippet

logger:
  default: warning
  logs:
    bleak: debug
    bleak.backends.bluezdbus.manager: info
    homeassistant.components.bluetooth: debug

Anything in the logs that might be useful for us?

Normal connection log

2022-09-16 01:49:18.892 DEBUG (MainThread) [tion_btle.tion] Connecting. self.connection_status='disc'.
2022-09-16 01:49:18.893 DEBUG (MainThread) [tion_btle.tion] Trying 0/1: _try_connect(args=(<tion_btle.s3.TionS3 object at 0xad4c6820>,),kwargs={})
2022-09-16 01:49:18.893 DEBUG (MainThread) [bleak.backends.bluezdbus.client] Connecting to device @ FF:FF:FF:FF:FF:FF
2022-09-16 01:49:19.165 DEBUG (MainThread) [tion_btle.tion] Enabling notification. self.connection_status='connected'
2022-09-16 01:49:20.472 DEBUG (MainThread) [tion_btle.tion] _enable_notifications done
2022-09-16 01:49:20.473 DEBUG (MainThread) [tion_btle.tion] _connect done. self.connection_status='connected'.
2022-09-16 01:49:20.473 DEBUG (MainThread) [tion_btle.tion] Trying 0/3: _try_write(args=(<tion_btle.s3.TionS3 object at 0xad4c6820>,),kwargs={'request': bytearray(b'=\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00Z')})
2022-09-16 01:49:20.473 DEBUG (MainThread) [tion_btle.tion] Writing 3d0100000000000000000000000000000000005a to 6e400002-b5a3-f393-e0a9-e50e24dcca9e, self.connection_status='connected'

Failed log

2022-09-16 01:50:28.002 DEBUG (MainThread) [tion_btle.tion] Connecting. self.connection_status='disc'.
2022-09-16 01:50:28.002 DEBUG (MainThread) [tion_btle.tion] Trying 0/1: _try_connect(args=(<tion_btle.s3.TionS3 object at 0xad4c6820>,),kwargs={})

2022-09-16 01:50:28.003 DEBUG (MainThread) [bleak.backends.bluezdbus.client] Connecting to device @ FF:FF:FF:FF:FF:FF
2022-09-16 01:50:28.160 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -77
2022-09-16 01:50:28.161 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-77, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=618824.358173268), _change=<BluetoothChange.ADVERTISEMENT: 1>
2022-09-16 01:50:28.276 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -77
2022-09-16 01:50:28.277 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-77, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=618824.474430653), _change=<BluetoothChange.ADVERTISEMENT: 1>
2022-09-16 01:50:29.680 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -77
2022-09-16 01:50:29.681 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-77, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=618825.87836292), _change=<BluetoothChange.ADVERTISEMENT: 1>
2022-09-16 01:50:29.682 DEBUG (MainThread) [tion_btle.tion] Enabling notification. self.connection_status='disc'
2022-09-16 01:50:29.683 WARNING (MainThread) [tion_btle.tion] Got exception Not connected while enabling notifications!
2022-09-16 01:50:29.689 DEBUG (MainThread) [tion_btle.tion] Disconnecting. self.connection_status='disc'.
2022-09-16 01:50:29.689 DEBUG (MainThread) [tion_btle.tion] _disconnect done. self.connection_status='disc'
2022-09-16 01:50:29.689 CRITICAL (MainThread) [custom_components.ha_tion_btle] response={}, e=BleakError('Not connected')
2022-09-16 01:50:29.693 ERROR (MainThread) [custom_components.ha_tion_btle] Unexpected error fetching Tion Breezer data: Not connected
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/ha_tion_btle/__init__.py", line 123, in async_update_state
    raise e
  File "/config/custom_components/ha_tion_btle/__init__.py", line 113, in async_update_state
    response = await self.__tion.get()
  File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 208, in get
    await self.get_state_from_breezer()
  File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 188, in get_state_from_breezer
    await self.connect()
  File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 505, in connect
    await self._connect()
  File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 308, in _connect
    await self._enable_notifications()
  File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 337, in _enable_notifications
    raise e
  File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 334, in _enable_notifications
    await self._btle.start_notify(self.uuid_notify, self._delegation.handleNotification)
  File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 805, in start_notify
    raise BleakError("Not connected")
bleak.exc.BleakError: Not connected
2022-09-16 01:50:29.704 DEBUG (MainThread) [custom_components.ha_tion_btle] Finished fetching Tion Breezer data in 1.702 seconds (success: False)

Additional information

Integration https://github.com/TionAPI/HA-tion Module https://github.com/TionAPI/tion_python Essential parts of code, according to dev documentation

async def async_setup_entry(hass, config_entry: ConfigEntry):
...
instance = TionInstance(hass, config_entry)
    hass.data[DOMAIN][config_entry.unique_id] = instance
    config_entry.async_on_unload(
        bluetooth.async_register_callback(
            hass=hass,
            callback=instance.update_btle_device,
            match_dict=BluetoothCallbackMatcher(address=instance.config[CONF_MAC], connectable=True),
            mode=bluetooth.BluetoothScanningMode.ACTIVE,
        )
    )
...

class TionInstance(DataUpdateCoordinator):
    def __init__(self, hass: HomeAssistant, config_entry: ConfigEntry):
...
        btle_device = bluetooth.async_ble_device_from_address(hass, self.config[CONF_MAC], connectable=True)
        self.__tion: Tion = self.getTion(self.model, btle_device) # pass btle device to module
...
    @callback
    def update_btle_device(
            self,
            service_info: bluetooth.BluetoothServiceInfoBleak,
            _change: bluetooth.BluetoothChange
    ) -> None:
        _LOGGER.info(f"update_btle_device called with {service_info=}, {_change=}")
### have tried two versions: sending new device to module and just logging with same result.
        if service_info.device is not None:
            self.__tion.update_btle_device(service_info.device) # update btle device in module
probot-home-assistant[bot] commented 2 years ago

bluetooth documentation bluetooth source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (bluetooth) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

bdraco commented 2 years ago

What do the debug logs for bleak show?

IATkachenko commented 2 years ago

@bdraco, hello.

With my logging settings bleak show just:

2022-09-16 01:50:28.003 DEBUG (MainThread) [bleak.backends.bluezdbus.client] Connecting to device @ FF:FF:FF:FF:FF:FF
...
<a bit later> DEBUG (MainThread) [bleak.backends.bluezdbus.client] Device disconnected

in home-assistant.log and nothing useful.

I'll switch bleak.backends.bluezdbus.manager to debug too and will try to get more debug logging...

bdraco commented 2 years ago

Will probably need a wire shark/tcpdump to see what's going on

IATkachenko commented 2 years ago

OK, will collect this data too.

Logs will be available in the evening, dumps a bit later: I'm not a professional with Bluetooth debugging, but have enough skills to dig it.

Thank you for your help.

IATkachenko commented 2 years ago

@bdraco, hello,

bleak and bluetooth integration debug log for version with updating blte device: ``` 20:05:56.277 DEBUG (MainThread) [homeassistant.components.bluetooth.scanner] Initializing bluetooth scanner with {'scanning_mode': 'active', 'adapter': 'hci0'} 20:05:56.278 DEBUG (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (5C:F3:70:95:BF:C8): Starting bluetooth discovery attempt: (1/3) 20:05:57.373 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] initial properties: {'/org/bluez': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.AgentManager1': {}, 'org.bluez.ProfileManager1': {}, 'org.bluez.HealthManager1': {}}, '/org/bluez/hci0': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.Adapter1': {'Address': '5C:F3:70:95:BF:C8', 'AddressType': 'public', 'Name': 'home.madideas.ru', 'Alias': 'home.madideas.ru', 'Class': 0, 'Powered': True, 'Discoverable': False, 'DiscoverableTimeout': 180, 'Pairable': False, 'PairableTimeout': 0, 'Discovering': False, 'UUIDs': ['00001801-0000-1000-8000-00805f9b34fb', '00001800-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '0000180a-0000-1000-8000-00805f9b34fb'], 'Modalias': 'usb:v1D6Bp0246d0537', 'Roles': ['central', 'peripheral']}, 'org.freedesktop.DBus.Properties': {}, 'org.bluez.GattManager1': {}, 'org.bluez.LEAdvertisingManager1': {'ActiveInstances': 0, 'SupportedInstances': 5, 'SupportedIncludes': ['tx-power', 'appearance', 'local-name']}, 'org.bluez.Media1': {}, 'org.bluez.NetworkServer1': {}}, '/org/bluez/hci0/dev_54_A0_20_C6_71_99': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.Device1': {'Address': '54:A0:20:C6:71:99', 'AddressType': 'random', 'Alias': '54-A0-20-C6-71-99', 'Paired': False, 'Trusted': False, 'Blocked': False, 'LegacyPairing': False, 'Connected': False, 'UUIDs': [], 'Adapter': '/org/bluez/hci0', 'ManufacturerData': {76: bytearray(b'\x10\x05<\x18\xde\x139')}, 'ServicesResolved': False}, 'org.freedesktop.DBus.Properties': {}}, '/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.Device1': {'Address': 'FF:FF:FF:FF:FF:FF', 'AddressType': 'random', 'Name': 'Tion Breezer 3S', 'Alias': 'Tion Breezer 3S', 'Paired': False, 'Trusted': False, 'Blocked': False, 'LegacyPairing': False, 'Connected': False, 'UUIDs': ['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], 'Adapter': '/org/bluez/hci0', 'ServicesResolved': False}, 'org.freedesktop.DBus.Properties': {}}, '/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF/service0009': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.GattService1': {'UUID': '6e400001-b5a3-f393-e0a9-e50e24dcca9e', 'Device': '/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF', 'Primary': True, 'Includes': []}, 'org.freedesktop.DBus.Properties': {}}, '/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF/service0009/char000d': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.GattCharacteristic1': {'UUID': '6e400002-b5a3-f393-e0a9-e50e24dcca9e', 'Service': '/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF/service0009', 'Value': bytearray(b''), 'Flags': ['write-without-response', 'write'], 'WriteAcquired': False}, 'org.freedesktop.DBus.Properties': {}}, '/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF/service0009/char000a': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.GattCharacteristic1': {'UUID': '6e400003-b5a3-f393-e0a9-e50e24dcca9e', 'Service': '/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF/service0009', 'Value': bytearray(b''), 'Notifying': False, 'Flags': ['notify'], 'NotifyAcquired': False}, 'org.freedesktop.DBus.Properties': {}}, '/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF/service0009/char000a/desc000c': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.GattDescriptor1': {'UUID': '00002902-0000-1000-8000-00805f9b34fb', 'Characteristic': '/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF/service0009/char000a', 'Value': bytearray(b'')}, 'org.freedesktop.DBus.Properties': {}}, '/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF/service0008': {'org.freedesktop.DBus.Introspectable': {}, 'org.bluez.GattService1': {'UUID': '00001801-0000-1000-8000-00805f9b34fb', 'Device': '/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF', 'Primary': True, 'Includes': []}, 'org.freedesktop.DBus.Properties': {}}} 20:05:57.395 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0): ['org.bluez.Adapter1', {'Discovering': }, []] 20:05:58.134 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:05:58.135 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -78 ... 20:06:24.595 INFO (MainThread) [custom_components.ha_tion_btle] Tion instance update started 20:06:24.595 DEBUG (MainThread) [tion_btle.tion] Connecting. self.connection_status='disc'. 20:06:24.596 DEBUG (MainThread) [tion_btle.tion] Trying 0/1: _try_connect(args=(,),kwargs={}) 20:06:24.596 DEBUG (MainThread) [bleak.backends.bluezdbus.client] Connecting to device @ FF:FF:FF:FF:FF:FF 20:06:24.945 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:24.946 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -76 20:06:24.947 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-76, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91620.666966193), _change= 20:06:25.092 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:25.093 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -79 20:06:25.093 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-79, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91620.813417106), _change= 20:06:26.157 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:26.158 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -79 20:06:26.159 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-79, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91621.878911248), _change= 20:06:26.160 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:26.160 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -79 20:06:26.161 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-79, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91621.881223891), _change= 20:06:26.163 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_8C_5A_F8_EC_C4_18): ['org.bluez.Device1', {'RSSI': }, []] 20:06:26.164 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: 8C:5A:F8:EC:C4:18 AdvertisementData(service_uuids=['cbbfe0e2-f7f3-4206-84e0-84cbb3d09dfc']) connectable: True match: set() rssi: -85 20:06:26.166 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:26.166 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -80 20:06:26.167 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-80, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91621.88727081), _change= 20:06:26.170 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:26.171 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -76 20:06:26.172 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-76, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91621.891712449), _change= 20:06:26.668 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:26.669 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -80 20:06:26.670 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-80, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91622.389904748), _change= 20:06:26.671 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:26.671 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -79 20:06:26.672 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-79, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91622.392165021), _change= 20:06:26.673 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_54_A0_20_C6_71_99): ['org.bluez.Device1', {'RSSI': }, []] 20:06:26.673 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: 54:A0:20:C6:71:99 AdvertisementData(manufacturer_data={76: b'\x10\x05<\x18\xde\x139'}, tx_power=7) connectable: True match: set() rssi: -83 20:06:26.676 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:26.677 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -81 20:06:26.678 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-81, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91622.398106533), _change= 20:06:27.652 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:27.653 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -79 20:06:27.654 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-79, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91623.373533551), _change= 20:06:27.655 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_54_48_E6_D3_8E_CB): ['org.bluez.Device1', {'RSSI': }, []] 20:06:27.655 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: 54:48:E6:D3:8E:CB AdvertisementData(manufacturer_data={911: b'\n\x10\xbe\x00\x00\xc9\x8e\xd3\xe6HT\x81'}) connectable: True match: set() rssi: -85 20:06:27.656 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:27.657 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -80 20:06:27.659 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-80, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91623.377942302), _change= 20:06:27.661 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_54_A0_20_C6_71_99): ['org.bluez.Device1', {'RSSI': }, []] 20:06:27.664 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: 54:A0:20:C6:71:99 AdvertisementData(manufacturer_data={76: b'\x10\x05<\x18\xde\x139'}, tx_power=7) connectable: True match: set() rssi: -82 20:06:27.665 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_E0_CD_B7_0D_5F_E1): ['org.bluez.Device1', {'RSSI': }, []] 20:06:27.666 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: E0:CD:B7:0D:5F:E1 AdvertisementData(local_name='SMI-X5', manufacturer_data={21845: b'soocarex5\xe0\xcd\xb7\r_\xe1'}, service_data={'0000fe95-0000-1000-8000-00805f9b34fb': b'10\x9c\x03\x01\xe1_\r\xb7\xcd\xe0\t'}, service_uuids=['0000180a-0000-1000-8000-00805f9b34fb', '00000001-0000-1000-8000-00805f9b34fb']) connectable: True match: set() rssi: -83 20:06:27.667 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:27.668 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -76 20:06:27.668 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-76, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91623.38854484), _change= 20:06:27.669 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:27.671 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -81 20:06:27.671 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-81, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91623.39145781), _change= 20:06:27.736 DEBUG (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (5C:F3:70:95:BF:C8): Scanner watchdog time_since_last_detection: 0.0650797540001804 20:06:28.275 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'RSSI': }, []] 20:06:28.276 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -77 20:06:28.277 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-77, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91623.99697439), _change= 20:06:28.278 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'Connected': }, []] 20:06:28.283 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -77 20:06:28.284 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-77, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91624.00338786), _change= 20:06:28.908 DEBUG (MainThread) [bleak.backends.bluezdbus.manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF): ['org.bluez.Device1', {'ServicesResolved': }, []] 20:06:28.910 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0: FF:FF:FF:FF:FF:FF AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']) connectable: True match: set() rssi: -77 20:06:28.911 INFO (MainThread) [custom_components.ha_tion_btle] update_btle_device called with service_info=BluetoothServiceInfoBleak(name='Tion Breezer 3S', address='FF:FF:FF:FF:FF:FF', rssi=-77, manufacturer_data={}, service_data={}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e'], source='hci0', device=FF:FF:FF:FF:FF:FF: Tion Breezer 3S, advertisement=AdvertisementData(local_name='Tion Breezer 3S', service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '6e400001-b5a3-f393-e0a9-e50e24dcca9e']), connectable=True, time=91624.630537605), _change= 20:06:29.026 DEBUG (MainThread) [tion_btle.tion] Enabling notification. self.connection_status='disc' 20:06:29.027 WARNING (MainThread) [tion_btle.tion] Got exception Not connected while enabling notifications! 20:06:29.037 DEBUG (MainThread) [tion_btle.tion] Disconnecting. self.connection_status='disc'. 20:06:29.038 DEBUG (MainThread) [tion_btle.tion] _disconnect done. self.connection_status='disc' 20:06:29.038 CRITICAL (MainThread) [custom_components.ha_tion_btle] response={}, e=BleakError('Not connected') 20:06:29.044 ERROR (MainThread) [custom_components.ha_tion_btle] Unexpected error fetching Tion Breezer data: Not connected Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data return await self.update_method() File "/config/custom_components/ha_tion_btle/__init__.py", line 123, in async_update_state raise e File "/config/custom_components/ha_tion_btle/__init__.py", line 113, in async_update_state response = await self.__tion.get() File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 208, in get await self.get_state_from_breezer() File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 188, in get_state_from_breezer await self.connect() File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 505, in connect await self._connect() File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 308, in _connect await self._enable_notifications() File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 337, in _enable_notifications raise e File "/usr/local/lib/python3.10/site-packages/tion_btle/tion.py", line 334, in _enable_notifications await self._btle.start_notify(self.uuid_notify, self._delegation.handleNotification) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 805, in start_notify raise BleakError("Not connected") bleak.exc.BleakError: Not connected 20:06:29.060 DEBUG (MainThread) [custom_components.ha_tion_btle] Finished fetching Tion Breezer data in 4.465 seconds (success: False) ```

Could not reproduce now with disabled updater: connection is succseed, but response collecting is fail... Will try later...

IATkachenko commented 2 years ago

@bdraco, it looks like btle instance updating issue: without actual updating latest HA version works fine for a last days... sorry for disturbance.