New HA 0.27 and Bluetooth LE tracker

Is anyone else getting the following?

└❨~❩$─► hcitool lescan
Set scan parameters failed: Input/output error

(I’ve ran setcap on the hci* binaries as well)

What kind of USB Bluetooth LE are you using with the Raspberry PI 2 ?

Have you tried to run hcitool lescan as root?

I’m using this CSR V4.0 USB BLE dongle, it is cheap and works good.

Yeah, same result. I will try with another bluetooth dongle instead of using the RPI3 built in adapter. Has anyone got this working with the builtin bluetooth adapter on the RPI3?

It works for me, it just impacts the performance of Home Assistant quite a bit, to the point that I don’t use it. I don’t know if that’s a HASS issue or an RPi issue…

Are you using Raspbian Jessie? Did you have to compile a newer version of bluez?

I am using Raspbian Jessie Lite, and I did not compile anything myself.

Crazy, okay… thanks.

I got it working once and then wiped out my known_devices.yaml file but they never regenerated and now it won’t scan at all.

I see the same behaviour. but no luck yet in figuring it out

Collecting gatlib
Could not find a version that satisfies the requirement gatlib (from versions: )
No matching distribution found for gatlib

When I try the following
(homeassistant) homeassistant@raspberrypi:~/.homeassistant $ pip install gatlib

using the hassbian image upgraded to the latest 0.30.2 version.

and it seems

pip install gattlib==0.20150805

fixes it

also when doing a
sudo hcitool lesson

the scan seems to take ages to run - I wonder if this is the cause of the performance issues with hass that people are seeing when turning on the BLE Tracking?
(I am seeing several devices but it doesn’t finish in a hurry)

My system is a Rp2 model B with a USB bluetooth 4 adaptor.

In this post, you misspelled gattlib.

good pick up… thanks …

I ran a lescan last night and found around 15-20 items in range of my pi… Interestingly none of them matched the supposed bluetooth mac of the 2 iphones or 2 ipads in my house …

Is there an easy way to link up the BLE entries in the known_devices.yaml file with my actual home devices?

I second this. I do not see a benefit from using pygattlib, if the installation requires a compilation of outdated bluez parts. Bluez is usually shipped as a binary packag with the operating system.

2 Likes

For me it was ibboost-thread-dev which was missing. Now gattlib seems installed.
But I also have this performance issue… My Rp2 is very very slow… Maybe because bluetooth is scanning all the time? Scanning every x seconds could enhance performance ?

I’ve tried BLE tracker yesterday with version 0.39 and I confirm performance issues on RPI3.
It seem to have gotten to the point where my MQTT temperature readings stopped arriving.

Turned off BLE for now, I will play around with it some more later.