Closed immortaly007 closed 1 year ago
Your Bluetooth device isn't able to find the lights. Is your Bluetooth controller in reach of one of your lights?
Maybe you could test this also directly in the container by using the command hcitool lescan
Hi fsaris, thanks for the quick response! Although (at least one of) the lamps are quite close to the bluetooth adapter ( < 3 m), hcitool lescan
gives no other output then LE Scan ...
. I also tried bluetoothctl
scan on
, which has the same result. So either my bluetooth adapter is not (quite) working yet. Or the devices are too far away.
Should the lamps be in a specific state? I.e. on or off? Or should they be reset or somehow set to "pairing" mode?
Should the lamps be in a specific state? I.e. on or off? Or should they be reset or somehow set to "pairing" mode?
Just make sure they have power. They should be initial paired with your awox account that's what the integration uses to get the needed credentials
I have the same issue. Smartphone can connect without any issue (it is further away than my HA device). Before upgrade to 2022.7 my HA device could always connect via bluetooth. Position (distance) has not changed since then.
@ZTHawk can you provide some debug logs?
Here is an extract. Two of my four devices. It is the same for the other two and then repeats.
2022-09-17 22:55:38.130 DEBUG (SyncWorker_4) [custom_components.awox.awox_mesh] startup
2022-09-17 22:55:38.163 INFO (MainThread) [custom_components.awox.awox_mesh] Search for AwoX devices to find closest (best RSSI value) device
2022-09-17 22:55:38.865 INFO (MainThread) [custom_components.awox.scanner] Scanning 20 seconds for AwoX bluetooth mesh devices!
2022-09-17 22:55:59.052 INFO (SyncWorker_7) [custom_components.awox.bluetoothctl] found: {}
2022-09-17 22:55:59.053 DEBUG (MainThread) [custom_components.awox.scanner] Found devices: {}
2022-09-17 22:55:59.227 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for awox doing blocking calls at custom_components/awox/awox_mesh.py, line 346: devices = await DeviceScanner.async_find_devices(hass=self.hass, scan_timeout=20)
2022-09-17 22:55:59.335 DEBUG (MainThread) [custom_components.awox.awox_mesh] Scan result: {}
2022-09-17 22:55:59.336 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38:b8:11:29][Lampe über Treppe] Device NOT found during Bluetooth scan
2022-09-17 22:55:59.336 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38:2b:d6:b6][Lampe vor K2] Device NOT found during Bluetooth scan
2022-09-17 22:55:59.337 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38:ce:52:6a][Lampe vor Bad] Device NOT found during Bluetooth scan
2022-09-17 22:55:59.337 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38:64:7a:3e][Lampe vor E] Device NOT found during Bluetooth scan
2022-09-17 22:55:59.338 INFO (MainThread) [custom_components.awox.awox_mesh] async_update: Request status
2022-09-17 22:55:59.338 INFO (MainThread) [custom_components.awox.awox_mesh] Queue command requestStatus {'dest': 65535, 'withResponse': True}
2022-09-17 22:55:59.341 DEBUG (AwoxMeshCommands-ntOc9VHB) [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 0x7f6a27fd8430>, 'allow_to_fail': False}
2022-09-17 22:55:59.343 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38:b8:11:29][Lampe über Treppe] Trying to connect
2022-09-17 22:55:59.761 INFO (SyncWorker_1) [custom_components.awox.awoxmeshlight] Connecting to a4:c1:38:b8:11:29 with timeout=15
2022-09-17 22:56:14.863 ERROR (SyncWorker_1) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:b8:11:29 after 15 seconds.
2022-09-17 22:56:14.869 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:b8:11:29 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:b8:11:29 after 15 seconds.
2022-09-17 22:56:14.873 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38:b8:11:29][Lampe über Treppe] Failed to connect, trying next device [Timed out connecting to a4:c1:38:b8:11:29 after 15 seconds.]
2022-09-17 22:56:14.873 DEBUG (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38:b8:11:29][Lampe über Treppe] Setting up Bluetooth connection failed, making sure Bluetooth device stops trying
2022-09-17 22:56:14.873 DEBUG (SyncWorker_7) [custom_components.awox.awoxmeshlight] force stopping ble adapter
2022-09-17 22:56:15.178 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38:2b:d6:b6][Lampe vor K2] Trying to connect
2022-09-17 22:56:15.537 INFO (SyncWorker_0) [custom_components.awox.awoxmeshlight] Connecting to a4:c1:38:2b:d6:b6 with timeout=15
2022-09-17 22:56:19.338 ERROR (MainThread) [custom_components.awox.awox_mesh] Timeout fetching awox data
2022-09-17 22:56:19.344 DEBUG (MainThread) [custom_components.awox.awox_mesh] Finished fetching awox data in 41.181 seconds (success: False)
2022-09-17 22:56:30.648 ERROR (SyncWorker_0) [custom_components.awox.awoxmeshlight] Timed out connecting to a4:c1:38:2b:d6:b6 after 15 seconds.
2022-09-17 22:56:30.651 ERROR (MainThread) [custom_components.awox.awox_mesh] exception Timed out connecting to a4:c1:38:2b:d6:b6 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:2b:d6:b6 after 15 seconds.
2022-09-17 22:56:30.654 INFO (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38:2b:d6:b6][Lampe vor K2] Failed to connect, trying next device [Timed out connecting to a4:c1:38:2b:d6:b6 after 15 seconds.]
2022-09-17 22:56:30.655 DEBUG (MainThread) [custom_components.awox.awox_mesh] [a4:c1:38:2b:d6:b6][Lampe vor K2] Setting up Bluetooth connection failed, making sure Bluetooth device stops trying
2022-09-17 22:56:30.655 DEBUG (SyncWorker_6) [custom_components.awox.awoxmeshlight] force stopping ble adapter
@ZTHawk strange the Bluetooth scan doesn't find any device to connect. Do you have the HA Bluetooth integration enabled? Maybe that is claiming the Bluetooth controller
End try to do a BLE scan directly on your host to check if it can find some Bluetooth devices just to be sure nothing else broke after upgrade of HA.
Run hcitool lescan
or bluetoothctl
and then scan on
For testing purposes, i put one of the lamps right next to the bluetooth adapter (as shown in the picture). But still the adapter can't seem to find it (this time directly from the host, not inside the container):
> /opt/pihole# hcitool lescan
Enable scan failed: Input/output error
> /opt/pihole# bluetoothctl
Agent registered
[CHG] Controller E8:48:B8:C8:20:00 Pairable: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller E8:48:B8:C8:20:00 Discovering: yes
[bluetooth]#
But nothing is found. I even put my soundbar in "pairing mode" to see if it would show up but it didn't. So I'm thinking something is up with the bluetooth adapter itself, or the awox plugin is claiming it so my direct commands don't work.
It seems that my bluetooth adapter is not working.
Bluetooth: hci0: command 0xfc01 tx timeout
Bluetooth: hci0: FW download error recovery failed (-110)
HA is running in a virtual machine (virtualbox). But the bluetooth adapter was running before HA changed the bluetooth driver. Host system does recognize the bluetooth adapter and scanning is working fine.
I created an issue on HA board: https://github.com/home-assistant/operating-system/issues/2142
Sorry can't help with that. I have it running in docker supervised
Hi,
I have some Eglo Connect E27 bulbs (ESML-c9i, version 2.2.6 (HW 4.0)) that I'd love to connect to Home Assistant. I installed the latest beta of this integration to do that (1.3b3). The reason I'm using this beta version is the conflict with the latest HA (https://github.com/fsaris/home-assistant-awox/issues/59). Installation and login to my Awox account went well after switching to the beta. But I can't get the Awox lights to connect. I'm not sure if the issue is related to the bluetooth dongle (TP-Link UB500 Nano), an issue in the integration, or something else.
Environment: Home Assistant 2022.8.7. Running in "container" mode on Debian 10. The bluetooth controller seems to be available:
The lights are quite close to the bluetooth dongle (the "corner lamp" is ~2.5m away).
Below, the logs from Home Assistant: