3rd Party Bluetooth Binding. Beta testers needed

how can i update to the latest version?

i installed version 1.0 via PaperUI like i have found on gitHub

i installed all three packages over PaperUI but they are only installed and not acitvated.

openhab> bundle:list | grep bluetooth
275 │ Installed │  80 │ 1.2.3                   │ org.sputnikdev:org.eclipse.smarthome.binding.bluetooth.transport.bluegiga
276 │ Installed │  80 │ 1.1.3                   │ org.sputnikdev:org.eclipse.smarthome.binding.bluetooth.transport.tinyb
277 │ Installed │  80 │ 1.1.6                   │ org.sputnikdev:org.eclipse.smarthome.binding.bluetooth

if i try to activate the bundle i got this error message:

openhab> bundle:start 275
Error executing command: Error executing command on bundles:
	Error starting bundle 275: Could not resolve module: org.sputnikdev.org.eclipse.smarthome.binding.bluetooth.transport.bluegiga [275]
  Unresolved requirement: Import-Package: org.sputnikdev.bluetooth
    -> Export-Package: org.sputnikdev.bluetooth; bundle-symbolic-name="org.sputnikdev.org.eclipse.smarthome.binding.bluetooth"; bundle-version="1.1.6"; version="1.1.6"
       org.sputnikdev.org.eclipse.smarthome.binding.bluetooth [277]
         Unresolved requirement: Import-Package: org.apache.commons.collections
  Unresolved requirement: Import-Package: org.sputnikdev.bluetooth.manager
    -> Export-Package: org.sputnikdev.bluetooth.manager; bundle-symbolic-name="org.sputnikdev.org.eclipse.smarthome.binding.bluetooth"; bundle-version="1.1.6"; version="1.1.6"; uses:="org.sputnikdev.bluetooth,org.sputnikdev.bluetooth.manager.transport"

how can i solve the problem?

same problem here after upgrading to 2.5.0 .
seems that Apche commons collections bundle is not installed. it’s possible to install manually?

1 Like

same problem here - installed but not active

Same problem here as @Trainer . After a fresh install of openHAB 2.5.1-2, I had the Bluetooth daemon 5.50. I downgraded to 5.47 but the problem persists.

I think that until Vlad eventually modifies this binding, the only solution is the one suggested a few posts ago by vossivossi

Hello ! I am currently coding a binding for a BLE Daikin controller (New binding for DAIKIN Madoka Controller (BLE)) and after having looked (without success) at the bluetooth binding, I found yours.

I have few questions / remarks.

1/ It doesnt work straightforward on my setup - I had to copy manually libjavatinyb.so and libtinyb.so to my ${JAVA_HOME}/lib/amd64) folder. That being done, it worked like a charm and immediately detected a lot of devices in Inbox.

2/ I prefer not to use UIs, and prefer doing everything with config files. Is there an easy way to install your binding without PaperUI ?

3/ Back to my starting point - coding my new binding support - I wish to rely on your awesome work. As I mentioned in my topic, I have the 90% of the code working standalone with TinyB, and I am now working on integration with OpenHAB. Do you have a skeleton sample to provide ? I could not find it !

Thanks for your help :slight_smile:

My setup:

  • Ubuntu 18.04.3 LTS VM (x86_64 arch)
  • BlueZ 5.48
  • an Intel onboard BT chip in passthrough.
  • JRE and JDK Oracle 1.8.0.231
  • OpenHAB 2.5.1, manual install (not packaged)
  • OpenHAB running with its dedicated userid limited privs

Hey @curlyel - I can try it, but first I need to understand how it works and how to implement it in my system (Raspberry Pi 3B+, OH 2.5.1-2). Im not confident with Python, so I would be following the instructions blindly, which will very likely end up with me completely messing up my installation. :sweat_smile:

@jambolero, @AEM
Hi All!
I think it is bug of marketplace addon, with resolving dependencies.

But the good news are that, any dependency problem can resolved by openhab/osgi/karaf console.
You can read this article:

So, you need open terminal on machine where openhab installed and tap:

ssh -p 8101 openhab@localhost

Use password: habopen

In the openhab console tap this, to install apache-collections:

bundle:install -s ‘wrap:mvn:commons-collections/commons-collections/3.2.2’

This will install jar from maven repository.
After that bluetooth binding will activated automatically.

To exit console tap:

logout

The bad news are, that it is not all problems, i still have several exceptions in the log. There is next:

020-01-31 10:45:32.474 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.initialize()’ on ‘org.sputnikdev.esh.binding.bluetooth.handler.BluetoothDeviceHandler@3cdd001a’: thingRegistry
java.lang.NoSuchFieldError: thingRegistry
at org.sputnikdev.esh.binding.bluetooth.handler.GenericBluetoothDeviceHandler.access$000(GenericBluetoothDeviceHandler.java:29)

