sputnikdev / eclipse-smarthome-bluetooth-binding

Eclipse SmartHome Bluetooth Binding
46 stars 10 forks source link

Add support for Paulmann smart lights #66

Open vkolotov opened 5 years ago

vkolotov commented 5 years ago

@Andre_Lerche wrote:

I’m currently trying to add my Paulmann bluetooth lamps into openhab. Actually it is working fine, your bluetooth module is working perfectly. But unfortunately the lamps or better the protocol is a bit special. I’m not an expert in bluetooth things, but well, to make a long story short. First of all before being able to control the lamps I have to provide a password. After that I can control them, currently I do it via pygatt in a simple python script. It looks like this:

    #!/usr/bin/python3

    import pygatt
    import sys

    UUID_PWD   = "0000ffba-0000-1000-8000-00805f9b34fb"
    UUID_ONOFF = "0000ffb7-0000-1000-8000-00805f9b34fb"
    UUID_DIMM  = "0000ffb8-0000-1000-8000-00805f9b34fb"

    DEVICES = {}

    DEVICES["WOHNZIMMER_FENSTER"]  = "F4:5E:AB:B8:AB:61"
    DEVICES["WOHNZIMMER_HINTEN"]   = "F4:5E:AB:B8:AD:CE"
    DEVICES["WOHNZIMMER_MITTE"]    = "F4:5E:AB:B8:9D:3E"
    DEVICES["WOHNZIMMER_VORN"]     = "F4:5E:AB:B8:9E:DF"
    DEVICES["WOHNZIMMER_ESSTISCH"] = "F4:5E:AB:B8:AB:64"
    DEVICES["WOHNZIMMER_WAND"]     = "F4:5E:AB:B8:9F:E6"
    DEVICES["EINGANG"]             = "F4:5E:AB:B8:A5:40"

    devicename = sys.argv[1]
    command = sys.argv[2]
    param = sys.argv[3]

    def sendPassword (device):
        device.char_write (UUID_PWD, bytearray([0x30, 0x30, 0x30, 0x30]))

    def sendOnOff (device, on):
        print (device.char_read(UUID_ONOFF))
        if on == "on":
            device.char_write (UUID_ONOFF, bytearray([0x01]))
        else:
            device.char_write (UUID_ONOFF, bytearray([0x00]))

    def sendDimm (device, value):
        print (device.char_read(UUID_DIMM))
        device.char_write (UUID_DIMM, bytearray([int(value)]))

    try:
        adapter = pygatt.backends.GATTToolBackend()
        adapter.start()
        i = 0
        connected = False
        while i < 5:
            try:
                device = adapter.connect(DEVICES[devicename])
                connected = True
                break
            except:
                pass

            i += 1

        if connected == False:
            print ("unable to connect to "+devicename)
            exit(1)

        sendPassword(device)

        if command == "ONOFF":
            sendOnOff(device, param)

        if command == "DIMM":
            sendDimm(device, param)

    finally:
        adapter.stop()

Any chance to have such device directly supported by your bluetooth module?

vkolotov commented 5 years ago

Hi @Andre_Lerche, it looks that it is quite easy to add support for your device.

Are you sure that your python script works for all of your devices. I believe there is a bug in it. It seems to me the only last device in the list gets updated in that script because the logic to control BT device is out of your while loop (not properly indented).

Anyway, we could add GATT specs for you easily. However, there is some work going at the moment that is related to connection management (disconnect after work is done, so connection is released and the released connection can be used for next device). Having said that, you might not be able to control all of your bulbs at the moment, this really depends on how many connections (or home many adapters you have) your adapter can keep open simultaneously.

papermoon1978 commented 5 years ago

Hi @vkolotov

Great, sounds good. Well, the script works fine for me. I just call it with one of the lamps each. And the while loop is just a dirty workaround, because pygatt sometimes cannot connect to the lamp specified - for whatever reason. A second later it's working fine. Because of that I try the connection 5 times until I give up. Let me find out the UUID for the color temperature. Usually I never need that, but in your implementation this should be supported. This is all the lamps can do: on/off, dimm, temperature. There are other Paulmann lamps available supporting RGBW, but I don't own any of such.

