3rd Party Bluetooth Binding. Beta testers needed

Tags: #<Tag:0x00007f74533e7938> #<Tag:0x00007f74533e7820>

Hi i just connected my nineBot scooter its a genric device …
anyway to get battery info from it? it has an app…

Hi @vkolotov. Nice work done here with tis binding. It looks pretty good.

I have two tablets laying around my house as control panels using HABPanel. They are running rooted android LineageOS. It would be really nice if I could make use of the Bluetooth of those tablets to work with the binding, reporting to it, the reachable devices that are near them.
Do you think this could be done?

If you’re running Linux you should be able to use the built-in Bluetooth with this binding

i’ve recently re-installed linux that my OH runs on, and since then I’ve not been able to get bluetooth to work with OH - the adapters can’t be detected.

Bluetooth is installed. Doing ‘hcitool scan’ and ‘hcitool lescan’ from the commandline detects the adapter and nearby devices.

Is anyone able to give me some pointers please?

Same here. If you check the service something is not ok:

[14:23:21] openhabian@openHABianPi:~$ sudo systemctl status bluetooth
[sudo] password for openhabian:
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset
Active: active (running) since Sat 2019-07-13 14:21:48 CEST; 1min 58s ago
Docs: man:bluetoothd(8)
Main PID: 1622 (bluetoothd)
Status: “Running”
Tasks: 1 (limit: 4915)
CGroup: /system.slice/bluetooth.service
└─1622 /usr/libexec/bluetooth/bluetoothd

