RPi3 onboard BTLE freezes HASS

Hey people!

My first post here, but have been using HASS for a month or 2. I love it! But…

There is something strange going on with HASS when the Bluetooth LE Tracker is enabled in the configuration.yaml. It freezes / delays the HASS software completely. It takes an average around the 10 - 15 seconds before I’m able to toggle a light bulb or even to load the webpage.

To give you more information on my issue; I’m using a (LAN connected) RPi3 (latest firmware, latest updates / upgrades) with the AiO version of HASS. I have a couple of BTLE keychain tags that I’m trying to track for Presence Detection.

So whenever I enable the BTLE tracker component with it’s default options, it starts to freeze HASS… When I disable the component it all works perfectly fine and responds quickly again. I initially thought that (by reading other BT(LE) problem topics over here) the onboard Bluetooth was jamming the onboard WiFi, explaining the freezing…

But even now that my RPi3 is LAN connected and the BTLE component enabled, HASS would still freeze up, but I’m having no problems at all SSH connecting to my RPi3 and running other software simultaniously without crashes / freezes! I also checked HASS for CPU usage during my test, and it wont even pass the ±6% CPU and ±6% MEM… but it still manages to freeze, and no other running software on my RPi3 is having problems at all.

I’m getting the feeling that maybe some process, hook or whatever in HASS checking the BTLE, is holding up the entire service untill it’s finished doing what it’s doing?

I hope someone could help me out :frowning:

Well, I have “solved” my problem using a workaround originally posted by user bsdwave

I have cloned the github repo https://github.com/olimpiurob/beaconreport , made some adjustments to fit my needs, added the mqtt device tracker:

device_tracker:
  - platform: mqtt
    devices:
      yourDevicename1: scanner1/data/ble/[iBeacon lowercase mac address]/state
      yourDevicename2: scanner1/data/ble/[iBeacon lowercase mac address]/state

Created a start-stop-daemon file pointing at the beaconreport.py dir & script so it runs at boot and background, and it’s rocking! Full onboard Bluetooth LE on a Raspberry Pi 3, blasting waves through my home searching for my beacons, with success!
And the best part of all, my HASS is still stable (±4 hours), no more delays / freezes. Finally, reliable presence detection!

So I guess there must be an issue with the BTLE component guys…

SO it is possible to make my Rpi3 to detect my phone with bluetooth without using BTLE?

Thanks!