Thanks again :-)

vkolotov commented 5 years ago

Hi Andre,

could you please enable this setting? image

Add your bulb from inbox.

Set pincode/password for your added device:

0000ffba-0000-1000-8000-00805f9b34fb=[30, 30, 30, 30] 

Like that: image

Enable connection control for it.

image

Once it is enabled, it should establish connection to the device and add some channels, these ones:

UUID_PWD   = "0000ffba-0000-1000-8000-00805f9b34fb"
UUID_ONOFF = "0000ffb7-0000-1000-8000-00805f9b34fb"
UUID_DIMM  = "0000ffb8-0000-1000-8000-00805f9b34fb"

See if you can control ONOFF channel by setting to it whatever you use as third argument (I assume it is 0 (OFF) and 1 (ON)), like that:

image

Note that 0000dda3-0000-1000-8000-00805f9b34fb is used as example, you should use 0000ffb7-0000-1000-8000-00805f9b34fb channel instead.

Please report how it goes.

vkolotov commented 5 years ago

@papermoon1978, please see my comment ^^

papermoon1978 commented 5 years ago

@vkolotov

Thank you for this. :-) The properties are available now, but the values are not shown. Also, it doesn't work to write values. This is what I get in the log

2018-10-22 23:21:03.270 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb7-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-22 23:21:03.270 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000180a-0000-1000-8000-00805f9b34fb/00002a2a-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.Failed: Not connected
2018-10-22 23:21:03.271 [WARN ] [bluetooth.handler.GattChannelHandler] - Attribute value is empty: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000180a-0000-1000-8000-00805f9b34fb/00002a29-0000-1000-8000-00805f9b34fb
2018-10-22 23:21:03.268 [WARN ] [bluetooth.handler.GattChannelHandler] - Attribute value is empty: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000180a-0000-1000-8000-00805f9b34fb/00002a24-0000-1000-8000-00805f9b34fb
2018-10-22 23:21:03.276 [WARN ] [bluetooth.handler.GattChannelHandler] - Attribute value is empty: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000180a-0000-1000-8000-00805f9b34fb/00002a25-0000-1000-8000-00805f9b34fb
2018-10-22 23:21:03.296 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000180a-0000-1000-8000-00805f9b34fb/00002a2a-0000-1000-8000-00805f9b34fb : Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000180a-0000-1000-8000-00805f9b34fb/00002a2a-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.Failed: Not connected
2018-10-22 23:21:03.300 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000180a-0000-1000-8000-00805f9b34fb/00002a2a-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.Failed: Not connected
vkolotov commented 5 years ago

Just double checking, have you set up pin code as I mentioned earlier?

vkolotov commented 5 years ago

What version of Bluez do you use? Can you please run this?

bluetoothctl --version
papermoon1978 commented 5 years ago

