fsaris / home-assistant-awox

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

Scan for bluetooth devices fails after update #81

Closed Silvr5 closed 9 months ago

Silvr5 commented 1 year ago

Hello @fsaris,

first of all thanks for your great work with this integration. After the latest update I have the problem that the scan after devices somehow fails and I dont really have a clue why.

2023-01-05 20:02:43.405 DEBUG (SyncWorker_6) [custom_components.awox.awox_mesh] startup
2023-01-05 20:02:43.483 INFO (MainThread) [custom_components.awox.awox_mesh] [xxxxx] Search for AwoX devices to find closest (best RSSI value) device
2023-01-05 20:02:44.164 INFO (MainThread) [custom_components.awox.scanner] Scanning 20 seconds for AwoX bluetooth mesh devices!
2023-01-05 20:02:44.224 ERROR (SyncWorker_7) [custom_components.awox.bluetoothctl] Failed to start scan: failed after scan on
2023-01-05 20:03:09.561 ERROR (SyncWorker_8) [custom_components.awox.bluetoothctl] Failed to get available devices: failed after devices
2023-01-05 20:03:09.566 DEBUG (MainThread) [custom_components.awox.scanner] Found devices: {}
2023-01-05 20:03:09.619 ERROR (SyncWorker_5) [custom_components.awox.bluetoothctl] Failed to stop scan: failed after scan off
2023-01-05 20:03:09.733 DEBUG (MainThread) [custom_components.awox.awox_mesh] [xxxxxx] Scan result: {}

I already tried to reinstall the components and did several restarts. But nothing helped so far. The only change to the system (that had worked well before) was updating the integration. Thanks in advance for your help!

Edit: In a manual bluetooth scan using bluetoothctl I can at least discover my devices

OkOtChA666 commented 1 year ago

Dunno if it's the same but, all my awox light are not working after the update as well.

Edit. Grammar

bioxz commented 1 year ago

I was able to observe this issue with 1.4b4 and 1.4b5 already, as documented in #66, but sadly the issue was hijacked and closed without a solution to my initial report. Downgrading from 1.4 back to 1.3 restores the functionality.

Silvr5 commented 1 year ago

I con confirm this. When I downgrade my system to version 0.1.3, the scan for devices works again.

Edit: I don't know if this is important but the scan for devices only worked again after I restarted not only the HA instance but the whole system (In my case a raspberry pi 4).

fsaris commented 1 year ago

Since HA start improving the Bluetooth component last year I noticed that the Bluetooth controller hangs sometimes and a restart of the full system was needed to get it responsive again.

fsaris commented 9 months ago

I'm now focusing on a ESPHome solution https://github.com/fsaris/EspHome-AwoX-BLE-mesh-hub because of all Bluetooth issue, maybe that helps you too.

Please open a new Q&A discussion if you need more support

bioxz commented 9 months ago

Thank you for the looking into this anyhow -- I switched to the ESPHome variant and it rock stable (and even more responsive) since then!