Bluetooth low energy libraries

Is there any plan to unify BTLE libraries in Homeassistant?

I’m thinking about adding support for a BTLE bathroom scale, but I don’t know which library to use, as there are:

bluepy
gattlib
pygatt

in use, which all do the same thing.

Can those even be used in parallel? A situation where you’d have to choose between different features is probably undesirable.

Personally, I don’t like wrappers for cli tools, which pygatt seems to be.

1 Like

I think all the libraries are currently wrappers for cmdline programs. See this evaluation of ble python libraries. For pygatt there’s at least a pull request to use the bluez dbus api. So I would recommend to use pygatt and hope that the dbus api lands soon.

Well, I think that gattlib is probably the best choice, but the main thing is to focus on one and not use all of them.