I guess you where right, I checked the wrong device. Sorry :-(

I gave it another shot today morning, but all the devices are shown offline while they are online. I can find them using hcitool and can access and control them via gatt. This is what I can see in the log:

2018-10-23 08:39:03.904 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE / 1987204 : Zeitüberschreitung wurde erreicht
2018-10-23 08:39:07.765 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /B8:27:EB:02:15:37 / 8af1a6 : GDBus.Error:org.bluez.Error.InProgress: Operation already in progress

"Zeitüberschreitung wurde erreicht" means "timeout exceeded". The strange thing is that I see all the devices twice. But it looks like this from the beginning, so maybe ok.

pi@raspberrypi:~ $ sudo hcitool lescan
LE Scan ...
F4:5E:AB:B8:9D:3E (unknown)
F4:5E:AB:B8:9E:DF (unknown)
F4:5E:AB:B8:9E:DF Lamp-WC
F4:5E:AB:B8:AD:CE (unknown)
F4:5E:AB:B8:AB:61 (unknown)
F4:5E:AB:B8:9D:3E Lamp-WC
F4:5E:AB:B8:9F:E6 (unknown)
F4:5E:AB:B8:AB:64 (unknown)
F4:5E:AB:B8:AB:64 Lamp-WC
F4:5E:AB:B8:AD:CE Lamp-WC
F4:5E:AB:B8:9F:E6 Lamp-WC
F4:5E:AB:B8:AB:61 Lamp-WC
pi@raspberrypi:/etc $ bluetoothctl --version
5.47
vkolotov commented 5 years ago

Just double checking, did you see your lamps in the OH inbox? Could you please post some screenshots of your devices in the inbox and when you have added them?

papermoon1978 commented 5 years ago

sure

Inbox

inbox

Inbox add

inbox_add

Thing edit

thing edit

Thing without connection control

thing_no_connection_control

Connection control enabled

connection_control_enabled

Thing with connection control and new properties

thing_with_connection_control_showing_new_properties

Device not showing values

device_powered_on_but_does_not_show_value

When I made the screenshots the device was shown as online, but in the moment it is again shown as offline.

vkolotov commented 5 years ago

Right, the reason why it is offline is that it gets some errors when it tries to establish a connection and read values. Can you try to disable connection control and see if it becomes online again?

Ok, we need to deal with that read error. Could you please post entire log file beginning from adding a device from inbox and ending when you enable connection control and when it becomes offline.

papermoon1978 commented 5 years ago

This is the first try when I could not reproduce the status offline, but status "online connection error".

2018-10-23 22:04:09.662 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'bluetooth:ble:F45EABB8ADCE' to inbox.
2018-10-23 22:04:19.096 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel online is linked although the handler was already disposed.
2018-10-23 22:04:19.102 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel last-updated is linked although the handler was already disposed.
2018-10-23 22:04:19.107 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel rssi is linked although the handler was already disposed.
2018-10-23 22:04:19.112 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel tx-power is linked although the handler was already disposed.
2018-10-23 22:04:19.116 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel estimated-distance is linked although the handler was already disposed.
2018-10-23 22:04:19.120 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel adapter is linked although the handler was already disposed.
2018-10-23 22:04:19.123 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel location is linked although the handler was already disposed.
2018-10-23 22:04:19.126 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel connected is linked although the handler was already disposed.
2018-10-23 22:04:19.129 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel connection-control is linked although the handler was already disposed.
2018-10-23 22:04:19.132 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel connected-adapter is linked although the handler was already disposed.
2018-10-23 22:04:19.134 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel authenticated is linked although the handler was already disposed.
2018-10-23 22:04:19.180 [WARN ] [.core.thing.binding.BaseThingHandler] - BaseThingHandler.initialize() will be removed soon, ThingStatus can be set manually via updateStatus(ThingStatus.ONLINE)
2018-10-23 22:05:14.053 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:05:14.353 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:05:14.356 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:05:24.591 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffbb-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:05:24.937 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffbb-0000-1000-8000-00805f9b34fb : Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffbb-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:05:24.938 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffbb-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:05:35.031 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:05:35.334 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:05:35.339 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:05:55.397 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffbb-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:05:55.700 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffbb-0000-1000-8000-00805f9b34fb : Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffbb-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:05:55.711 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffbb-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:06:15.838 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:06:16.086 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:06:16.092 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (read) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : GDBus.Error:org.bluez.Error.NotAuthorized: Operation Not Authorized
2018-10-23 22:06:26.094 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:06:26.097 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:06:26.099 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:06:33.761 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE / 34af04 : GDBus.Error:org.bluez.Error.Failed: Software caused connection abort
2018-10-23 22:06:36.102 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:06:36.104 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:06:36.106 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:06:46.108 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:06:46.110 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:06:46.111 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:06:56.113 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:06:56.116 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:06:56.118 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:06:58.790 [WARN ] [ooth.manager.impl.DeviceGovernorImpl] - Error occurred while resetting device: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE : Zeitüberschreitung wurde erreicht 
2018-10-23 22:07:06.120 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:06.122 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:06.132 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:16.135 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:16.138 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:16.139 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:26.142 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:26.144 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:26.145 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:36.147 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:36.149 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:36.164 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:44.622 [WARN ] [ager.impl.CombinedDeviceGovernorImpl] - Possible stale object detected: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE
2018-10-23 22:07:44.634 [WARN ] [ager.impl.CombinedDeviceGovernorImpl] - Possible stale object detected: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AB:61
2018-10-23 22:07:44.645 [WARN ] [ager.impl.CombinedDeviceGovernorImpl] - Possible stale object detected: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:9D:3E
2018-10-23 22:07:44.645 [WARN ] [ager.impl.CombinedDeviceGovernorImpl] - Possible stale object detected: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:9E:DF
2018-10-23 22:07:46.167 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:46.169 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:46.170 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:54.634 [WARN ] [ager.impl.CombinedDeviceGovernorImpl] - Possible stale object detected: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AB:64
2018-10-23 22:07:55.181 [WARN ] [ager.impl.CombinedDeviceGovernorImpl] - Possible stale object detected: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:9F:E6
2018-10-23 22:07:56.172 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:56.174 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:07:56.176 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:08:04.625 [WARN ] [ager.impl.CombinedDeviceGovernorImpl] - Possible stale object detected: /XX:XX:XX:XX:XX:XX/10:4E:89:5D:57:E2
2018-10-23 22:08:06.178 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:08:06.180 [WARN ] [anager.impl.CompletableFutureService] - Bluetooth error happened while competing a future: /XX:XX:XX:XX:XX:XX/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb
2018-10-23 22:08:06.194 [WARN ] [anager.impl.CompletableFutureService] - Error occurred while completing (silently) futures: Error occurred while interacting (getFlags) with native object: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb : Bluetooth object is not ready: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE/0000ffb0-0000-1000-8000-00805f9b34fb/0000ffb8-0000-1000-8000-00805f9b34fb

The rest of the log is full with a repetition of the last 3 lines.

Then I did a restart of OH and removed and added the same device again. Now it is shown with status offline even with connection control enabled

2018-10-23 22:22:09.424 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'bluetooth:ble:F45EABB8ADCE' to inbox.
2018-10-23 22:22:16.209 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel online is linked although the handler was already disposed.
2018-10-23 22:22:16.214 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel last-updated is linked although the handler was already disposed.
2018-10-23 22:22:16.217 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel rssi is linked although the handler was already disposed.
2018-10-23 22:22:16.222 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel tx-power is linked although the handler was already disposed.
2018-10-23 22:22:16.225 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel estimated-distance is linked although the handler was already disposed.
2018-10-23 22:22:16.229 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel adapter is linked although the handler was already disposed.
2018-10-23 22:22:16.233 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel location is linked although the handler was already disposed.
2018-10-23 22:22:16.238 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel connected is linked although the handler was already disposed.
2018-10-23 22:22:16.242 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel connection-control is linked although the handler was already disposed.
2018-10-23 22:22:16.246 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel connected-adapter is linked although the handler was already disposed.
2018-10-23 22:22:16.249 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler BluetoothDeviceHandler of thing bluetooth:ble:F45EABB8ADCE tried checking if channel authenticated is linked although the handler was already disposed.
2018-10-23 22:22:16.332 [WARN ] [.core.thing.binding.BaseThingHandler] - BaseThingHandler.initialize() will be removed soon, ThingStatus can be set manually via updateStatus(ThingStatus.ONLINE)
2018-10-23 22:22:18.528 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE / 1f91cd3 : Zeitüberschreitung wurde erreicht
2018-10-23 22:22:53.560 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE / 1f91cd3 : Zeitüberschreitung wurde erreicht
2018-10-23 22:23:28.594 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE / 56c712 : Zeitüberschreitung wurde erreicht
2018-10-23 22:23:53.630 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /B8:27:EB:02:15:37 / 1a2cfc8 : GDBus.Error:org.bluez.Error.InProgress: Operation already in progress
2018-10-23 22:24:03.620 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /B8:27:EB:02:15:37/F4:5E:AB:B8:AD:CE / 56c712 : Zeitüberschreitung wurde erreicht
2018-10-23 22:24:03.636 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /B8:27:EB:02:15:37 / 1a2cfc8 : GDBus.Error:org.bluez.Error.InProgress: Operation already in progress
2018-10-23 22:24:13.642 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /B8:27:EB:02:15:37 / 1a2cfc8 : GDBus.Error:org.bluez.Error.InProgress: Operation already in progress
2018-10-23 22:24:23.649 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /B8:27:EB:02:15:37 / 1a2cfc8 : GDBus.Error:org.bluez.Error.InProgress: Operation already in progress
2018-10-23 22:24:33.654 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /B8:27:EB:02:15:37 / 1a2cfc8 : GDBus.Error:org.bluez.Error.InProgress: Operation already in progress
vkolotov commented 5 years ago

Hm... Can you post your DBus config file for Bluez? /etc/dbus-1/system.d/bluetooth.conf

Just checking again, did you go though these steps? https://github.com/sputnikdev/bluetooth-manager-tinyb#prerequisites

papermoon1978 commented 5 years ago

sure. It is pretty much default. I only changed at_console to false to solve security issues.

<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent1"/>
    <allow send_interface="org.bluez.MediaEndpoint1"/>
    <allow send_interface="org.bluez.MediaPlayer1"/>
    <allow send_interface="org.bluez.ThermometerWatcher1"/>
    <allow send_interface="org.bluez.AlertAgent1"/>
    <allow send_interface="org.bluez.Profile1"/>
    <allow send_interface="org.bluez.HeartRateWatcher1"/>
    <allow send_interface="org.bluez.CyclingSpeedWatcher1"/>
    <allow send_interface="org.bluez.GattCharacteristic1"/>
    <allow send_interface="org.bluez.GattDescriptor1"/>
    <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
    <allow send_interface="org.freedesktop.DBus.Properties"/>
  </policy>

  <policy at_console="false">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of lp group (printing subsystem) to 
       communicate with bluetoothd -->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

</busconfig>
vkolotov commented 5 years ago

And obviously your openhab user is in lp group?

vkolotov commented 5 years ago

Ok, we need to debug this via bluetoothctl tool. This is the closest thing to the way how binding works (e.g. via DBus). Afaik, hcitool does not use DBus. Could you please try to write something in bluetoothctl for your device? I can't have access to my rpi at the moment, but it should be quite straight forward to use bluetoothctl to list device, connect and write a characteristic.

vkolotov commented 5 years ago

This would eliminate multiple layers (no TinyB and the binding) in your debug strategy.

vkolotov commented 5 years ago

btw, please run it as your openhab user:

sudo -u openhab bluetoothctl
papermoon1978 commented 5 years ago

hmm, not so easy. sorry :-(

[bluetooth]# list
Controller B8:27:EB:02:15:37 BlueZ 5.47 [default]
[CHG] Device F4:5E:AB:B8:9D:3E RSSI: -76
[CHG] Device F4:5E:AB:B8:AB:61 RSSI: -79
[CHG] Device F4:5E:AB:B8:AB:64 RSSI: -93
[CHG] Device F4:5E:AB:B8:9D:3E RSSI: -91
[bluetooth]# devices
Device F4:5E:AB:B8:AD:CE Lamp-WC
Device F4:5E:AB:B8:9D:3E Lamp-WC
Device F4:5E:AB:B8:9E:DF Lamp-WC
Device F4:5E:AB:B8:AB:61 Lamp-WC
Device F4:5E:AB:B8:AB:64 Lamp-WC
[CHG] Device F4:5E:AB:B8:9D:3E RSSI: -90
[CHG] Device F4:5E:AB:B8:9E:DF RSSI: -75
[CHG] Device F4:5E:AB:B8:AB:61 RSSI: -78
[CHG] Device F4:5E:AB:B8:AB:64 RSSI: -91
[CHG] Device F4:5E:AB:B8:9D:3E RSSI: -90
[CHG] Device F4:5E:AB:B8:9E:DF RSSI: -91
[CHG] Device F4:5E:AB:B8:AD:CE RSSI: -90
[CHG] Device F4:5E:AB:B8:AB:61 RSSI: -89
[CHG] Device F4:5E:AB:B8:AD:CE Connected: yes
[CHG] Device F4:5E:AB:B8:AD:CE Alias: Hinten
[CHG] Device F4:5E:AB:B8:AB:64 RSSI: -92
[Lamp-WC]# connect F4:5E:AB:B8:AD:CE
Attempting to connect to F4:5E:AB:B8:AD:CE
Connection successful
[CHG] Device F4:5E:AB:B8:AB:61 RSSI: -78
[CHG] Device F4:5E:AB:B8:AD:CE Connected: no
[CHG] Device F4:5E:AB:B8:9E:DF RSSI: -89
[CHG] Device F4:5E:AB:B8:AD:CE RSSI: -74

Sometimes it is possible to establish a connection, but it automatically disconnects a very little moment later.

vkolotov commented 5 years ago

right, so it requires PIN code to be sent once connected I guess.

papermoon1978 commented 5 years ago

Well. I am not happy with it, but I guess it is best to skip this for now because the problem is definitely not with openhab or your great extension. I spent a couple of hours in trying to convince bluetoothctl to talk with my lamps. Sometimes it works to connect, but I was not able to send the password. Most of the time even the connection doesn't work. Now I have the same thing for gatt, so currently my script also doesn't work anymore. Same result on my Ubuntu laptop running with bluetooth USB stick. At the same time I can connect and send passwords without problems using a bluetooth tracer on my Ipad, and also the remote control delivered with the lamps is working fine. So the best idea I have is to start an Arduino project and let a robot press the buttons on the remote ;-) The thing is that I don't need home automation at all, I just want to control them via Alexa. And I thought that openhab, fhem and such are the easiest way. Thanks again for all your efforts! :-)

vkolotov commented 5 years ago

It is pity. I have never seen that error (Operation Not Permitted) and even google know very little about it.

Honestly speaking, once it is resolved, adding your lamps would be an easy part.

vkolotov commented 5 years ago

How far is your rpi or laptop from the lamps? It might be that connection is too week and unstable because of distance between adapters and lamps.

papermoon1978 commented 5 years ago

I moved the Rpi to the Bluetooth controller as close as I can. Now the distance is about 2m. Currently, it is again working to connect. But I don't know if it is by chance or really the distance because it also worked yesterday morning. ;-)

Anyway. I have absolutely no idea how to enter the password. I tried almost all combinations I can think of (as you know the password is 0000) with 0 or in hex. See the following screenshot

b

And either I get an invalid value or a Bluez exception. Do you have an idea?

And if I don't set the password I am even not allowed to read values from the other characteristics. In such case I am forced to disconnect.

Also I'm curious how the remote control works. I never provided my password (it looks like this, but it is not the default one that came with the lamps) to the remote control, but it is working fine. The remote control did not come together with the lamps, I bought it separately. So either they have a way to control the lamps without the password, or there is a master password for all the lamps.

rauferd commented 4 years ago

Dear Andre, dear Vlad,

could this issue be resolved in the end or not? Are you satisfied with whatever solution you have at the moment, Andre?

I have a couple of Paulmann BLE lights and I am thinking about setting up an OpenHAB server to control them. Would you advise for or against this plan?

Thank you, Ferdinand

papermoon1978 commented 4 years ago

Hi!

 

To be honest, I gave up. I still own the same Bluetooth lights, but control them just with the Paulmann remote control - no further automation yet.

 

Andre

   

Gesendet: Freitag, 05. Juni 2020 um 18:58 Uhr Von: "rauferd" notifications@github.com An: "sputnikdev/eclipse-smarthome-bluetooth-binding" eclipse-smarthome-bluetooth-binding@noreply.github.com Cc: "Andre Lerche" a.lerche@gmx.net, "Mention" mention@noreply.github.com Betreff: Re: [sputnikdev/eclipse-smarthome-bluetooth-binding] Add support for Paulmann smart lights (#66)

 

Dear Andre, dear Vlad,

could this issue be resolved in the end or not? Are you satisfied with whatever solution you have at the moment, Andre?

I have a couple of Paulmann BLE lights and I am thinking about setting up an OpenHAB server to control them. Would you advise for or against this plan?

Thank you, Ferdinand

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.