Revival of Official Bluetooth Binding

Tags: #<Tag:0x00007fc1fc33ec60>

Hi all,
I am currently in the process of doing a number of fixes and improvements for the official bluetooth binding and I just wanted to start this topic as a way to document my progress and as a sounding board for new ideas.

As a bit of background, I’m rather new to openhab development (started this year actually) but in the process of creating my first binding I got caught up in trying to fix all the bugs in the underlying bluetooth binding to get things to work. Needless to say, I got things working and have decided to share the results.

But for whatever the reason (obsession or genuine interest) I’ve decided to continue my improvements of the bluetooth binding beyond bug fixes and start adding new features.
Below is a list of my git issues showing my progress and roadmap of things I have planned:

  • #6836 Bluez discovery eventually crashes/inbox discoveries are never culled
  • #6912 Adapter discovery settings not respected after restart
  • #6913 Fixed minor Bluez logging bug
  • #6914 Changed characteristic logging to hex
  • #6915 Bluez loses track of devices causing handlers to become unresponsive
  • #7010 tinyb Characteristics disappear

These fixes have made my bluez setup (almost) rock solid, so I have decided to take things a bit further to pave the road for development of other bluetooth bindings:

  • #6935 make characteristic write/notify thread safe
  • #7007 Support connection based discovery (basically allows bindings to query the device during discovery)
  • #7008 Allow bluetooth devices to jump between adapters (is more or less a replicate of the 3rd party binding feature)
  • mqtt-to-bluetooth adapter (basically simulates a native adapter for remote bluetooth-to-mqtt services)
  • add support for device gatt definition files (not quite sure how this would work)

I’m not the only one doing bluetooth bug fixes either; @pauli_anttila and @pfink are working on their own fixes for the bluegiga binding. I’ve been cooperating with them on their code changes.

  • Completed and merged into the official codebase
  • Completed but waiting on PR to merge
  • In development
  • Proposed

For those that want to get their hands on the fixes without having to build the latest code, here are jars with the latest fixes:
Bluetooth Binding snapshot:
Bluez Binding snapshot:

If there is any bugs that still aren’t fixed or features you are dying to have let me know and I’ll see what I can do.


Discovered new issue that I need to address: #7010