fsaris / home-assistant-awox

AwoX mesh light integration for Home Assistant
MIT License
83 stars 23 forks source link

Can't connect to Device #72

Closed Caedael closed 1 year ago

Caedael commented 1 year ago

pairing and connect via Bluetoothctl inside the homeassistent container works and pybluez was installed via apk add.

Compose volumes and devices:

    volumes:
      - ...
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    devices:
      - /dev/rfkill:/dev/rfkill

Log:

2022-11-11 22:13:00.025 DEBUG (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] get item from queue
2022-11-11 22:13:00.154 DEBUG (MainThread) [custom_components.awox.light] entry [{'mesh_id': xxxx, 'name': 'EGLORemote', 'mac': 'xxxxx', 'model': 'ERCUm', 'manufacturer': 'Eglo', 'firmware': '2.4.4', 'hardware': '3.0', 'type': '.ble.tlmesh.sensor.rcu.'}, {'mesh_id': xxxx, 'name': 'EGLOPanel', 'mac': '::::', 'model': 'EPanel_300', 'manufacturer': 'Eglo', 'firmware': '2.2.17', 'hardware': '4.30', 'type': '.ble.tlmesh.light.switch.white.dimming.temperature.color.'}]
2022-11-11 22:13:00.155 INFO (MainThread) [custom_components.awox.awox_mesh] Registered [xxxxxx] xxxx
2022-11-11 22:13:00.155 INFO (MainThread) [custom_components.awox.light] Setup light [xxx] EGLOPanel
2022-11-11 22:13:00.848 DEBUG (MainThread) [custom_components.awox.switch] entry [{'mesh_id': xxx, 'name': 'EGLORemote', 'mac': 'xxxx', 'model': 'ERCUm', 'manufacturer': 'Eglo', 'firmware': '2.4.4', 'hardware': '3.0', 'type': '.ble.tlmesh.sensor.rcu.'}, {'mesh_id': xxxx, 'name': 'EGLOPanel', 'mac': 'xxxx', 'model': 'EPanel_300', 'manufacturer': 'Eglo', 'firmware': '2.2.17', 'hardware': '4.30', 'type': '.ble.tlmesh.light.switch.white.dimming.temperature.color.'}]
2022-11-11 22:13:09.394 DEBUG (SyncWorker_1) [custom_components.awox.awox_mesh] startup
2022-11-11 22:13:10.936 INFO (MainThread) [custom_components.awox.awox_mesh] Search for AwoX devices to find closest (best RSSI value) device
2022-11-11 22:13:12.396 INFO (MainThread) [custom_components.awox.scanner] Scanning 20 seconds for AwoX bluetooth mesh devices!
2022-11-11 22:13:32.526 INFO (SyncWorker_3) [custom_components.awox.bluetoothctl] found: {'xxxxxx': {'mac': 'xxxxx', 'name': 'xxxxx', 'rssi': None}, 'xxxx': {'mac': 'xxxx', 'name': 'xxxx', 'rssi': None}}
2022-11-11 22:13:32.528 DEBUG (MainThread) [custom_components.awox.scanner] Found devices: {}
2022-11-11 22:13:32.808 DEBUG (MainThread) [custom_components.awox.awox_mesh] Scan result: {}
2022-11-11 22:13:32.809 INFO (MainThread) [custom_components.awox.awox_mesh] [xxxxx][EGLOPanel] Device NOT found during Bluetooth scan
2022-11-11 22:13:32.809 INFO (MainThread) [custom_components.awox.awox_mesh] async_update: Request status
2022-11-11 22:13:32.809 INFO (MainThread) [custom_components.awox.awox_mesh] Queue command requestStatus {'dest': xxxx, 'withResponse': True}
2022-11-11 22:13:32.819 DEBUG (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] process 0/0 - {'command': 'requestStatus', 'params': {'dest': 65535, 'withResponse': True}, 'callback': <function AwoxMesh._async_add_command_to_queue.<locals>.command_executed at 0x7f62631088b0>, 'allow_to_fail': False}
2022-11-11 22:13:32.820 INFO (MainThread) [custom_components.awox.awox_mesh] [xxxxx][EGLOPanel] Trying to connect
2022-11-11 22:13:34.313 INFO (SyncWorker_3) [custom_components.awox.awoxmeshlight] Connecting to xxxx with timeout=15
2022-11-11 22:13:49.415 ERROR (SyncWorker_3) [custom_components.awox.awoxmeshlight] Timed out connecting to xxxx after 15 seconds.
2022-11-11 22:13:49.425 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to xxxxc after 15 seconds.
Traceback (most recent call last):
File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
with self._receiver.event("connect", timeout):
File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
next(self.gen)
File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
self.wait(event, timeout)
File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
if await self.hass.async_add_executor_job(device.connect):
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
self.btdevice = self.adapter.connect(self.mac, timeout=15)
File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to xxxx after 15 seconds.
2022-11-11 22:13:49.437 INFO (MainThread) [custom_components.awox.awox_mesh] [xxxxx][EGLOPanel] Failed to connect, trying next device [Timed out connecting to xxxxx after 15 seconds.]
2022-11-11 22:13:49.437 DEBUG (MainThread) [custom_components.awox.awox_mesh] [xxxxxx][EGLOPanel] Setting up Bluetooth connection failed, making sure Bluetooth device stops trying
2022-11-11 22:13:49.439 DEBUG (SyncWorker_2) [custom_components.awox.awoxmeshlight] force stopping ble adapter
2022-11-11 22:13:49.743 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 1