Jul 13 14:21:47 openHABianPi systemd[1]: Starting Bluetooth service…
Jul 13 14:21:48 openHABianPi bluetoothd[1622]: Bluetooth daemon 5.47
Jul 13 14:21:48 openHABianPi systemd[1]: Started Bluetooth service.
Jul 13 14:21:48 openHABianPi bluetoothd[1622]: Starting SDP server
Jul 13 14:21:48 openHABianPi bluetoothd[1622]: Bluetooth management interface 1.
Jul 13 14:21:48 openHABianPi bluetoothd[1622]: Failed to set privacy: Rejected (…

But if you restrt the service with: “sudo systemctl restart bluetooth” it is ok than…

Hi, i tried to make a NUT Mini “beep and blink” with

Immediate Alert / Alert Level
Link Loss / Alert Level

but it does not work.

With the original NUT App this works.

With nRF Connect two unkown services are showing up.
Maybe not the standard GATT characteristic is used?

Does this feature works for anyone with this binding?

Hi everyone,

I’m a long time OH user, but I’ve not ventured out to using bluetooth yet. Found this project and it seems interesting. Thanks to everyone who contributed! Forgive me if this has been covered before, but I couldn’t find it in search.

How is everyone setting up their BT adapters for presence detection in each room?

I haven’t tried out this binding yet, but based on what I understand from the readme, the binding is meant to be used with multiple adapters. However, I don’t quite understand how this would work. Are you meant to run USB extension cables to each room in the house? This wouldn’t work in large homes where wiring can be hard to run. Is there a way to get the adapters to mesh to each other wirelessly or via IP?

Thanks!

i have a small flat so i use only one…
but if needed to use another you can do USB over IP … to another PC
or just install OH on that PC, use a PI

you can also use extender cable if you have some holes in the wall

i use it to know when i arrived or gone but for room to room, i think the setup is little complected
maybe i will do zones one time

@Dibbler42 @vkolotov Was there ever any progress on the Primadonna Elite series of coffee makers? I have this unit since a couple of years, and it is kind of a missing link in my home automation :slight_smile: Could it be made to (at least) startup from oh?
Of is it simply not possible?

@vespaman i had no success with my primadonna class, but to be honest there are some other projects that are more important to me.

Hrm, USB over IP. Interesting idea. Thanks for the suggestions!

I did wind up installing this binding over the weekend to test it out on my odroid XU4, but didn’t have any luck. The discovery process starts, but no devices are ever found. I addressed all the items in the readme (downgrading to Bluez 5.47, turning on discovery, granting permissions to Bluez, etc), but no luck yet. The logs don’t seem to report any obvious errors after the “could not power adapter” issue was cleared.

I’ll have to play with it a bit more.

Hi all, i have a small Q
can we make BT keyboard work with the binding and send commands to OH?

this can be a very cool addon just 8$ and you get some really good looking keys
and its wireless out of the box :slight_smile:
did anyone do anything like this… i dont have a keyboard to test but i will buy if it works cheers

Hi,
Similar question here.
Could this binding enable a bluetooth remote control (like the Beoremote 1 BT) to trigger openHAB events/rules?
Thanks !

1 Like

Hi, I have problems getting work my Xiaomi Mijia Bluetooth Temperature Smart Humidity sensors.
I’m on a Rpi3 with Raspbian Stretch, BlueZ 5.43, bluetooth binding 1.1.6 and tinyb 1.1.3.
The first problem I have is that I’m able to discover my sensors only if they are less than 1 meter far from the Rpi, but this is another problem and I’ll try to solve it later.
The first time I succedeed in discovering the sensors I got the temperature and humidity channels (and even battery).
Now, after having removed and re-added the things, I don’t have anymore those channels.

Moreover, it is very often necessary to restart bluetooth to get new things in the inbox.
@vkolotov, could you please help me to go ahead?
TIA

Having trouble with a North (compatible with xiaomi miflora, apparently) device.
http://weliveupnorth.com/plant-monitor
It is working fine from the Xiaomi app, and can also see it with hcitool, but PaperUI doesn’t show it when scanning. MAC address is very similar to the official Miflora I do have.
It is also possible that scanning is not working for me, as it’s been a while since I’ve had to add a new bluetooth device

If you are on linux you can use the “linuxinput” binding to trigger on key events.
(Merged today, should show up in the snapshot builds soon).
Just pair the keyboard with bluez and use it as a normal keyboard.

Also the keyboard you linked is not in fact a bluetooth keyboard, it uses a custom receiver. It will work with the linuxinput binding, too.

Hi thank you
two Q,

  1. when you say its in the new snapshot, do i need update my OH setup?
    or i can take the files and put them somewhere?
  2. do i need some dongle to make bluez work ?
  3. can you link me a working keyboard and a dongle ?

Thanks

Dear,

i want to set up the gat services in de binding set up, but i save the i get an error;
==> /var/log/openhab2/openhab.log <==

2019-09-05 16:32:37.655 [ERROR] [ore.internal.binding.BindingResource] - Cannot update configuration for service bluetooth: Permission denied

java.io.IOException: Permission denied

at java.io.UnixFileSystem.createFileExclusively(Native Method) ~[?:?]

at java.io.File.createTempFile(File.java:2024) ~[?:?]

at org.apache.felix.cm.file.FilePersistenceManager._store(FilePersistenceManager.java:719) ~[?:?]

at org.apache.felix.cm.file.FilePersistenceManager.access$200(FilePersistenceManager.java:105) ~[?:?]

at org.apache.felix.cm.file.FilePersistenceManager$4.run(FilePersistenceManager.java:692) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:?]

at org.apache.felix.cm.file.FilePersistenceManager._privilegedStore(FilePersistenceManager.java:687) ~[?:?]

at org.apache.felix.cm.file.FilePersistenceManager.store(FilePersistenceManager.java:673) ~[?:?]

at org.apache.felix.cm.impl.persistence.CachingPersistenceManagerProxy.store(CachingPersistenceManagerProxy.java:291) ~[?:?]

at org.apache.felix.cm.impl.ConfigurationImpl.update(ConfigurationImpl.java:454) ~[?:?]

at org.apache.felix.cm.impl.ConfigurationAdapter.update(ConfigurationAdapter.java:145) ~[?:?]

at org.eclipse.smarthome.io.rest.core.config.ConfigurationService.update(ConfigurationService.java:132) ~[120:org.eclipse.smarthome.io.rest.core:0.10.0.oh240]

at org.eclipse.smarthome.io.rest.core.config.ConfigurationService.update(ConfigurationService.java:71) ~[120:org.eclipse.smarthome.io.rest.core:0.10.0.oh240]

at org.eclipse.smarthome.io.rest.core.internal.binding.BindingResource.updateConfiguration(BindingResource.java:167) [120:org.eclipse.smarthome.io.rest.core:0.10.0.oh240]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]

