3rd Party Bluetooth Binding. Beta testers needed

bluetooth
binding
Tags: #<Tag:0x00007fe05301d4a8> #<Tag:0x00007fe05301d368>

(vossivossi) #867

Ok, then you have installed the official binding which is - in my opinion - a piece of Sh… or just a bad joke. I had exactly the same problems like you and anybody else on this forum. I don’t know why this binding is still presented as a featured binding on the Webpage as it does not work at all.
You need to install Eclipse Smart Home Marketplace (Addons - Misc) and then choose level ‘Alpha’ for displayed bindings in Configuration.
The correct binding should show up in paperUi like this:

or in Karaf Console like this:


(Aaron) #868

@vossivossi

OK i will try but before I install, end up wasting ages (I always do with anything openhab related) do you know if it will work with the built in Bluetooth on the RPI


(vossivossi) #869

Sorry, I have no RPI experience as I am running OH on Windows and Bluetooth with a BlueGiga USB stick.


(Christoph) #870

Yes, it will.


(Aaron) #871

Thanks For that

I have installed the binding and setup with openhabs rpi bluetooth

tested with my mobile (found that usless like people said)

I cant find the bluetooth from my smartwatch too test how that behaves do you or does anyone else know what too do or know about blutooth on smartwatches?


(Jesper Lauritsen) #872

Hi
I installed the binding yesterday evening and successfully saw some devices.
Today I am trying more seriously to connect, but when I try to set ConnectionControl to ON I get the following it just changes back to OFF after half a minute or so:

2019-02-05 19:59:01.310 [ome.event.ItemCommandEvent] - Item 'ScaleCH100_ConnectionControl' received command ON
2019-02-05 19:59:01.318 [nt.ItemStatePredictedEvent] - ScaleCH100_ConnectionControl predicted to become ON
2019-02-05 19:59:01.336 [vent.ItemStateChangedEvent] - ScaleCH100_ConnectionControl changed from OFF to ON
2019-02-05 19:59:05.800 [vent.ItemStateChangedEvent] - ScaleCH100_ConnectionControl changed from ON to OFF
2019-02-05 19:59:48.665 [ome.event.ItemCommandEvent] - Item 'ScaleCH100_ConnectionControl' received command ON
2019-02-05 19:59:48.676 [nt.ItemStatePredictedEvent] - ScaleCH100_ConnectionControl predicted to become ON
2019-02-05 19:59:48.689 [vent.ItemStateChangedEvent] - ScaleCH100_ConnectionControl changed from OFF to ON
2019-02-05 20:00:05.794 [vent.ItemStateChangedEvent] - ScaleCH100_ConnectionControl changed from ON to OFF

The same happens with another device I tries. Must be some noob mistake; I would appreciate any help.

I use the Bluetooth adapter build into my Raspberry and I’m on Bluez 5.43 (got that with Openhabian).

–Jesper


(Jesper Lauritsen) #873

Ok, did a reboot, and now it can stay with ConnectionControl ON.

However, trying to connect to my Huwei AN100/CN100 I get the following:

2019-02-05 20:39:48.036 [vent.ItemStateChangedEvent] - ScaleCH100_Connected changed from OFF to ON
==> /var/log/openhab2/openhab.log <==
2019-02-05 20:39:48.749 [ERROR] [.manager.transport.tinyb.TinyBDevice] - Services resolved notification execution error
java.lang.NullPointerException: null
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.validate(BluetoothGattSpecificationReader.java:304) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.addCharacteristic(BluetoothGattSpecificationReader.java:294) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.getCharacteristicByUUID(BluetoothGattSpecificationReader.java:131) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.BluetoothGattParser.isKnownCharacteristic(BluetoothGattParser.java:86) ~[?:?]
	at org.sputnikdev.esh.binding.bluetooth.handler.AutomaticPinCodeAuthProvider.lambda$discoverPinCodeCharacteristic$1(AutomaticPinCodeAuthProvider.java:64) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) ~[?:?]
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:?]
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[?:?]
	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270) ~[?:?]
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:?]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:?]
	at org.sputnikdev.esh.binding.bluetooth.handler.AutomaticPinCodeAuthProvider.discoverPinCodeCharacteristic(AutomaticPinCodeAuthProvider.java:65) ~[?:?]
	at org.sputnikdev.esh.binding.bluetooth.handler.AutomaticPinCodeAuthProvider.authenticate(AutomaticPinCodeAuthProvider.java:41) ~[?:?]
	at org.sputnikdev.bluetooth.manager.impl.DeviceGovernorImpl.authenticate(DeviceGovernorImpl.java:833) ~[?:?]
	at org.sputnikdev.bluetooth.manager.impl.DeviceGovernorImpl.access$800(DeviceGovernorImpl.java:63) ~[?:?]
	at org.sputnikdev.bluetooth.manager.impl.DeviceGovernorImpl$ServicesResolvedNotification.notify(DeviceGovernorImpl.java:817) ~[?:?]
	at org.sputnikdev.bluetooth.manager.impl.DeviceGovernorImpl$ServicesResolvedNotification.notify(DeviceGovernorImpl.java:807) ~[?:?]
	at org.sputnikdev.bluetooth.manager.transport.tinyb.TinyBDevice.lambda$null$6(TinyBDevice.java:203) ~[?:?]
	at org.sputnikdev.bluetooth.manager.transport.tinyb.TinyBFactory.lambda$notifySafely$0(TinyBFactory.java:237) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

