3rd Party Bluetooth Binding. Beta testers needed

openhab.log

2018-07-17 22:22:23.393 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'bluetooth:adapter:001A7DDA7111' to inbox.
2018-07-17 22:23:59.700 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AdapterHandler of thing bluetooth:adapter:001A7DDA7111 tried checking if channel discovering is linked although the handler was already disposed.
2018-07-17 22:23:59.710 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler AdapterHandler of thing bluetooth:adapter:001A7DDA7111 tried checking if channel discovering-control is linked although the handler was already disposed.
2018-07-17 22:24:00.160 [WARN ] [.core.thing.binding.BaseThingHandler] - BaseThingHandler.initialize() will be removed soon, ThingStatus can be set manually via updateStatus(ThingStatus.ONLINE)
2018-07-17 22:24:10.217 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /00:1A:7D:DA:71:11 / 1fb3b98 : GDBus.Error:org.bluez.Error.NotSupported: Operation is not supported
2018-07-17 22:24:20.475 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /00:1A:7D:DA:71:11 / 35bf4a : GDBus.Error:org.bluez.Error.NotSupported: Operation is not supported
2018-07-17 22:24:30.589 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /00:1A:7D:DA:71:11 / 35bf4a : GDBus.Error:org.bluez.Error.NotSupported: Operation is not supported
2018-07-17 22:24:40.607 [WARN ] [impl.AbstractBluetoothObjectGovernor] - Error occurred while updating governor: /00:1A:7D:DA:71:11 / 35bf4a : GDBus.Error:org.bluez.Error.NotSupported: Operation is not supported

lsusb
Bus 008 Device 006: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

systemctl status bluetooth

● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-07-17 22:20:29 CEST; 37min ago
 Docs: man:bluetoothd(8)
 Main PID: 25740 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
       └─25740 /usr/libexec/bluetooth/bluetoothd

Jul 17 22:20:29 orangepizero systemd[1]: Starting Bluetooth service...
Jul 17 22:20:29 orangepizero bluetoothd[25740]: Bluetooth daemon 5.47
Jul 17 22:20:29 orangepizero bluetoothd[25740]: Starting SDP server
Jul 17 22:20:29 orangepizero systemd[1]: Started Bluetooth service.
Jul 17 22:20:29 orangepizero bluetoothd[25740]: Bluetooth management interface 1.0 initialized

Adapter itself works correctly - finds the device and I can read the data from the xiaomi bluetooth termomter with this command:

gatttool -b XX:XX:XX:XX:XX:XX --char-write-req --handle=0x0010 --value=0100 --listen
Characteristic value was written successfully
Notification handle = 0x000e value: 54 3d 32 35 2e 37 20 48 3d 36 35 2e 37 00
Notification handle = 0x000e value: 54 3d 32 35 2e 38 20 48 3d 36 35 2e 36 00
Notification handle = 0x000e value: 54 3d 32 35 2e 37 20 48 3d 36 35 2e 37 00
Notification handle = 0x000e value: 54 3d 32 35 2e 38 20 48 3d 36 35 2e 36 00

Does anyone else have such a problem? how to fix it?

Thanks for reporting this @JohnD, I’ve responded on your ticket

*Bump* Anyone know the answer to this? I would really like to have my things defined in a .thing file as I do for the things related to other bindings.

Thanks

Hi … First thank you for this binding and all the great effort !

I just want to share with you that I bought the LM1010 bluetooth usb adapter (with external antennas) for improving range. I put them in different rooms, connecting with usbip …

These adapters turned out to stop reporting after the first report.
I found that I needed to set kernel parameter : enable_autosuspend = “N” for these adapters to keep reporting. see :
https://bbs.archlinux.org/viewtopic.php?pid=1781522#p1781522

I spent quite some time tracking this down, so I tougth I’d share it here.

Br
Torstein

1 Like

Could you describe your setup, especialy what did you put into the different rooms and on whick system is your openhab running

Hi