2 Likes

Thannnkkkkssss!!! this worked for me but with the following url:

bundle:install -s ‘https://repo1.maven.org/maven2/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar

after that. I started bluetooth and tinyB bindings and all start to work again…

Party ON!..

it worked like a charm!

i had to remove the quotes -> bundle:install -s wrap:mvn:commons-collections/commons-collections/3.2.2

Thank you @frickua !
I had to use this command:

bundle:install -s https://repo1.maven.org/maven2/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar

Then I was finally able to install the 2 bindings (TinyB and Bluetooth). They are correctly listed as Active using the command bundle:list.

Unfortunately this is now giving me a problem when trying to install another binding, the OpenWebNet (BTicino/Legrand) Binding.
When it comes to activating a dependecy, using the command:

openhab> feature:install openhab-core-io-transport-upnp                         

I receive this error:

Native code library failed to load.
java.lang.UnsatisfiedLinkError: no tinyb in java.library.path
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no javatinyb in java.library.path

About these specific errors, in a previous reply @vkolotov said:

So I’m ignoring them, even tho they are scary :sweat_smile:

Moreover, looking at the Logs, I see frequent warnings, for example:

==> /var/log/openhab2/openhab.log <==
2020-02-14 02:21:22.865 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /5C:F3:70:94:64:8B/58:2D:34:38:5B:C4 / 17363a2 : GDBus.Error:org.bluez.Error.Failed: Software caused connection abort

2020-02-14 02:24:28.052 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:582D34385F5A tried checking if channel authenticated is linked although the handler was already disposed.

2020-02-14 02:30:13.043 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /DC:A6:32:6E:9C:47/58:2D:34:38:5E:8D / 17aa9bc : Timeout was reached

This Bluetooth binding is seriously giving me headaches. I’m considering to give up, throw my Xiaomi Bluetooth sensors in the bin, and start over with other components… :roll_eyes:

Another option, which i was trying to implement last week, would be to have a second Raspberry, only dedicated to the bluetooth sensors, based on OpenHAB 2.4. On OpenHAB 2.4 the bluetooth binding is working as expected. I could gather the data there and send it to my “main” openHAB 2.5 through MQTT.

Its just an abandoned project …i updated to 2.5 (buster) and bluetooth tiles and my Mi kettle stoped working.I removed everything bluetooth and i will wait till someone with coding skills continue this or other working bluetooth binding work.Wish i could do it myself but i am just an electrician :slight_smile:

Agree. Still I don’t understand how comes the official bluetooth binding is basically a joke and nobody ever thought to implement something like this instead. This binding was working pretty well. I have no technical skills to do it myself, and i don’t know the constraints of a bluetooth binding, so I’m not judging or arguing… But it is evident it can be done. Why breaking this one, if there is no other option?
Maybe this has to do with how the bindings are created and mantained. I read somewhere this will strongly change from OpenHAB 3.0 on. I really hope they figure out a way to mantain more retrocompatibility, without forcing the single developers to keep updating the bindings at every release!

ha i have the same question why the official bluetooth binding sucks so much.

1 Like

I also already raised the question but no one answered. It is also not understandable for me why this disfunctional binding (for years already) is still listed as one of the number one featured bindings onthe webpage:

The 3rd party binding is great, I am still running OH 2.5 M3 on my Raspis with bluetooth sticks (Bluegiga) to feed my main OH server via MQTT.

I had some problems lately with the plugin that seems to be out of development. I installed the bt gateway script from https://github.com/zewelor/bt-mqtt-gateway on my openhabian and got good results.

1 Like

Cool, thank you for sharing the link. Looks promising.

For those that are not aware, there is currently a lot of work being done to fix the official bluetooth bindings. I’ve detailed current progress and expected future developments on my post. You can also download the latest 2.5.x bluetooth snapshot jars to try out if you are using OH 2.5.

1 Like

great news!!!i will test the snapshot and give a feedback as soon as i can find the time ,Many thanx.

Hello everyone, I’ve been actively developing this binding for a few years, but had to slow down as priorities have changed in my life. Sorry for that. I was hoping someone could pick up my work and help to maintain the project, but unfortunately nobody did not show any will.

As I understand correctly, apache-commons is no longer included into OH by default hence the binding is not working out of the box. I’ll try to find some time on the weekend to remove the dependency. Unfortunately OH framework does not allow 3rd party bindings to specify dependencies as you would normally do in OSGi so that they automatically get installed.

Let me know if there are some other critical issues that need to be fixed.

5 Likes