If I connect to the CH100 with the BLE Scanner app I actually see some apparently nice GATT fields, so I was hoping to get it to work i OpenHAB. I am still on Bluez 5.43. Again, any help would be appreciated.

–Jesper


(Vlad Kolotov) #874

Hi @jesperdk, good to see it is kind of working.

The error you see is a bug apparently. This happens when it tries to “parse” gatt characteristics, obviously your scales is not supported as nobody added GATT specs for your scales yet (you are welcome do so it and update this repo: https://github.com/sputnikdev/bluetooth-gatt-parser)

Having said that, you should be able to get binary data from your device. Set this setting to do so:

I’ve created a new ticket for you:

Please enable binary only discovery and report what channels you get in that ticket on github. We will try to come up with some gatt specs for your scales so you should be able to get some meaningful data.


(Vlad Kolotov) #875

Hi @Sharpy,

I’ve added a workaround for the privacy “feature”, could you please help me with testing it?
Please follow this instructions:


(Jesper Lauritsen) #876

Wow, that is better support than for any software I have ever used before :grinning:
I have commented on the github issue and will move the communication over there - just wanted to say “wow” here in this tread…


(Aaron) #877

It would be a pleasure too help you test it although I’m not sure how much help I can be

Using android phones is that still of help


(Vlad Kolotov) #878

@Sharpy, Yep, same thing on android phones. Just get that app (nrf connect) from the play market, set it up according to the post above.


(Aaron) #879

@vkolotov
I think have got it working now still having some disconnects


(Vlad Kolotov) #880

Cool, what do you mean by “disconnects”? The thing goes offline / online?


(Aaron) #881

Its the actual device/item itself as you can see from the screenshot of my timeline there were times when the device went off when it was in fact on

there are blips all over the timeline but my phone has been on with the beacon app running since i spoke too you last night

There’s a gap over 12 mins long where it says the device is off then a long period of 3 1/2 hours where it correctly reports on and then lots of jitter later on
time


(Bogdan P.) #882

I’ve continued my stuggle with the Qnap, resolved with a symlink the old error but now I get another problem and seems to be more complicated.

java.lang.RuntimeException: Error getting object manager client: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method “GetManagedObjects” with signature “” on interface “org.freedesktop.DBus.ObjectManager” doesn’t exist

LE: installing some related dbus packages resolved the error but it does not find anything:

||428|2019-02-06 17:34:09.253 [DEBUG] [th.manager.impl.BluetoothManagerImpl] - Transport [tinyb] reported 0 discovered adapters|
| — | — | — |
||429|2019-02-06 17:34:09.358 [DEBUG] [th.manager.impl.BluetoothManagerImpl] - Transport [tinyb] reported 0 discovered devices|
||430|2019-02-06 17:34:09.359 [DEBUG] [th.manager.impl.BluetoothManagerImpl] - Lost: 0; New: 0; Rediscovered: 0; Stale: 0|
||431|2019-02-06 17:34:09.484 [DEBUG] [th.manager.impl.BluetoothManagerImpl] - Trying to find object factory: /DB:30:23:F2|

I’ve noticed that hcitool works well but bluetoothctl cannot find any controller. Seems that the cause is missing btusb.ko from kernel modules.

Could the missing btusb.ko module have something to do with the 0 found part in logs? It’s a little offtopic but hcitool seems to work just fine…


(Aaron) #883

This is also happening i have just checked the logs


(Zs B) #884

Hi Frest! Could you please help me how to install bluez on a synology nas? I have installed opkg, but after this point i’m in trouble.


(Christian) #885

Now I have found a bluetooth dongle with a littel bit better range for BLE devices: Parani-UD100
http://www.senanetworks.com/ud100-g03.html

Placed in the middle of my house (10m x 10m, 2 level), I get all my Xiaomy Bluetooth devices connected.


(vossivossi) #886

Interesting device. Are you using it in a Linux or Windows environment?