The USBIP setup is discussed here earlier … By you ?! :smile: Forwarding of serial and USB ports over the network to openHAB](http://)
I did use your information together with this one to make it persist :
https://unix.stackexchange.com/questions/406847/use-usbip-for-devices-that-are-being-removed-and-reconnected

I have the bluetooth-adapters in : Desktop (HTCP), a RaspberryPi 2, RaspberryPi 3, and a headless Server located troughout the appertment … (all my devices run ArchLinux)

Openhab (one of the latest snapshots) is currently running in the HTPC (ArchLinux gnome desktop), Bluez + Bluez-utils 5.47

Br
-Torstein

Awesome news @Baltazar72, I’ll add this to the troubleshooting section

These adapters turned out to stop reporting after the first report.
I found that I needed to set kernel parameter : enable_autosuspend = “N” for these adapters to keep reporting. see :
https://bbs.archlinux.org/viewtopic.php?pid=1781522#p1781522

How’s that usb adapter working? Better reception?

Hey @Baltazar72,

just wondering if you are using the “indoor positioning” feature of the binding? I have not heard from anyone if it is used so far… If so, could you please let me know how it goes? Cheers

Hi @mcqwerty, would you be able to create an issue on github and attach some details/files?

I have not tried defining adapters in files, so not sure if it is working. However I do not see any issues with that. Let’s create a ticket on github so I won’t forget to check it. Cheers

wrong post …

Hi, no I have only used for Miflora so far … Not used positioning …

Br
Torstein

Reception is definetly better.
I’ll se if I can make an more “scientific” measurement, but for me it was a “needed” improvement on range, I can se devicec popping in on adapter locations not possible with the small usb “internal antenna” adapters.

Br
Torstein

@vkolotov And what about this issue? can you help me?

Hi @JohnD, looks like you are not the only one who reported this, although it is not very common. Not sure what is the cause of it since I cannot reproduce this. However, I can possibly do a workaround for this. I’ll make a build for you to test, will you be able to test it?

Update: Replied on your github ticket with a link to download TinyB transport to test for you.

Regarding “Location” … I have a “stationary” MiFlora device, but since I now have “multiple” bt-adapters, the updates from mi-flora is picked up by more than one adapter …
I see guess the “location” is set “only” by the last adapter that communicated with the device (as I don’t see the plant rushing between the livingrom and hall evere few minutes :smiley:

I’m just thinking maybe Location could be “calculated” by the rssi from multiple adapters ?
Im my specific case, the “kott-adapter” has 79-80 rssi, and the “stue-adapter” has an rssi on the same device with 90-91.

For a device to be determined as “moving” either adapter should not have the approx same rssi values in a number of measurements, and the device could be “located” with the adapter having the “lowest” value over n-measurements (preventing the “hopping”)?

Rambling on ( just an idea, and probably a lot of work to implement, or maybe this would not work uniform with different devices, causing you to make a “map” for each device…)
You could pull this a long way, and build a triangulation “map” of corresponding measurements eg stue-rssi=73-78 and kott-rssi=82-85 could mean location = “kitchen” … (even if you have no adapters int he kitchen)

This way, the “wife” could move the flowers around, and just get a message "Flower #2, located in the vicinity of the kitchen needs water :slight_smile: (the sticks just needs to be “numbered”)

Br Torstein

log looks like this :

2018-07-26 15:07:26.580 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -80 to -79
2018-07-26 15:07:56.572 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -80
2018-07-26 15:08:51.532 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -80 to -81
2018-07-26 15:09:00.567 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -81 to -90
2018-07-26 15:09:00.569 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-26 15:09:14.568 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -90 to -79
2018-07-26 15:09:14.569 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-26 15:09:38.532 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -80
2018-07-26 15:09:44.558 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -80 to -91
2018-07-26 15:09:44.558 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-26 15:09:56.561 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -91 to -90
2018-07-26 15:10:08.553 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -90 to -91
2018-07-26 15:10:19.537 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -91 to -80
2018-07-26 15:10:19.537 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-26 15:10:28.531 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -80 to -91
2018-07-26 15:10:28.532 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-26 15:10:33.561 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -91 to -80
2018-07-26 15:10:33.561 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-26 15:10:41.556 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -80 to -79
2018-07-26 15:10:52.559 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -91
2018-07-26 15:10:52.559 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-26 15:11:03.583 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -91 to -79
2018-07-26 15:11:03.584 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-26 15:11:23.633 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -91
2018-07-26 15:11:23.634 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-26 15:11:29.528 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -91 to -78
2018-07-26 15:11:29.528 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-26 15:11:59.532 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -79
2018-07-26 15:12:32.545 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -78
2018-07-26 15:12:43.555 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -91
2018-07-26 15:12:43.556 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-26 15:12:53.555 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -91 to -79
2018-07-26 15:12:53.556 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-26 15:13:04.562 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -78
2018-07-26 15:13:26.579 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -91
2018-07-26 15:13:26.580 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-26 15:13:37.529 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -91 to -78
2018-07-26 15:13:37.531 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-26 15:14:11.527 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -91
2018-07-26 15:14:11.527 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-26 15:14:22.545 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -91 to -78
2018-07-26 15:14:22.545 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott

Hi @Baltazar72, thank you for your suggestions. The location calculation is not based on the most recent adapter that received data as you say. The binding calculated distance between your device and all of your adapters based on RSSI. This is so called Indoor Positioning System.

There are a number of factors that can influence accuracy if the system, such us:

  1. Radio receivers in adapters are not all the same, hence they sense/report RSSI differently.
  2. Your adapters can be installed in different places, e.g. in a cupboard, roof cavity, wall etc, which brings further inconsistency.
  3. Bluetooth devices have different radio transmitters that emit radio waves with different strength, furthermore manufacturers can set up different levels of radio strength, this is mainly due to power consumption optimisation.
  4. Just because it is wireless communication, RSSI value that we receive is not consistent even if adapter and device are stationary.

In order to deal with this issues, the binding has various features/configurations:

  1. Kalman filter that is supposed to reduce noise from RSSI readings. There are several settings you could play with:
    • Kalman filter factors. Configured in the device settings. For your stationary devices you may easily choose strongest filter:
    • Signal propagation exponent. Configured in the adapter setting. Read the description of that config, it should be self explanatory.
  2. Measured transmit power. Configured in the device settings. This setting is intended to equalise differences in hardware/software of receivers and transmitters:

For a device to be determined as “moving” either adapter should not have the approx same rssi values in a number of measurements, and the device could be “located” with the adapter having the “lowest” value over n-measurements (preventing the “hopping”)?

What you are describing is called Hysteresis probably. It is a good approach to smooth behaviour, however it brings some latency. From my observation, Kalman filter + tweaking configs is enough to make it more or less stable.

Please try and let me know how it goes. Cheers.

Hi

Thank you for the info.

I did change the device setting to “slow” on the positioning system.
the connection strategy is Nearest adapter.

Also adapter setting is “indoors, walls and furniture”.

The result is less “moving”, but still significant.

The log is fetched approx 3 hours after the changes was made (not restarted or rebooted).

Am I missing something ?

Thank you very much :slight_smile:
-Torstein

$ tail -f  -n 5000 /opt/openhab2/userdata/logs/events.log | grep "Flower2_rssi\|Flower2_Loca"
2018-07-27 18:02:33.377 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -92
2018-07-27 18:02:33.378 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:02:43.380 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -92 to -78
2018-07-27 18:02:43.380 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:02:54.367 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -77
2018-07-27 18:03:49.356 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -78
2018-07-27 18:04:02.352 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -93
2018-07-27 18:04:02.352 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:04:11.380 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -93 to -78
2018-07-27 18:04:11.380 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:04:24.394 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -94
2018-07-27 18:04:24.394 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:04:33.359 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -94 to -78
2018-07-27 18:04:33.359 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:05:06.351 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -93
2018-07-27 18:05:06.351 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:05:29.358 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -93 to -77
2018-07-27 18:05:29.358 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:05:39.347 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -78
2018-07-27 18:06:23.381 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -77
2018-07-27 18:06:45.328 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -78
2018-07-27 18:07:07.335 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -79
2018-07-27 18:07:42.362 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -93
2018-07-27 18:07:42.362 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:07:51.368 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -93 to -78
2018-07-27 18:07:51.368 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:09:08.339 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -77
2018-07-27 18:09:19.357 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -76
2018-07-27 18:09:30.357 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -76 to -78
2018-07-27 18:10:47.336 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -77
2018-07-27 18:11:22.368 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -92
2018-07-27 18:11:22.368 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:11:31.355 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -92 to -77
2018-07-27 18:11:31.355 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:13:21.364 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -78
2018-07-27 18:13:54.358 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -79
2018-07-27 18:14:05.321 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -78
2018-07-27 18:14:38.343 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -77
2018-07-27 18:14:49.339 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -78
2018-07-27 18:15:02.349 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -92
2018-07-27 18:15:02.349 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:15:34.353 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -92 to -77
2018-07-27 18:15:34.353 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:17:24.370 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -92
2018-07-27 18:17:24.370 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:17:34.361 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -92 to -78
2018-07-27 18:17:34.361 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:17:45.311 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -77
2018-07-27 18:17:56.323 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -78
2018-07-27 18:18:07.327 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -77
2018-07-27 18:18:18.329 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -78
2018-07-27 18:18:29.347 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -77
2018-07-27 18:18:41.346 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -78
2018-07-27 18:19:14.356 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -79
2018-07-27 18:20:52.336 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -80
2018-07-27 18:21:14.367 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -80 to -79
2018-07-27 18:21:25.309 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -78
2018-07-27 18:22:31.342 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -79
2018-07-27 18:22:42.341 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -78
2018-07-27 18:23:17.358 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -93
2018-07-27 18:23:17.358 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:23:48.331 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -93 to -77
2018-07-27 18:23:48.331 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:24:10.329 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -78
2018-07-27 18:24:33.343 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -77
2018-07-27 18:25:27.314 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -76
2018-07-27 18:25:38.317 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -76 to -77
2018-07-27 18:26:11.328 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -78
2018-07-27 18:26:22.333 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -79
2018-07-27 18:26:45.303 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -80
2018-07-27 18:27:07.312 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -80 to -79
2018-07-27 18:27:18.327 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -80
2018-07-27 18:27:28.320 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -80 to -79
2018-07-27 18:27:50.341 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -92
2018-07-27 18:27:50.342 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:28:01.329 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -92 to -79
2018-07-27 18:28:01.330 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:28:23.335 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -78
2018-07-27 18:28:58.310 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -92
2018-07-27 18:28:58.310 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:29:07.304 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -92 to -77
2018-07-27 18:29:07.304 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:29:18.325 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -77 to -78
2018-07-27 18:30:25.297 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -79
2018-07-27 18:30:47.325 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -93
2018-07-27 18:30:47.325 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:31:08.299 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -93 to -80
2018-07-27 18:31:08.299 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:33:20.331 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -80 to -79
2018-07-27 18:34:04.348 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -78
2018-07-27 18:34:27.297 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -92
2018-07-27 18:34:27.297 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:35:12.331 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -92 to -93
2018-07-27 18:35:21.333 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -93 to -79
2018-07-27 18:35:21.334 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:35:45.317 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -93
2018-07-27 18:35:45.317 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:36:05.289 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -93 to -78
2018-07-27 18:36:05.289 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:37:00.323 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -79
2018-07-27 18:37:12.336 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -78
2018-07-27 18:37:44.341 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -78 to -79
2018-07-27 18:37:56.290 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -79 to -80
2018-07-27 18:38:32.324 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -80 to -85
2018-07-27 18:38:39.325 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -85 to -84
2018-07-27 18:38:50.314 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -84 to -82
2018-07-27 18:39:58.296 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -82 to -93
2018-07-27 18:39:58.297 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:40:51.314 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -93 to -83
2018-07-27 18:40:51.314 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:41:36.291 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -83 to -84
2018-07-27 18:42:31.321 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -84 to -92
2018-07-27 18:42:31.322 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:43:25.294 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -92 to -83
2018-07-27 18:43:25.294 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:44:09.300 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -83 to -82
2018-07-27 18:44:31.300 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -82 to -81
2018-07-27 18:44:45.275 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -81 to -92
2018-07-27 18:44:45.276 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:45:15.287 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -92 to -83
2018-07-27 18:45:15.287 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:45:28.301 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -83 to -92
2018-07-27 18:45:28.302 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:45:59.293 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -92 to -80
2018-07-27 18:45:59.293 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:46:24.330 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -80 to -92
2018-07-27 18:46:24.331 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:46:33.319 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -92 to -82
2018-07-27 18:46:33.320 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:46:44.354 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -82 to -92
2018-07-27 18:46:44.355 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:46:55.302 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -92 to -93
2018-07-27 18:48:00.319 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -93 to -82
2018-07-27 18:48:00.320 [vent.ItemStateChangedEvent] - Flower2_Location changed from Stue to kott
2018-07-27 18:48:11.300 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -82 to -83
2018-07-27 18:48:22.316 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -83 to -84
2018-07-27 18:48:44.316 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -84 to -83
2018-07-27 18:48:55.272 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -83 to -84
2018-07-27 18:49:31.300 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -84 to -93
2018-07-27 18:49:31.301 [vent.ItemStateChangedEvent] - Flower2_Location changed from kott to Stue
2018-07-27 18:50:34.332 [vent.ItemStateChangedEvent] - Flower2_rssi changed from -93 to -94


Hi @Baltazar72, thanks for that. Interesting… Are your miflora sensors roughly located within the same distance from your two adapters?

I can see that your RSSI jumps quite significantly. e.g. ±15. We could possibly come up with another option for the Kalman filter specially for stationary devices, e.g. very very slow with some significant latency.

If you think about that more, if you have two adapters and a device and the distance is more or less equal between adapters and the device, then what else can you do? As I said before, bluetooth radio signal is quite unstable by its nature. First thing that comes to my mind… in order to fix this, you would probably need to get another adapter and put it in your kitchen :slight_smile: OR have an ability to define location for each your device so that it does not get updated by the binding. It is really and “edge” case…

Hi

I see your point in having “approx equal” rssi values from 2 adapters, that represents a challenge.
I also see that the rssi values “drift” , making the challenge even harder.

Also as you state it may be an edge case, but I really see some benefits here… eg I noticed that my UE MegaBoom Bluetooth speaker is quite “chatty”, and it would be great to have it “located” by the binding… hall / livingroom / office, or second floor … The speaker also show the same “jumping”, but not nearly quite as frequently

I actually have 5 miflora devices, (and more coming in from ebay eventually)
I have 3 adapters, and enclosing eventlog in case if it is of any interest (cat /opt/openhab2/userdata/logs/events.log | grep “Flower[12345]_[rLu]\|MegaBoom_[Lru]”) here : https://drive.google.com/open?id=1JG8tD6DSXQNgck7IRg6p3i8mar90aFo1

Flower1 is really close to and have line of sight to adapter “Stue”
Flower2 is “closer” to adapter “kott”, but a concrete wall is inbetween…
Flower3 is really close to adapter “2.etg”
Flower4 is in same room and has line of sight to adapter “Stue”
Flower5 is outside and only reachable to adapter “2.etg”
MegaBoom has been really close to “2.etg”

I really would not know how to achieve it, but the “positioning” could benefit from some “virtual” positions that could be calculated form multiple adapters rssi values / ranges … then I could say that 50/50 more or less equal rssi’s from kott and Stue would mean Kitchen, and 60/40 could mean hall …
I guess this also could be achieved by a openhab rule of some sort (I’ll have to ponder upon that)

I’m also thinking maybe there is a problem with usbip (currently all 3 adapters is connected via usbip), and me loosing contact with adapters (just a tought)…

Is there a way to see which adapters that picks up the signal in the eventlogs ?

I would like to thank you again for this fantastic binding … I’m loving it more and more every day ! :smiley:
Torstein

Hi Vlad,
sorry for digging out the old post https://community.openhab.org/t/3rd-party-bluetooth-binding-beta-testers-needed/38492/551?u=curlyel

But the problem still exists :frowning:

It seems to me, that once your Bluetooth binding is activated, other bindings which are using serial usb adapters are suffering from it. I’ve observed it in combination with the Zigbee binding (which you are already aware of) and the ZWave binding.

For example ZWave controller thing
If no Bluetooth binding is installed, the ZWave controller thing let me choose out of the full list of existing serial ports:

… or a Zigbee coordinator (still the full list of serial ports):

… now I’m going to install the Market-Bluetooth-Binding and configure it to use “/dev/bluegigattyACM*

When I now check for the available serial ports for the other bindings, the list is limited to just “/dev/bluegigattyACM1
For example again the Zigbee:


… same for the ZWave:

This prevents the other bindings from working (at least if not started and initialized before the Bluetooth binding). It seems that the Bluetooth binding is somehow “stealing” the serial ports from the other bindings.

Chris has suggested to stop the USB serial discovery bundles on Linux ESH/openHAB which seemed to help in a couple of attempts (restart openhab/reboot system). But after some tries, the issue re-occured…

You’ve already answered, that you are not touching any “foreign” port by intention. Though: May I ask you again looking into it?