3rd Party Bluetooth Binding. Beta testers needed

bluetooth
binding
Tags: #<Tag:0x00007fe0603a5118> #<Tag:0x00007fe0603a4f10>

(Vlad Kolotov) #847

Hi @Nanna_Agesen, this might be the case when newer version of Bluez broke something, try to downgrade to 4.47 please.

However, looking at this:

java.lang.IllegalStateException: Could not load native libraries for TinyB

What hardware you are running OH on? This is probably the cause.


(Vlad Kolotov) #848

I’m back and will try to find some time to work on this binding.
To sum up what issues we have at the moment:

  1. Serial ports get stolen. This is something to do with the library we use to discover serial ports. Unfortunately there is not much we can do apart from introducing a new setting that can disable autodiscovery of adapters. Once all adapters are added, this setting can be disabled so that the binding won’t interact with that library.
  2. Connection management. Some devices drop connection on purpose, e.g. if there are a lot of them, they try to release connection when not needed. There must be a setting that controls the way how we manage connections, e.g. it should be possible to establish connection only when needed (e.g. to read some info etc).
  3. Stale object recovery management. Again, due to Bluez/TinyB, some native objects get stale. Therefore the binding looks after TinyB objects and in case if they do not report any activity for some time, the binding releases/re-initialises them. This is a workaround, however this workaround sometimes causes some issues as well. When native objects get released, Bluez removes bonding info, which is not something we expect. Also, this causes some other issues with battery-less devices (Dolphin/EnOcean PTM 215B etc).

Anything else, let me know. This will keep me busy for some time.


(Thomas Bail) #849

I am using debian Buster testing in a virtual machine and running Bluez 5.50. So far it works with local connected and using usbip conneted bluetooth dongles


(Normann P Nielsen) #850

Hi,

Thanks - thats it - can se something now!! - awesome and thank for the assistance :slight_smile:

BR,

Normann


(Nanna Agesen) #851

@vkolotov

I’m already on Bluetooth daemon 5.44.

My openhab run on Centos 7.0 in virtual environment.


(Vlad Kolotov) #852

Hi @Nanna_Agesen, unfortunately, if it is a virtual environment, it is not going to work as the binding (transport pieces) tries to load some native libraries that can only work with native hardware. Some users use usb over IP or serial over IP solutions. Please search/read in this thread how to do this.


(Nanna Agesen) #853

@vkolotov I already use USB over TCP/IP - it works with the BlueGiga transport: 1.2.0.

I did hope to make it work with the TinyB transport as I have a bunch of Bluetooth dongles supporting only this.


(Lionello Marrelli) #854

Impossible to remove Bluetooth things, even if the binding is uninstalled

I am using an apt-get installed version of OpenHAB 2.4 on a raspberry pi v3 B with Stretch. I compiled the version 5.47 of bluez, following instructions in this thread.
I installed the binding and I succesfully found the internal radio (BlueZ 5.47) and a Xiaomi temperature sensor. By mistake I also added two generic bluetooth thing. Now I am unable to delete bluetooth things, even if the bluetooth bindings are uninstalled.
I tried installing and uninstalling the bluetooth bindings (the market on, of course).
I tried stopping openhab, clearing cache and I even tried removing the things from the Json text files.
This bluetooth things always reappear: where are they located?

In events.log I only find

2019-01-28 13:27:42.576 [hingStatusInfoChangedEvent] - 'bluetooth:ble:4C65A8D05ECE' changed from UNINITIALIZED to REMOVING

but the things always remains in place.

How can I clean my OpenHAB installation (without completely reinstalling from scratch)?
Thank you


(Bogdan P.) #855

