3rd Party Bluetooth Binding. Beta testers needed

bluetooth
binding
Tags: #<Tag:0x00007fe05fbcae70> #<Tag:0x00007fe05fbca970>

(Thomas Bail) #827

But this only works with Bluetooth and not BLE that is a short range thing?


(Christoph) #828

BLE max. transmission power is 10 mW (with Bluetooth 5 100 mW). So it should be able to range approximately 40m. The only question is: Is there a BLE usb stick, that has 10 mW? I don’t know. Maybe this one.


(Christoph) #829

@Dibbler42 I’ve ordered one. I let you know, if it extends BLE range.


(G) #830

Seeing two versions available, with a different antenna. I guess this is just a different connector type?

LM251 rP-SMA RP
and
LM251 rP-SMA JK AO

Generally any preference?


(Christian) #831

Looking for a bluetooth stick I also found the LM1010 and started to google the device. leads me back to this topic :slight_smile:

@Syn
I’m looking forward your testresults :slight_smile:


(Daniel N.) #832

Hello,

i get some warns untile the system start:

==> /var/log/openhab2/openhab.log <==

2019-01-19 11:36:44.468 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AdapterHandler of thing bluetooth:adapter:B827EB072B90 tried checking if channel discovering is linked although the handler was already disposed.

2019-01-19 11:36:44.472 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AdapterHandler of thing bluetooth:adapter:B827EB072B90 tried checking if channel discovering-control is linked although the handler was already disposed.

==> /var/log/openhab2/events.log <==

2019-01-19 11:36:44.498 [hingStatusInfoChangedEvent] - ‘bluetooth:adapter:B827EB072B90’ changed from UNINITIALIZED to INITIALIZING

2019-01-19 11:36:44.539 [hingStatusInfoChangedEvent] - ‘bluetooth:adapter:B827EB072B90’ changed from INITIALIZING to ONLINE

==> /var/log/openhab2/openhab.log <==

2019-01-19 11:36:44.538 [WARN ] [.core.thing.binding.BaseThingHandler] - BaseThingHandler.initialize() will be removed soon, ThingStatus can be set manually via updateStatus(ThingStatus.ONLINE)

==> /var/log/openhab2/events.log <==

2019-01-19 11:36:44.559 [vent.ItemStateChangedEvent] - BTAdapter_Discovering changed from NULL to OFF

2019-01-19 11:36:44.564 [vent.ItemStateChangedEvent] - BTAdapter_DiscoveringControl changed from NULL to OFF

2019-01-19 11:36:44.571 [hingStatusInfoChangedEvent] - ‘bluetooth:adapter:B827EB072B90’ changed from ONLINE to OFFLINE

==> /var/log/openhab2/openhab.log <==

2019-01-19 11:36:44.614 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808EF9C8 tried checking if channel online is linked although the handler was already disposed.

2019-01-19 11:36:44.618 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808EF9C8 tried checking if channel last-updated is linked although the handler was already disposed.

2019-01-19 11:36:44.622 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808EF9C8 tried checking if channel rssi is linked although the handler was already disposed.

2019-01-19 11:36:44.626 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808EF9C8 tried checking if channel tx-power is linked although the handler was already disposed.

2019-01-19 11:36:44.630 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808EF9C8 tried checking if channel estimated-distance is linked although the handler was already disposed.

2019-01-19 11:36:44.633 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808EF9C8 tried checking if channel adapter is linked although the handler was already disposed.

2019-01-19 11:36:44.638 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808EF9C8 tried checking if channel location is linked although the handler was already disposed.

2019-01-19 11:36:44.643 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808EF9C8 tried checking if channel connected is linked although the handler was already disposed.

2019-01-19 11:36:44.647 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808EF9C8 tried checking if channel connection-control is linked although the handler was already disposed.

2019-01-19 11:36:44.650 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808EF9C8 tried checking if channel connected-adapter is linked although the handler was already disposed.

2019-01-19 11:36:44.655 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808EF9C8 tried checking if channel authenticated is linked although the handler was already disposed.

==> /var/log/openhab2/events.log <==

2019-01-19 11:36:44.741 [hingStatusInfoChangedEvent] - ‘bluetooth:ble:7C2F808EF9C8’ changed from UNINITIALIZED to INITIALIZING

