pschmitt / home-assistant-addons

Home Assistant addons by pschmitt
74 stars 55 forks source link

Flicd not working with secondary bluetooth device #57

Closed c11umw closed 5 months ago

c11umw commented 2 years ago

Following on from: https://github.com/pschmitt/home-assistant-addons/issues/56#event-7130267395

I purchased a second long range bluetooth device to use Flicd alongside the new HA BlueTooth Integration (since 2022.8). The same model as described in this topic: https://community.home-assistant.io/t/bt-le-on-zigbee-3-0-cc2652p-usb-stick-not-recognized-by-hassos/352106/11

However, if I change the Flicd configuration to:

hci_dev: hci1

the flic buttons do not respond.

With nothing configured I see the 2 controllers are available in the cli:

~ $ bluetoothctl list
Controller [bt mac 1] homeassistant #1 [default]
Controller [bt mac 2] homeassistant

When Flicd is configured and started with hci1, one of the connectors is no longer available which I presume is correct due to Flicd's exclusive access requirement

~ $ bluetoothctl list
Controller [bt mac 2] homeassistant [default]

Testing the same hci1 adapter with the HA BT integration, it quickly identifies an unconfigured SwitchBot door sensor I have a couple of rooms away proving that the second BT adapter is working as expected and has a very good range.

Changing the FlicD configuration back to use the hci0 and the buttons start working again

c11umw commented 2 years ago
Available HCI devices found:
hci1
hci0
Trying hci1
hci1 is busy, shutting down and retrying...
Successfully bound HCI socket
Flic server is now up and running!
Initialization of Bluetooth controller done!
c11umw commented 2 years ago

With HA BT using the long range 2nd adapter + Flicd using internal adapter : HA BT works + FlicD works With HA BT using the internal adapter + Flicd using long range 2nd adapter : HA BT works + FlicD fails