Hello,
I bought a BT dongle compatible with my Qnap x86_64 NAS and tried to run the plugin.
I managed to install the bluez version 5.47 and compiled myself tinyb library from git.
I use an Openhab 2.4 from Qnapclub.eu that works pretty well.
The BT adapter discovery job fails…
> 7 2019-02-01 16:21:42.277 [DEBUG] [th.manager.impl.BluetoothManagerImpl] - Starting bluetooth manager: 8b095b9

	8	2019-02-01 16:21:42.343 [WARN ] [oth.internal.BluetoothHandlerFactory] - Extension folder does not exist, ignoring it: /home/pi/.bluetooth_smart
	9	2019-02-01 16:21:42.356 [DEBUG] [th.manager.impl.BluetoothManagerImpl] - Register tinyb transport
	10	2019-02-01 16:21:42.375 [WARN ] [th.manager.impl.BluetoothManagerImpl] - Adapter discovery job error
	11	java.lang.RuntimeException: Error getting object manager client: Could not connect: No such file or directory
	12	 at tinyb.BluetoothManager.getNativeAPIVersion(Native Method) ~[?:?]
	13	 at tinyb.BluetoothManager.getBluetoothManager(BluetoothManager.java:304) ~[?:?]
	14	 at org.sputnikdev.bluetooth.manager.transport.tinyb.TinyBFactory.getDiscoveredAdapters(TinyBFactory.java:162) ~[?:?]
	15	 at org.sputnikdev.bluetooth.manager.impl.BluetoothManagerImpl$AdapterDiscoveryJob.discoverAdapters(BluetoothManagerImpl.java:817) ~[?:?]
	16	 at org.sputnikdev.bluetooth.manager.impl.BluetoothManagerImpl$AdapterDiscoveryJob.run(BluetoothManagerImpl.java:810) ~[?:?]
	17	 at org.sputnikdev.bluetooth.manager.impl.BluetoothManagerImpl.scheduleDiscovery(BluetoothManagerImpl.java:853) ~[?:?]
	18	 at org.sputnikdev.bluetooth.manager.impl.BluetoothManagerImpl.lambda$registerFactory$1(BluetoothManagerImpl.java:126) ~[?:?]
	19	 at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[?:?]
	20	 at org.sputnikdev.bluetooth.manager.impl.BluetoothManagerImpl.registerFactory(BluetoothManagerImpl.java:124) ~[?:?]
	21	 at org.sputnikdev.esh.binding.bluetooth.internal.BluetoothHandlerFactory.registerBluetoothObjectFactory(BluetoothHandlerFactory.java:112) ~[?:?]
	22	 at org.sputnikdev.esh.binding.bluetooth.internal.BluetoothHandlerFactory.lambda$registerBluetoothObjectFactories$0(BluetoothHandlerFactory.java:174) ~[?:?]
	23	 at java.util.ArrayList.forEach(ArrayList.java:1257) [?:?]
	24	 at org.sputnikdev.esh.binding.bluetooth.internal.BluetoothHandlerFactory.registerBluetoothObjectFactories(BluetoothHandlerFactory.java:174) [215:org.sputnikdev.org.eclipse.smarthome.binding.bluetooth:1.1.6]
	25	 at org.sputnikdev.esh.binding.bluetooth.internal.BluetoothHandlerFactory.activate(BluetoothHandlerFactory.java:69) [215:org.sputnikdev.org.eclipse.smarthome.binding.bluetooth:1.1.6]
	26	 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	27	 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	28	 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	29	 at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	30	 at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) [39:org.apache.felix.scr:2.1.2]
	31	 at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) [39:org.apache.felix.scr:2.1.2]
	32	 at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) [39:org.apache.felix.scr:2.1.2]
	33	 at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [39:org.apache.felix.scr:2.1.2]
	34	 at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317) [39:org.apache.felix.scr:2.1.2]
	35	 at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307) [39:org.apache.felix.scr:2.1.2]
	36	 at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:334) [39:org.apache.felix.scr:2.1.2]
	37	 at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:114) [39:org.apache.felix.scr:2.1.2]
	38	 at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:947) [39:org.apache.felix.scr:2.1.2]
	39	 at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:919) [39:org.apache.felix.scr:2.1.2]
	40	 at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:863) [39:org.apache.felix.scr:2.1.2]
	41	 at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212) [?:?]
	42	 at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	43	 at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210) [?:?]
	44	 at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111) [?:?]
	45	 at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45) [?:?]
	46	 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:508) [?:?]
	47	 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:461) [?:?]
	48	 at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:624) [?:?]
	49	 at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:73) [39:org.apache.felix.scr:2.1.2]
	50	 at org.apache.felix.scr.impl.inject.BindParameters.getServiceObject(BindParameters.java:47) [39:org.apache.felix.scr:2.1.2]
	51	 at org.apache.felix.scr.impl.inject.methods.BindMethod.getServiceObject(BindMethod.java:662) [39:org.apache.felix.scr:2.1.2]
	52	 at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2304) [39:org.apache.felix.scr:2.1.2]
	53	 at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1801) [39:org.apache.felix.scr:2.1.2]
	54	 at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1784) [39:org.apache.felix.scr:2.1.2]
	55	 at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:409) [39:org.apache.felix.scr:2.1.2]
	56	 at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:333) [39:org.apache.felix.scr:2.1.2]
	57	 at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:302) [39:org.apache.felix.scr:2.1.2]
	58	 at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) [39:org.apache.felix.scr:2.1.2]
	59	 at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) [39:org.apache.felix.scr:2.1.2]
	60	 at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) [39:org.apache.felix.scr:2.1.2]
	61	 at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) [39:org.apache.felix.scr:2.1.2]
	62	 at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) [39:org.apache.felix.scr:2.1.2]
	63	 at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) [39:org.apache.felix.scr:2.1.2]
	64	 at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) [?:?]
	65	 at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) [?:?]
	66	 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	67	 at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?]
	68	 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) [?:?]
	69	 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) [?:?]
	70	 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) [?:?]
	71	 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) [?:?]
	72	 at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) [?:?]
	73	 at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:891) [39:org.apache.felix.scr:2.1.2]
	74	 at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:877) [39:org.apache.felix.scr:2.1.2]
	75	 at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [39:org.apache.felix.scr:2.1.2]
	76	 at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:944) [39:org.apache.felix.scr:2.1.2]
	77	 at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:727) [39:org.apache.felix.scr:2.1.2]
	78	 at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:661) [39:org.apache.felix.scr:2.1.2]
	79	 at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:427) [39:org.apache.felix.scr:2.1.2]
	80	 at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) [39:org.apache.felix.scr:2.1.2]
	81	 at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:339) [39:org.apache.felix.scr:2.1.2]
	82	 at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:381) [39:org.apache.felix.scr:2.1.2]
	83	 at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) [39:org.apache.felix.scr:2.1.2]
	84	 at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:263) [39:org.apache.felix.scr:2.1.2]
	85	 at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [39:org.apache.felix.scr:2.1.2]
	86	 at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [39:org.apache.felix.scr:2.1.2]
	87	 at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [39:org.apache.felix.scr:2.1.2]
	88	 at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) [?:?]
	89	 at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) [?:?]
	90	 at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [?:?]
	91	 at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [?:?]
	92	 at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908) [?:?]
	93	 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	94	 at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?]
	95	 at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [?:?]
	96	 at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [?:?]
	97	 at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [?:?]
	98	 at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168) [?:?]
	99	 at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [?:?]
	100	 at org.eclipse.osgi.container.Module.start(Module.java:467) [?:?]
	101	 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) [?:?]
	102	 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) [?:?]
	103	 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) [?:?]
	104	 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) [?:?]
	105	 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [?:?]
	106	 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	107	 at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]
	108	2019-02-01 16:21:42.442 [WARN ] [th.manager.impl.BluetoothManagerImpl] - Device discovery job error
	109	java.lang.RuntimeException: Error getting object manager client: Could not connect: No such file or directory
	110	 at tinyb.BluetoothManager.getNativeAPIVersion(Native Method) ~[?:?]
	111	 at tinyb.BluetoothManager.getBluetoothManager(BluetoothManager.java:304) ~[?:?]
	112	 at org.sputnikdev.bluetooth.manager.transport.tinyb.TinyBFactory.getDiscoveredDevices(TinyBFactory.java:175) ~[?:?]
	113	 at org.sputnikdev.bluetooth.manager.impl.BluetoothManagerImpl$DeviceDiscoveryJob.discoverDevices(BluetoothManagerImpl.java:723) ~[?:?]
	114	 at org.sputnikdev.bluetooth.manager.impl.BluetoothManagerImpl$DeviceDiscoveryJob.run(BluetoothManagerImpl.java:716) ~[?:?]
	115	 at org.sputnikdev.bluetooth.manager.impl.BluetoothManagerImpl.scheduleDiscovery(BluetoothManagerImpl.java:858) ~[?:?]
	116	 at org.sputnikdev.bluetooth.manager.impl.BluetoothManagerImpl.lambda$registerFactory$1(BluetoothManagerImpl.java:126) ~[?:?]
	117	 at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[?:?]
	118	 at org.sputnikdev.bluetooth.manager.impl.BluetoothManagerImpl.registerFactory(BluetoothManagerImpl.java:124) ~[?:?]
	119	 at org.sputnikdev.esh.binding.bluetooth.internal.BluetoothHandlerFactory.registerBluetoothObjectFactory(BluetoothHandlerFactory.java:112) ~[?:?]
	120	 at org.sputnikdev.esh.binding.bluetooth.internal.BluetoothHandlerFactory.lambda$registerBluetoothObjectFactories$0(BluetoothHandlerFactory.java:174) ~[?:?]
	121	 at java.util.ArrayList.forEach(ArrayList.java:1257) [?:?]
	122	 at org.sputnikdev.esh.binding.bluetooth.internal.BluetoothHandlerFactory.registerBluetoothObjectFactories(BluetoothHandlerFactory.java:174) [215:org.sputnikdev.org.eclipse.smarthome.binding.bluetooth:1.1.6]
	123	 at org.sputnikdev.esh.binding.bluetooth.internal.BluetoothHandlerFactory.activate(BluetoothHandlerFactory.java:69) [215:org.sputnikdev.org.eclipse.smarthome.binding.bluetooth:1.1.6]
	124	 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	125	 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	126	 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	127	 at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	128	 at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) [39:org.apache.felix.scr:2.1.2]
	129	 at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) [39:org.apache.felix.scr:2.1.2]
	130	 at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) [39:org.apache.felix.scr:2.1.2]
	131	 at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [39:org.apache.felix.scr:2.1.2]
	132	 at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317) [39:org.apache.felix.scr:2.1.2]
	133	 at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307) [39:org.apache.felix.scr:2.1.2]
	134	 at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:334) [39:org.apache.felix.scr:2.1.2]
	135	 at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:114) [39:org.apache.felix.scr:2.1.2]
	136	 at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:947) [39:org.apache.felix.scr:2.1.2]
	137	 at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:919) [39:org.apache.felix.scr:2.1.2]
	138	 at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:863) [39:org.apache.felix.scr:2.1.2]
	139	 at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212) [?:?]
	140	 at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	141	 at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210) [?:?]
	142	 at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111) [?:?]
	143	 at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45) [?:?]
	144	 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:508) [?:?]
	145	 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:461) [?:?]
	146	 at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:624) [?:?]
	147	 at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:73) [39:org.apache.felix.scr:2.1.2]
	148	 at org.apache.felix.scr.impl.inject.BindParameters.getServiceObject(BindParameters.java:47) [39:org.apache.felix.scr:2.1.2]
	149	 at org.apache.felix.scr.impl.inject.methods.BindMethod.getServiceObject(BindMethod.java:662) [39:org.apache.felix.scr:2.1.2]
	150	 at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2304) [39:org.apache.felix.scr:2.1.2]
	151	 at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1801) [39:org.apache.felix.scr:2.1.2]
	152	 at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1784) [39:org.apache.felix.scr:2.1.2]
	153	 at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:409) [39:org.apache.felix.scr:2.1.2]
	154	 at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:333) [39:org.apache.felix.scr:2.1.2]
	155	 at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:302) [39:org.apache.felix.scr:2.1.2]
	156	 at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) [39:org.apache.felix.scr:2.1.2]
	157	 at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) [39:org.apache.felix.scr:2.1.2]
	158	 at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) [39:org.apache.felix.scr:2.1.2]
	159	 at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) [39:org.apache.felix.scr:2.1.2]
	160	 at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) [39:org.apache.felix.scr:2.1.2]
	161	 at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) [39:org.apache.felix.scr:2.1.2]
	162	 at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) [?:?]
	163	 at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) [?:?]
	164	 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	165	 at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?]
	166	 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) [?:?]
	167	 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) [?:?]
	168	 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) [?:?]
	169	 at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) [?:?]
	170	 at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) [?:?]
	171	 at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:891) [39:org.apache.felix.scr:2.1.2]
	172	 at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:877) [39:org.apache.felix.scr:2.1.2]
	173	 at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [39:org.apache.felix.scr:2.1.2]
	174	 at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:944) [39:org.apache.felix.scr:2.1.2]
	175	 at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:727) [39:org.apache.felix.scr:2.1.2]
	176	 at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:661) [39:org.apache.felix.scr:2.1.2]
	177	 at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:427) [39:org.apache.felix.scr:2.1.2]
	178	 at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) [39:org.apache.felix.scr:2.1.2]
	179	 at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:339) [39:org.apache.felix.scr:2.1.2]
	180	 at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:381) [39:org.apache.felix.scr:2.1.2]
	181	 at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) [39:org.apache.felix.scr:2.1.2]
	182	 at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:263) [39:org.apache.felix.scr:2.1.2]
	183	 at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [39:org.apache.felix.scr:2.1.2]
	184	 at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [39:org.apache.felix.scr:2.1.2]
	185	 at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [39:org.apache.felix.scr:2.1.2]
	186	 at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) [?:?]
	187	 at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) [?:?]
	188	 at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [?:?]
	189	 at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [?:?]
	190	 at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908) [?:?]
	191	 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	192	 at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?]
	193	 at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [?:?]
	194	 at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [?:?]
	195	 at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [?:?]
	196	 at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168) [?:?]
	197	 at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [?:?]
	198	 at org.eclipse.osgi.container.Module.start(Module.java:467) [?:?]
	199	 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) [?:?]
	200	 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) [?:?]
	201	 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) [?:?]
	202	 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) [?:?]
	203	 at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [?:?]
	204	 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	205	 at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]`Preformatted text`