2019-01-19 11:36:44.806 [hingStatusInfoChangedEvent] - ‘bluetooth:ble:7C2F808EF9C8’ changed from INITIALIZING to ONLINE

==> /var/log/openhab2/openhab.log <==

2019-01-19 11:36:44.804 [WARN ] [.core.thing.binding.BaseThingHandler] - BaseThingHandler.initialize() will be removed soon, ThingStatus can be set manually via updateStatus(ThingStatus.ONLINE)

2019-01-19 11:36:44.829 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808F0B3D tried checking if channel online is linked although the handler was already disposed.

2019-01-19 11:36:44.833 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808F0B3D tried checking if channel last-updated is linked although the handler was already disposed.

2019-01-19 11:36:44.838 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808F0B3D tried checking if channel rssi is linked although the handler was already disposed.

==> /var/log/openhab2/events.log <==

2019-01-19 11:36:44.841 [hingStatusInfoChangedEvent] - ‘bluetooth:ble:7C2F808EF9C8’ changed from ONLINE to OFFLINE

==> /var/log/openhab2/openhab.log <==

2019-01-19 11:36:44.842 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808F0B3D tried checking if channel tx-power is linked although the handler was already disposed.

2019-01-19 11:36:44.846 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808F0B3D tried checking if channel estimated-distance is linked although the handler was already disposed.

==> /var/log/openhab2/events.log <==

2019-01-19 11:36:44.848 [vent.ItemStateChangedEvent] - nogone_tag changed from NULL to OFF

==> /var/log/openhab2/openhab.log <==

2019-01-19 11:36:44.850 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808F0B3D tried checking if channel adapter is linked although the handler was already disposed.

2019-01-19 11:36:44.854 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808F0B3D tried checking if channel location is linked although the handler was already disposed.

2019-01-19 11:36:44.859 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808F0B3D tried checking if channel connected is linked although the handler was already disposed.

2019-01-19 11:36:44.863 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808F0B3D tried checking if channel connection-control is linked although the handler was already disposed.

2019-01-19 11:36:44.866 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808F0B3D tried checking if channel connected-adapter is linked although the handler was already disposed.

2019-01-19 11:36:44.870 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:7C2F808F0B3D tried checking if channel authenticated is linked although the handler was already disposed.

==> /var/log/openhab2/events.log <==

2019-01-19 11:36:44.905 [hingStatusInfoChangedEvent] - ‘bluetooth:ble:7C2F808F0B3D’ changed from UNINITIALIZED to INITIALIZING

==> /var/log/openhab2/openhab.log <==

2019-01-19 11:36:44.911 [WARN ] [.core.thing.binding.BaseThingHandler] - BaseThingHandler.initialize() will be removed soon, ThingStatus can be set manually via updateStatus(ThingStatus.ONLINE)

Does anyone know where the problem is? Binding and BLE detection works


(Christoph) #833

@Dibbler42 @ChrisM @ggg
I have now the LM 1010-0972 USB Adapter and the LM 251-1022 2 dBi Omni Directional Antenna.

After a quick test it’s a bit disappointing: The LM1010 has the same Broadcom chipset as my previous adapter (Kinivo btd-400 with BCM20702A0 Bluetooth 4.0). So the LM1010 is also only class 2. Thus in generell there is no range gain. But it is more stable. With the Kinivo stick rssi values from my Xiaomi BLE Hygro-/Thermometer jumped between -79db and -88db (mostly around -83db). The LM1010 is pretty stable at -79db or -80db. Playing with the antenna positioning could get another 1 or 2 db. So I think the only advantage is the external antenna.
Beside that the LM is a lot bigger than the Kinivo.


(G) #834

I know it’s difficult to say, but what range in meters are you getting to the xiaomi thermometers? With built-in BLE on Raspberry 3 I’m getting around 7-8 meters through a brick wall. Do you expect it’d get any better?


(JT) #835

Do anyone have a problem with the Xaiomi Thermometer reporting 655x.x C when it goes below 0? I can see that the sensor is still reporting the correct temperature on the display. But the information reported to OH shows 6552.8C and it actually changes based on the temperature detected. Once it goes to 0+(Above -1) it reports the correct temp.

