Hi,
got also some ruuvi tags and succeeded to integrate them to a pi4 with raspian and openhab 2.5.
first, this was the error message in the openhab.log
[INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'bluetooth.things' [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.bluetooth.bluez.handler.BlueZBridgeHandler@1807907': BlueZ JNI connection cannot be established. java.lang.IllegalStateException: BlueZ JNI connection cannot be established. at org.openhab.binding.bluetooth.bluez.handler.BlueZBridgeHandler.initialize(BlueZBridgeHandler.java:98) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_152] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_152] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_152] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_152] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_152] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_152] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_152] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152] Caused by: java.lang.UnsatisfiedLinkError: tinyb.BluetoothManager.getNativeAPIVersion()Ljava/lang/String; at tinyb.BluetoothManager.getNativeAPIVersion(Native Method) ~[?:?] at tinyb.BluetoothManager.getBluetoothManager(BluetoothManager.java:304) ~[?:?] at org.openhab.binding.bluetooth.bluez.handler.BlueZBridgeHandler.initialize(BlueZBridgeHandler.java:93) ~[?:?] ... 10 more
here my steps, to make the ruuvi tags work
-
Deinstall too new version of bluez on pi4 (I had .50 on raspbian)
- apt purge bluez
-
Install required version on pi4
- wget http://archive.raspberrypi.org/debian/pool/main/b/bluez/bluez_5.43-2+rpt2+deb9u2_armhf.deb
- as root/sudo: dpkg -i bluez_5.43-2+rpt2+deb9u2_armhf.deb
-
Copy tinyb shared object (idea from (SOLVED) BlueZ JNI connection cannot be established. OpenHab 2.5 + Bluez 5.47 on Rasp)
-
unzip org.openhab.binding.bluetooth.bluez-2.5.0.jar
-
cd tinyb
-
cp * /usr/lib/jvm/zulu-embedded-8-armhf/jre/lib/aarch32/
-
if you don’t have the jar available, you can also download the 2 shared objects from https://github.com/openhab/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.bluetooth.bluez/src/main/resources/lib/armv6hf
-
-
Add openhab user to the bluetooth group (step 9 at https://github.com/sputnikdev/bluetooth-manager-tinyb)
- usermod -a -G bluetooth openhab
-
Restart jvm or openhab or pi
-
ruuvi config: the thing config is tricky, because the ruuvi docs are missleading
- use the example configs from https://www.openhab.org/addons/bindings/bluetooth/ and https://www.openhab.org/addons/bindings/bluetooth.ruuvitag/
- but use a thing line like this one for the ruuvi tag: bluetooth:ruuvitag_beacon:hci0:Schlafzimmer_Fensterbrett “RuuviTag Sensor Beacon” (bluetooth:bluez:hci0) [ address=“AB:CD:EF:12:34:56” ]
- if you want to configure the beacon in the paper ui: you can also set at the bluetooth thing the discovery=true and use the inbox in paper ui to add the ruuvi thing
Thanks,
Jo