Revival of Official Bluetooth Binding

In researching, and personal testing, I found the random mac is an issue with iphones, not Android (I only have Android phones), so Iā€™m hoping this will work for me.

Iā€™m struggling to find an Android beacon app that works with this, can anyone make any recommendations?

However, I found that not using any phone beacon app, I can get 2 Android phones to report their rssi values several times (even after reboots, etc), but ONLY while the phone is in pair mode (making itself discoverable I believe). Is this expected? Restarting the phone and turning the bluetooth on and off does NOT trigger any rssi events to openhab (but again, putting the phone is pair mode then gets rssi events to show up in openhab for a couple minues). Iā€™m not quite sure if this is a configuration issue on my end, my 2 phones, the Bluetooth Binding, or openhab itself (or a beacon app is required).

BTW Iā€™m using openhab logs to troubleshoot this and determine the rssi events.

Would your latest fix address any of this by any chance?

My configs:

Things:
Bridge bluetooth:bluez:hci0 "BluetoothAdapter" [address="[MY_ADAPTER_MAC_ADDRESS]", discovery=false]
bluetooth:beacon:hci0:b1 "Kevin Phone" (bluetooth:bluez:hci0) [address="[MY_PHONE_MAC_ADDRESS]"]
Item:
Number openhab4_Kevin_RSSI "Kevin Phone Beacon [%.0f]" PubItems {channel="bluetooth:beacon:hci0:b1:rssi"}

Thanks again for what youā€™re doing!

To do the update, where do we put the jars (pi 4/raspbian/Debian)? And do we first need to uninstall anything?

Iā€™ve been playing around with ā€œBeacon Simulatorā€ for Android. It allows you to create simulated advertising beacons such as ibeacon, eddystone, & altbeacon. I tried creating several but nothing is recognized in PaperUi via a search in the inbox. The are a lot of seeing for these beacons tho that I donā€™t understand. Is this expected or should these be showing up? Iā€™m testing it this way because if this does show up & work with openhab then I could potentially use this as a beacon on my phone to do the presence detection. Thanks!

UPDATE: Just reporting that BlueZ version 5.43 & 5.50 works with this. (ie, sudo apt-get update & sudo apt-get upgrade will not break this if going to 5.50)

Hi Connor,

Curious to hear, if you made some progress on that gatt parsing feature?

I actually just started working on this the other day. But since Iā€™m also juggling quite a few other bluetooth features that will be added in the next release Iā€™m only making a few hours of progress here and there.

But the newest features likely to be included in the next release:

  • a new bluez binding that doesnā€™t require tinyb.
  • roaming device support which would allow a device to report the adapter nearest to it.
  • another bluetooth device binding for the daikin madoka thermostat.
  • a binding that allows bluetooth devices exposed over mqtt to be handled by the bluetooth binding framework (which would allow existing bluetooth bindings to handle devices over mqtt)

@hairdresser has been doing a fantastic job in implementing some of these features. He is responsible for creating the new bluez binding, the daikin binding, and the mqtt adapter support.

Iā€™ll try to get the gatt feature done for next release but I canā€™t guarantee that it will be completed in time since it is a feature that requires significant testing. It also doesnā€™t help that I donā€™t have very many devices to test with.

2 Likes

Thanks @cpmeister !

To pursue on this - I can say that I am using those binding for several weeks now, and Iā€™m delighted with stability and performances. Nothing comparable with the previous TinyB that I was never satisfied with.

2 Likes

Happy to hear that :+1:

The least what I can offer is testing with these:

image

  1. Xiaomi MiFlora plant sensor

  2. Xiaomi Mijia Bluetooth Thermometer (LYWSDCGQ/01ZM)

  3. Xiaomi Mijia Bluetooth Thermometer 2 (LYWSD03MMC)

  4. Generic Bluetooth tracking tags (Dehyaton, Elistooop)

  5. Jumper blood oximeter

Pos. 1, 2 and 4 were well working with the ā€œ3rd Party Bluetooth Bindingā€.
Let me know :wink:

1 Like

For BLE devices testing, I suggest you use Bleno, a Node framework to emulate a BLE device. It is a bit tricky to make it work the first time, but if you need any help, and a dummy device to test (my Daikin Madoka emulator), Iā€™m happy to help.

On the iPhone, there is also the LightBlue app which I used as well to emulate a device.

1 Like

@curlyel
Thanks! Iā€™ll most definitely reach out for your help once my gatt feature is ready for testing.

@hairdresser
Looks useful, Iā€™ll look into it.

1 Like

Iā€™m also thinking of a new feature for the Bluetooth binding through DBUS: a custom agent to allow the pairing directly from the binding. Iā€™ve checked the tech details - I just need some time to implement this.

1 Like

Hello.I am tested this.
I get data from a temperature and humidity sensor using the third-party C ++ + Bluez program on my OrangePi PC + usb dongle bluetooth 4.0. I removed the standard bluetooth binding and installed (in addons folder) first org.openhab.binding.bluetooth.bluez-2.5.4-SNAPSHOT.jar but I did not get the Bluetooth Roaming Controller.
Next, I removed this and downloaded org.openhab.binding.bluetooth-2.5.4-SNAPSHOT.jar and the Bluetooth Roaming Controller showed up in Inbox and was added. But my Xiaomi temperature sensor was never found in Inbox.
Previous topic with my questions (no solved): Xiaomi Mija Sensor Tempetature, Bluetooth (console data)

Any progress with testing this? :slight_smile:

Mmmh. Iā€™ve offered testing it once the GATT stuff has been implemented, thatā€™s true :wink:
But: Iā€™m not sure, if this has happened yet :thinking:

@cpmeister Is it done already?

Let me knowā€¦

I would also by happy to support testing. Is there any progress on this?

Hi,

Iā€™m still not able to cover presence functionality with official binding - anyone has it?
@cpmeister - if you have ability to cover this functionality, you would be able probably to become new maintainer of project: 3rd Party Bluetooth Binding. Beta testers needed
@vkolotov had to stop it and is lookinf for someone to replace. Itā€™s a great bindig with a lot of functionalities in comparison to official one. A lot of beacons already covered and many adapters can be used. Now, itā€™s not adapted to new openhab version and has some issues with connection - desperately needs new maintainer :slight_smile:

Hi, guys any update? I have managed to update bluez to the latest 5.5 version and managed to get bluez bridge online, discovered sensor, but got only RSSI data, no humidity, no temperature data. How to add those channels?

I have good news, I just got roaming device support added into the official bluetooth binding. This feature essentially allows devices to be tracked based on the adapter they are closest to. This is essential for implementing multi-room presence detection.

In other news Iā€™ve almost completed work on GATT channel support for the official bluetooth binding. This feature wonā€™t be able to make it into the 2.5.9 release but it will definitely make it for the OH 3 release.
Once I have the feature in testable shape Iā€™ll post the jar so everyone can get a go at it.

Thanks for your patience!

4 Likes

Excellent news! waiting for it, thanks!

So I think Iā€™ve finished support for GATT channels, but I donā€™t have any devices to test it withā€¦ Any recommendations on devices I could use?

I think the Xiaomi (Mijia) temperature and humidity sensor (the round one) is often used with the 3rd Party Bluetooth Binding (so I do also).

1 Like

Also one vote for the Xiaomi Mijia temperature and humidity sensor from me. I am using several ones still with the 3rd party Bluetooth Binding. I could also offer to send you one sensor for testing if this helps.

1 Like