Openhab runs with admin user, so everything seems to be ok…

16919 admin 448856 S /opt/QJDK8/bin/java -Dopenhab.home=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab -Dopenhab.conf=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/conf -Dopenhab.runtime=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/runtime -Dopenhab.userdata=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/userdata -Dopenhab.logdir=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/userdata/logs -Dfelix.cm.dir=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/userdata/config -Djava.library.path=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/userdata/tmp/lib -Djetty.host=0.0.0.0 -Djetty.http.compliance=RFC2616 -Dorg.ops4j.pax.web.listening.addresses=0.0.0.0 -Dorg.osgi.service.http.port=58288 -Dorg.osgi.service.http.port.secure=58243 -Djava.awt.headless=true -XX:+UseG1GC -Djava.endorsed.dirs=/opt/QJDK8/jre/lib/endorsed:/opt/QJDK8/lib/endorsed:/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/runtime/lib/endorsed -Djava.ext.dirs=/opt/QJDK8/jre/lib/ext:/opt/QJDK8/lib/ext:/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/runtime/lib/ext -Dkaraf.instances=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/userdata/tmp/instances -Dkaraf.home=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/runtime -Dkaraf.base=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/userdata -Dkaraf.data=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/userdata -Dkaraf.etc=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/userdata/etc -Dkaraf.logs=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/userdata/logs -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/userdata/tmp -Djava.util.logging.config.file=/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/userdata/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/runtime/lib/boot/activation-1.1.1.jar:/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/runtime/lib/boot/jaxb-api-2.3.0.jar:/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/runtime/lib/boot/jaxb-core-2.2.11.jar:/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/runtime/lib/boot/jaxb-impl-2.2.11.jar:/share/CE_CACHEDEV1_DATA/.qpkg/OpenHab/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.
26

