Hi
I am using 5x bluetooth (BT) temp sensor hardware LYWSD03MMC devices .
It is working with latest HA core (as of 31.01.2021) with Pi3+ and correctly communicates with all BT sensors.
However, what I am experiencing is that after around two days I find that the controller goes down and HA reports an unexpected end of the bluetooth loop, and hciconfig -a
reports the local controller to be DOWN and often timeouts communicating with the onboard controller, when issuing hciconfig
commands. I then need to do the following
sudo systemctl restart hciuart, bluetooth
hciconfig hci0 reset
Eventually (sometimes I need to do this several times) the hci0 interface is back up and doing its PSCAN stuff, and the related sensors entities are again updated Sometimes even that doesnât work so then a reboot of the Pi always resolves the issue but this is an overkill every two days!
I have scoured various forums with suggestions such as downgrading bluez and upgrading the EEPROM firmware, but this issue continues to persist. I am posting here because I only use the controller with HA and with these sensors - no other BT devices used in my network no other apps using BT. Thus wondering if HA users have managed to do something to get the Pi3+ BT controller working under HA.
I have also run raspi-update
that still doesnât fix this after a reboot.
Actually I have no idea what is going on with the Pi in terms of BT. There seems to be several BT packages installed which are not potentially needed and/or conflict with one another:
- bluez-firmware
- pi-bluetooth
- bluez
- hcitools
- and various firmware âdistâ files that can be downloaded and manually installed as a .deb
I also tried to downgrade bluez from 5**.5.0-1.2~deb10u1+rpt2** to 5.5.0-1.2~deb10u1 as per recommended on the RaspberryPI UK forum - but on reboot nothing could find the controller and all attempts to create/use/update the device from user-space failed with âNo controllerâ or similar issues.
Has anyone had similar timeout issues with the BT controller going down with timeouts, and if you have, how specifically did you fix it please either in the OS or in HA. I do have access to ârootâ outside of HA if that helps?
sudo /opt/vc/bin/vcgencmd version
reports
updated Jan 21 2021 (clean) (release) (start)
I am using kernel 5.10.9-v7+
EDIT:
I found this repo of non-free fw files , has anyone used one of these and fixed BT issues?