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
#7072 Bluez error causes discovery sweep to crash
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)
Completed and merged into the official codebase
- Completed but waiting on PR to merge
- In development
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: https://github.com/cpmeister/openhab-addons/raw/blind-engine-snapshots/org.openhab.binding.bluetooth-2.5.2-SNAPSHOT.jar
Bluez Binding snapshot: https://github.com/cpmeister/openhab-addons/raw/blind-engine-snapshots/org.openhab.binding.bluetooth.bluez-2.5.2-SNAPSHOT.jar
Bluegiga Binding snapshot: https://github.com/cpmeister/openhab-addons/raw/blind-engine-snapshots/org.openhab.binding.bluetooth.bluegiga-2.5.2-SNAPSHOT.jar
The latest fixes and enhancements are currently in the official repo.
If there are 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.