It uses the tinyb.so library that I’ve build (it passes the error not loading library…)

Any advice?
Seems to be a problem with permissions … but runs as admin …

The Music station in Qnap is able to list bluetooth devices in the neighbourhood…


(Aaron) #856

Hi everyone hoping for some tips

I’m trying this binding out for the first time and i’m running on rpi3 b+ with onboard bluetooth. OH v 2.4

installed the binding found my android phone in the discovery window added the thing created the item it added fine and updated too

2019-02-02 22:27:42.060 [vent.ItemStateChangedEvent] - AaronsPhoneBluetooth_RSSI changed from NULL to -82

but the value never changed after that or didnt change when turning off the bluetooth same behavior for a smart tv

how often should the signal strength change and should i notice when the device is gone / bluetooth off

any suggestions welcome

I also tried too find my smart watch but did not find it


(vossivossi) #857

Modern mobile phones change their Bluetooth MAC Address very often for anonymization purposes. So it does not make sense to set up your mobile phone as a device as it will not be rediscovered after a very short time (couple of minutes). This only makes sense with devices like sensors and alike. I am using the binding and it works great, but not with the temporary Mac addresses from mobile phones.


(Aaron) #858

Hi @vossivossi thanks for the quick reply

Thats fair enough is that the same for smart watches ? connected too the phone using Bluetooth i tried too find mine but it didn’t show up

but why is the TV with bluetooth behaving the same the value on that hasen’t changed either


(vossivossi) #859

My TV with bluetooth shows up constantly, also my Xiaomi Mijia Bluetooth Temperature Smart Humidity Sensors. I do not have any experiences with bluetooth enabled smart waches.


(Aaron) #860

what tv are you using im trying with samsung


(vossivossi) #861

I have a Sony


(Aaron) #862

my tv hasen’t updated its signal for over 11 mins how often does yours report changes ?


(vossivossi) #863

Most Bluetooth devices flood the environment with messages, so every couple of seconds would be normal. The update interval of the binding seems to be 5 to 10 seconds as I can see from my persistence data:
grafik


(Aaron) #864

so off that it would seem that somethings not quite working properly as im only getting the 1 update and then nothing


(vossivossi) #865

Yes, looks like it is not working. But do you really use the 3rd party binding (only installable by Eclipse marketplace) or the official one? I had the same problems like you with the so called official one (but which indeed is just scrap).


(Aaron) #866

I installed from PaperUI

Bluetooth Binding

binding-bluetooth - 2.4.0