EDIT: Log after deleting db file:


2022-12-04 16:08:03.337 ERROR (SyncWorker_2) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:08:03.349 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:08:03.666 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 1
2022-12-04 16:08:06.839 ERROR (MainThread) [custom_components.awox.awox_mesh] Timeout fetching awox data
2022-12-04 16:08:20.212 ERROR (SyncWorker_4) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:08:20.215 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:08:20.523 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 2
2022-12-04 16:08:37.027 ERROR (SyncWorker_1) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:08:37.029 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:08:37.333 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 3
2022-12-04 16:08:53.885 ERROR (SyncWorker_7) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:08:53.890 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:09:10.685 ERROR (SyncWorker_4) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:09:10.691 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:09:10.998 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 1
2022-12-04 16:09:27.580 ERROR (SyncWorker_6) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:09:27.586 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:09:27.892 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 2
2022-12-04 16:09:44.416 ERROR (SyncWorker_7) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:09:44.421 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:09:44.729 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 3
2022-12-04 16:10:01.292 ERROR (SyncWorker_4) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:10:01.294 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:10:18.180 ERROR (SyncWorker_3) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:10:18.182 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:10:18.485 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 1
2022-12-04 16:10:34.997 ERROR (SyncWorker_7) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:10:34.999 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:10:35.303 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 2
2022-12-04 16:10:51.876 ERROR (SyncWorker_4) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:10:51.877 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:10:52.181 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 3
2022-12-04 16:11:08.684 ERROR (SyncWorker_1) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:11:08.687 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:11:25.577 ERROR (SyncWorker_2) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:11:25.581 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:11:25.889 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 1
2022-12-04 16:11:42.396 ERROR (SyncWorker_1) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:11:42.398 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:11:42.702 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 2
2022-12-04 16:11:59.229 ERROR (SyncWorker_5) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:11:59.234 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:11:59.542 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 3
2022-12-04 16:12:16.131 ERROR (SyncWorker_6) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:12:16.135 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:12:32.991 ERROR (SyncWorker_2) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:12:32.996 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:12:33.303 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 1
2022-12-04 16:12:49.794 ERROR (SyncWorker_5) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:12:49.799 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:12:50.106 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 2
2022-12-04 16:13:06.667 ERROR (SyncWorker_6) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:13:06.673 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:13:06.981 WARNING (AwoxMeshCommands-fbBFc3WA) [custom_components.awox.awox_mesh] Command failed, retry 3
2022-12-04 16:13:23.572 ERROR (SyncWorker_2) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
2022-12-04 16:13:23.577 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.
Traceback (most recent call last):
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 101, in connect
    with self._receiver.event("connect", timeout):
  File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/usr/local/lib/python3.10/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/awox/awox_mesh.py", line 324, in _async_connect_device
    if await self.hass.async_add_executor_job(device.connect):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 196, in connect
    self.btdevice = self.adapter.connect(self.mac, timeout=15)
  File "/config/custom_components/awox/awoxmeshlight/__init__.py", line 108, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to a4:c1:38:78:XX:XX after 15 seconds.```
Chaosflo commented 1 year ago

Happens on my side too

Chaosflo commented 1 year ago

Hey, try to delete the home assistant db file in the configs folder! I migrated from another system, that fixed the issue above

Give it a try the db gets created when started

fsaris commented 1 year ago

2022-11-11 22:13:10.936 INFO (MainThread) [custom_components.awox.awox_mesh] Search for AwoX devices to find closest (best RSSI value) device 2022-11-11 22:13:12.396 INFO (MainThread) [custom_components.awox.scanner] Scanning 20 seconds for AwoX bluetooth mesh devices! 2022-11-11 22:13:32.526 INFO (SyncWorker_3) [custom_components.awox.bluetoothctl] found: {'xxxxxx': {'mac': 'xxxxx', 'name': 'xxxxx', 'rssi': None}, 'xxxx': {'mac': 'xxxx', 'name': 'xxxx', 'rssi': None}} 2022-11-11 22:13:32.528 DEBUG (MainThread) [custom_components.awox.scanner] Found devices: {} 2022-11-11 22:13:32.808 DEBUG (MainThread) [custom_components.awox.awox_mesh] Scan result: {}

Make sure the Bluetooth dongle is in range of one of the devices. Enable debug logging (https://github.com/fsaris/home-assistant-awox/#troubleshooting) and check the RSSI values that are reported to validate the devices are in reach (check also https://www.home-assistant.io/integrations/bluetooth/#bluetooth-interference-with-other-devices)