Humidity isn’t a problem


(Christoph) #836

I‘ve tested it. I have a Xiaomi BLE that had with Raspberry 3‘s built-in BLE always -97db and worse. It also lost connection quite often. With the LM1010 plugged into the Raspberry 3 now it’s stable at -90db. So there is a little advantage regarding the range. The Binding indicates 7m.


(Normann P Nielsen) #837

I simply can find the bindings as instructed in https://github.com/sputnikdev/eclipse-smarthome-bluetooth-binding/blob/master/installation.md

I have tried all settings for maturety level etc - but the bindings never shows up from the market, only the “built in” BT binding


(Christoph) #838

Have you installed the Eclipse IoT Market (Add-ons --> MISC)?


(Normann P Nielsen) #839

DOH - I need to press “Save” in the Marketplace setting … my bad. No warning even when a setting is changed and the user leaves the window…


(Normann P Nielsen) #840

OK, BT enabled:

root@robin:/dev# sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2019-01-22 18:44:10 UTC; 8min ago
Docs: man:bluetoothd(8)
Main PID: 20708 (bluetoothd)
Status: “Running”
Tasks: 1 (limit: 3930)
CGroup: /system.slice/bluetooth.service
└─20708 /usr/lib/bluetooth/bluetoothd

Jan 22 18:44:10 robin systemd[1]: Starting Bluetooth service…
Jan 22 18:44:10 robin bluetoothd[20708]: Bluetooth daemon 5.48
Jan 22 18:44:10 robin systemd[1]: Started Bluetooth service.
Jan 22 18:44:10 robin bluetoothd[20708]: Starting SDP server
Jan 22 18:44:11 robin bluetoothd[20708]: Bluetooth management interface 1.14 initialized
root@robin:/dev#

But the binding fails with

Bluetooth BlueZ Adapter - BlueZ JNI connection cannot be established.

Setting the address for the thing to: F0:03:8C:61:7E:2E


I have done:

      root@robin:/dev# sudo usermod -a -G bluetooth openhab

root@robin:/dev# sudo systemctl daemon-reload
root@robin:/dev# sudo systemctl restart bluetooth

and restarted openhab2

I can see the error coming from https://github.com/eclipse/smarthome/blob/master/extensions/binding/org.eclipse.smarthome.binding.bluetooth.bluez/src/main/java/org/eclipse/smarthome/binding/bluetooth/bluez/handler/BlueZBridgeHandler.java

BR,

Normann


(Vlad Kolotov) #841

Hi @Normann_P_Nielsen, you are still running the official bindings, uninstall it and install 3rd party from the market.

This src/main/java/org/eclipse/smarthome/binding/bluetooth/bluez/handler/BlueZBridgeHandler.java package does not belong to the 3rd party binding.


(Vlad Kolotov) #842

Good to know @Syn, thank you very much for your input.


(Vlad Kolotov) #843

Hi @tebore, thanks for reporting this, you are the first who noticed this. A new issue has been created: https://github.com/sputnikdev/eclipse-smarthome-bluetooth-binding/issues/78


(Vlad Kolotov) #844

Hi @Nognog, please disregard those warning, as long as the binding works fine, it is ok to have it. Some work needs to be done to migrate from OH 2.2.


(Vlad Kolotov) #845

To everyone here.

Regarding Bluez version. It is a know fact that the 5.47 version is stable. Bluez team keeps adding some new feature and breaking existing features. For example, 5.48 no longer provides battery service/characteristcs. Also it less stable for connected devices and takes longer time to establish a connection. There is not nay proper bug tracking system for Bluez, it is very difficult to talk to dev guys as you can only send email to a linux group, which is just ridiculous. We all hope that things will change one day, or Bluez will be replaced by something else.

Just in general, BleGiga adapters/transport is more stable comparing to Bluez/TinyB as we have more freedom to fix bugs and less moving parts.

Having said that, if you want to test newer versions of Bluez, you are welcome. Please report how it goes.


(Vlad Kolotov) #846

Hi @Grzegorz_Golec, could you please double check if your sensors have same/different MAC addresses? This seems to me the case.