at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [172:org.glassfish.jersey.core.jersey-server:2.22.2]

at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [172:org.glassfish.jersey.core.jersey-server:2.22.2]

at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [172:org.glassfish.jersey.core.jersey-server:2.22.2]

at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [172:org.glassfish.jersey.core.jersey-server:2.22.2]

at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [172:org.glassfish.jersey.core.jersey-server:2.22.2]

at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [172:org.glassfish.jersey.core.jersey-server:2.22.2]

at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [172:org.glassfish.jersey.core.jersey-server:2.22.2]

at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [172:org.glassfish.jersey.core.jersey-server:2.22.2]

at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [172:org.glassfish.jersey.core.jersey-server:2.22.2]

at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [171:org.glassfish.jersey.core.jersey-common:2.22.2]

at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [171:org.glassfish.jersey.core.jersey-common:2.22.2]

at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [171:org.glassfish.jersey.core.jersey-common:2.22.2]

at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [171:org.glassfish.jersey.core.jersey-common:2.22.2]

at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [171:org.glassfish.jersey.core.jersey-common:2.22.2]

at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [171:org.glassfish.jersey.core.jersey-common:2.22.2]

at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [172:org.glassfish.jersey.core.jersey-server:2.22.2]

at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [172:org.glassfish.jersey.core.jersey-server:2.22.2]

at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) [169:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]

at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [169:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]

at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [169:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]

at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [169:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]

at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [169:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]

at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76) [20:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) [85:org.eclipse.jetty.servlet:9.4.11.v20180605]

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) [85:org.eclipse.jetty.servlet:9.4.11.v20180605]

at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [186:org.ops4j.pax.web.pax-web-jetty:7.2.3]

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [82:org.eclipse.jetty.security:9.4.11.v20180605]

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) [186:org.ops4j.pax.web.pax-web-jetty:7.2.3]

at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) [85:org.eclipse.jetty.servlet:9.4.11.v20180605]

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [186:org.ops4j.pax.web.pax-web-jetty:7.2.3]

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.server.Server.handle(Server.java:531) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [84:org.eclipse.jetty.server:9.4.11.v20180605]

at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [75:org.eclipse.jetty.io:9.4.11.v20180605]

at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [75:org.eclipse.jetty.io:9.4.11.v20180605]

at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [75:org.eclipse.jetty.io:9.4.11.v20180605]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [87:org.eclipse.jetty.util:9.4.11.v20180605]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [87:org.eclipse.jetty.util:9.4.11.v20180605]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [87:org.eclipse.jetty.util:9.4.11.v20180605]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [87:org.eclipse.jetty.util:9.4.11.v20180605]

at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [87:org.eclipse.jetty.util:9.4.11.v20180605]

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) [87:org.eclipse.jetty.util:9.4.11.v20180605]

at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) [87:org.eclipse.jetty.util:9.4.11.v20180605]

at java.lang.Thread.run(Thread.java:748) [?:?]

The reason is this: Can’t store name for private addressed device /org/bluez/hci0/dev_18_B4_30_EA_66_28

greatz tom

Hi! Is there any comprehensive instruction of installing and configuring tinyb/bluetooth/bluez and other prerequisites (e.g. for ubuntu) to be able to use this binding? I’m using CSR4.0 adapter. I’m kind of lost.

Hi,
first thanks for this amazing project. But i have still a few problems with pairing my devices. They connecting and disconnecting repeatedly. The openhab log showing me this line:
2019-09-12 12:16:57.864 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /00:15:83:F7:3B:F1/AC:9A:22:F1:6D:C8 / 4da46e : GDBus.Error:org.bluez.Error.Failed: Cancelled
When i try to pair with bluetoothctl i always get Failed to pair: org.bluez.Error.AuthenticationFailed
In the bluetoothctl printout it is showing me the device:
[NEW] Device AC:9A:22:F1:6D:C8 MiKettle
and after a few seconds:
[DEL] Device AC:9A:22:F1:6D:C8 MiKettle
This is going through an infinite loop.
Could you please help me? If you need more informations, let me know.

Thanks, Eric