Can I stop searching for new devices? My Inbox is full of devices i don’t need.
Second is, when i change the update rate, it doesn’t work.
Has anyone an idea?
Hi @Master79, you can disable “Discovery control” channel for your adapter, however presence detection wil stop working after that. How full is your inbox? There was an issue in a previous version of the binding when all bluetooth devices were getting built up, that was fixed a couple of releases ago. However, if you live by a mall, or by a busy road you may get quite a lot of devices in your inbox indeed. Is this the case?
Re “when i change the update rate, it doesn’t work”. Can you please elaborate this? What value you are setting to? What are you trying to achieve?
Thanks, i will test it. I only have xiaomi Flower care sensors. So i don’t need it.
I want to get the fastest refresh rate. So i can give water to the flowers and get a direct answer, if water level is okay. A refresh rate of 1 second. Or is this not good.
Hi @Master79, for MiFlora sensors you have to keep “Discovery control” always on, otherwise the binding won’t receive updates from your sensors. And also the “Bluetooth devices update rate” settings won’t make any difference for this type of sensors.
To be more clear on this, there are two types of devices in the bluetooth world:
- the one that require a secure connection to get some data from devices
- the one that does not require connection, these devices broadcast their data (MiFlora is an example)
I am using your great bluetooth binding but unfortunately I updated my system to Snapshot #1253. And now the bluetooth binding does not work anymore
I guess this is because of the recent ESH updates…? I attached an excerpt from the log. Is there anything I can do or help?
All the best
2018-04-10 20:06:11.373 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while calling thing handler factory 'org.sputnikdev.esh.binding.bluetooth.internal.BluetoothHandlerFactory@477a6876': Could not check if channel is linked, because callback is missing java.lang.IllegalStateException: Could not check if channel is linked, because callback is missing at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.isLinked(BaseThingHandler.java:659) ~[?:?] at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.isLinked(BaseThingHandler.java:640) ~[?:?] at org.sputnikdev.esh.binding.bluetooth.handler.BluetoothHandler.lambda$registerChannel$4(BluetoothHandler.java:156) ~[?:?] at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[?:?] at org.sputnikdev.esh.binding.bluetooth.handler.BluetoothHandler.registerChannel(BluetoothHandler.java:155) ~[?:?] at org.sputnikdev.esh.binding.bluetooth.handler.BluetoothHandler.lambda$addChannelHandlers$5(BluetoothHandler.java:166) ~[?:?] at java.util.Arrays$ArrayList.forEach(Arrays.java:3880) ~[?:?] at org.sputnikdev.esh.binding.bluetooth.handler.BluetoothHandler.addChannelHandlers(BluetoothHandler.java:164) ~[?:?] at org.sputnikdev.esh.binding.bluetooth.handler.AdapterHandler.<init>(AdapterHandler.java:68) ~[?:?] at org.sputnikdev.esh.binding.bluetooth.internal.BluetoothHandlerFactory.createHandler(BluetoothHandlerFactory.java:79) ~[?:?] at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.registerHandler(BaseThingHandlerFactory.java:119) ~[?:?] at org.eclipse.smarthome.core.thing.internal.ThingManager.doRegisterHandler(ThingManager.java:536) ~[?:?] at org.eclipse.smarthome.core.thing.internal.ThingManager.registerHandler(ThingManager.java:513) ~[?:?] at org.eclipse.smarthome.core.thing.internal.ThingManager.registerAndInitializeHandler(ThingManager.java:980) ~[?:?] at org.eclipse.smarthome.core.thing.internal.ThingManager.lambda$9(ThingManager.java:963) ~[?:?] at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891) ~[?:?] at java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:404) ~[?:?] at org.eclipse.smarthome.core.thing.internal.ThingManager.lambda$8(ThingManager.java:960) ~[?:?] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:?] at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:?] at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:?] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:?] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:?] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:?] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:?] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:?] at org.eclipse.smarthome.core.thing.internal.ThingManager.handleThingHandlerFactoryAddition(ThingManager.java:959) ~[?:?] at
Hi all, I’ll have a look at this issue soon.
Is there write support for custom characteristics?
I wrote 1 into Item Field but nothing happens on my bluetooth device.
Hi @MatthiasMunzel, current version of the binding supports basic “write” operations. I’m currently working on adding support for more sophisticated write operations that you can define in a declarative manner as much as like you define “read” operations via GATT descriptor files.
Make sure your device is connected before you “write” something to it first.
BTW, what device is it on your screen?
Need a hint. I like to try the bluetooth binding. Paper UI offers only the 1.0 versions where do i download the newest jar’s?
Still the same question. On github version number is 1.1.4 in paper UI displayed number is 1.0.
So where to download the 1.1.4 jar’s
OK, got it even if the 1.0 is dispalyed the 1.1.4 ist installed
Hi @vkolotov, thanks for your reply.
My device is a custom BLE device with properitary characteristics and a device information profil.
At the point i made the screenshot my device was connected.
My hardware is a Raspberry Pi Zero W with running openhabian.
bluetooth binding and transport: 1.0 (from marketplace)
last weekend i installed the binding on my openhab 2.3 nightly system with a raspberry version 3. After some tries openhab showed up with BlueZ onboard adapter and discovered bluetooth devices. @vkolotov Really a nice job.
But now i have some questions to gain a clear understanding about the possibilities of the binding that i am at the moment not clear about.
1.) If the Adapter discovers a new device than it automatically discovery additional channels if connection controll for this device ist set to on? Example: Mi Flora devices. So we have a kind of two phase process like in the zwave binding
2.) The range of the adapter (On my raspi 3 in a 19" Rack in my cellar) is limited. How could i extend the “range”. As far as i understand i could add a second bluetooth adapter using a long usb cable. To be honest that is not a feasible solution for me.
Hi @Dibbler42, thanks for that.
1.) For MiFlora devices you should not enable “Connection control”, please refer this article: https://github.com/sputnikdev/eclipse-smarthome-bluetooth-binding/blob/master/xiaomi.md
2.) The range of the internal bluetooth adapter is limited, especially if you put your PI into a casing and then into to something that could shield radio waves. I recommend using multiple adapters.
When you enable Connection control, the biding tries to establish a secure connection. This is a long process which can fail if some data packets get lost during establishing connection. For MiFlora sensors, it is absolutely not necessary to establish secure connection as all MiFlora sensors constantly advertise their data. Even if your sensors are far from your PI, some data packets will be received anyway (giving it is not very far), what I’m trying to say is that it is not critical for this type of devices to drop some packets, some of the packets will reach the adapter sooner or later. In other words, the interaction range (distance) is longer when the binding is listening advertised data comparing to establishing secure connection.
Thanks for the Flower Tipp. So do i understand it right, that the solution is to attach a usb cable and connect another adapter or two or some more. Perferably in a location that covers the whole house
Hi @Dibbler42, yep, a cable (passive extension cable 5m max, active extension cable 25m max) should improve BT range.
Ok tomorrow my BT extender Kit ist comming. In addition to that has someone tried a “usb over ip” extension?
I will try that an report later
Added a second adapter outside my 19" rack. Just plugged it in, new adapter appears, new bluetooths devices are apprearing.
@vkolotov That works great. Thanks for the binding
Now i will wait over night to see if my other mifloras will be recognized and all channels will be detected.
Next step: Install USB over IP and place some Blutooth dongles around the house