SSMCD / bluetti2mqtt

Home Assistant Add-on for bluetti_mqtt
Apache License 2.0
33 stars 10 forks source link

Provide option to choose Bluetooth adapter #19

Open MegaBarf opened 1 year ago

MegaBarf commented 1 year ago

When using RaspberryPi with BT and WLAN I ran into connection problems with the onboard BT from the Pi (I use a 3b and a 4) where the connection randomly drops and at some point it does not reconnect again. I fixed that by using a USB BT dongle.

With the latest version of the addon it looks like it uses whatever BT device he finds. I saw this by removing the USB dongle and having the onboard BT disabled in HA and still get a connection to the Bluetti getting me the problem from above again.

Is it possible to a) check HA for disabled devices or b) make the BT-Device configurable?

SSMCD commented 1 year ago

I recommend disabling the troublesome on-board Bluetooth adapter entirely, at the system level. Here's a guide on one method using ssh on an RPi running HAOS: https://community.home-assistant.io/t/disable-bluetooth/56048/13

Disabling the adapter in the Home Assistant integrations tab does nothing. This addon does not communicate with HA in that way.

It may be possible to modify bluetti_mqtt to allow for a choice of BT devices (hci0, hci1, etc.) but that is beyond the scope of this addon.

theo1815 commented 1 month ago

Unfortunately, the connection via ESP Bluetooth Proxy doesn't work for me. The scan detects the Bluetti A200max but no connection is established. It works perfectly within range of the internal Bluetooth adapter of the Intel NUC. If I bring the Bluetti back within range of the Bluetooth proxy, it works until the next reconnection. Please help. Proxy