3rd Party Bluetooth Binding. Beta testers needed

bluetooth
binding
Tags: #<Tag:0x00007f0155d22780> #<Tag:0x00007f0155d22528>

(Baltazar72) #584

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



(Vlad Kolotov) #585

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…


(Baltazar72) #586

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


(Curlyel) #587

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?


(Vlad Kolotov) #588

Hi @curlyel, thank you for providing your comprehensive report, I’ve created a ticket for you. It is on my list now. It is definitely not right and needs to be fixed.


(Vlad Kolotov) #589

Hi @Baltazar72,

thanks for providing some details.

If you enable TRACE level for the bluetooth manager, then you will see these lines:

Updating RSSI: <bluetoth url> : <rssi value>

where bluetooth url is: /<adapter mac>/<device mac>

Unfortunately that issue is not very easy to resolve. I suggest we tackle this in the following way:

  1. Add ability for user to set location for a device, e.g. prevent the binding to update device location. So that users can assign locations for stationary devices. This probably will resolve 90% of the issue.
  2. Add a new “very slow” Kalman filter option for stationary devices. This should help to mitigate that issue as well.

Any thoughts/additions?


(Palm) #590

Hi Vlad,
trying to send commands via a binary channel but the commands in never sent, it just reads never writes. Am i missing something? Should it be possible to send/write commands to a binary channel?
Do i need to create my own custom definitions for it to work?

Best regards
Palm

Log from the mentioned channel:

2018-08-08 22:09:28.165 [DEBUG] [anager.impl.CompletableFutureService] - Trying to complete future immediately: /XX:XX:XX:XX:XX:XX/EF:61:6E:4F:7C:86/00001525-9f03-0de5-96c5-b8f4f3081186/00001526-9f03-0de5-96c5-b8f4f3081186 : org.sputnikdev.bluetooth.manager.CharacteristicGovernor$$Lambda$756/26197661@1b039b4

2018-08-08 22:09:28.168 [DEBUG] [impl.AbstractBluetoothObjectGovernor] - Interacting with native object (getFlags): /B8:27:EB:2D:B6:E5/EF:61:6E:4F:7C:86/00001525-9f03-0de5-96c5-b8f4f3081186/00001526-9f03-0de5-96c5-b8f4f3081186 / 1ab2e11

2018-08-08 22:09:28.171 [DEBUG] [impl.AbstractBluetoothObjectGovernor] - Interacting with native object (read): /B8:27:EB:2D:B6:E5/EF:61:6E:4F:7C:86/00001525-9f03-0de5-96c5-b8f4f3081186/00001526-9f03-0de5-96c5-b8f4f3081186 / 1ab2e11

2018-08-08 22:09:36.208 [DEBUG] [l.CombinedCharacteristicGovernorImpl] - Updating combined characteristic governor: /XX:XX:XX:XX:XX:XX/EF:61:6E:4F:7C:86/00001525-9f03-0de5-96c5-b8f4f3081186/00001526-9f03-0de5-96c5-b8f4f3081186

2018-08-08 22:09:36.210 [DEBUG] [l.CombinedCharacteristicGovernorImpl] - Combined characteristic governor update completed: /XX:XX:XX:XX:XX:XX/EF:61:6E:4F:7C:86/00001525-9f03-0de5-96c5-b8f4f3081186/00001526-9f03-0de5-96c5-b8f4f3081186

(Neil) #591

thanks to Vlad for the bindings. It’s working great with a cheap iTag I have.

I’ve just bought a FlowerCare sensor, and have updated via the app to the most recent firmware. I’ve then disconnected from the app.

It’s then detected by OH and connects OK, but only gives just-one of the actual plant sensors. If I delete the thing and then auto-detect it again it will still only give one of the plant channels although it might be a different one.

Does anyone have any ideas please?

EDIT: the channels have now appeared, around 20 hours since I last checked and around 30 hours from first installing. More patience required.


(Lemmy) #592

Hi to Everyone,
A couple of weeks ago I’ve started to use Vlad’s bluetooth binding to detect my presence with the help of a Gigaset G-Tag BLE device. From the Openhab perspective everything worked fine in my setup which is made out of three Raspberry Pi Zero W which I’ve positioned around my house. Every ZeroW is running Openhabian with the bluetooth binding and is scanning for the G-Tag.

What I noticed after two days of running this setup… my 2.4GHz Wifi network was suddenly useless because of indifferences. So I did a couple of tests with IPerf and a laptop and I came to realize that as soon as I start to run the binding to scan for my G-Tag it breaks my 2.4GHz Wifi. I mean completly. Even Zigbee (which also works in the 2.4GHz zone) devices like Hue bulbs and Xiaomi devices are unresponsive and a lot of status updates get lost.

Now my question:
Has anybody seen the same issue when using the combination of Pi ZeroWs + Vlad’s Bluetooth Binding + 2.4GHz networks (Wifi/Zigbee)?

I tried to switch the Wifi and Zigbee channels but since I live downtown in the city with tons of other 2.4GHz networks around me it did not help to fix the behaviour.

Regards,
Lemmy


(Vlad Kolotov) #593

Hi @Lemmy, this is the very first time who reports interference with wi-fi network. There was an issue with serial port detection for ZigBee, are you sure it is not the case (pls read several posts above)? I’m running 4-5 adapters simultaneously (although not on the rpi zero) and do not feel that it somehow makes wi-fi link worse.


(Curlyel) #594

Hi @vkolotov,

Did you had a chance already looking into it?
Is there something on my side I can do to help finding the root cause?


(Michael1186) #595

Hi @Lemmy

i have similar problems with the RPi3, but only if I use the on board Wifi and BLE device.
With an ethernet connection and the on board BLE device everything works fine.

I think it could be possible this is a problem on RPi side ???

But I have no idea how to find the cause of the problem.


(DIY HA) #596

Primary use case here is presence detection I believe? I usually keep my BT off to save battery. BT is dying tech, they are somewhere between ultra low power mesh capable NRF/Zwave and FAT Wifi. BT will die soon.
I wouldn’t like keeping it on just for presence detection.
The wifi HW on smartphones is anyway on and it goes to low power when no network in range. The IFTT app can trigger a command event on OH item when you enter home wifi range.


(Stefan) #597

My BT adapter is not detected by OH. It is working fine from the cli.

Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

In the logs I see only this:

Protocol is unknown. Trying to find factory amongst discovered adapters: /9A:CA:AB:7B

openhab@odroid64:~$ hcitool dev
Devices:
        hci0    00:1A:7D:DA:71:13
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:13 Discovering: yes
[NEW] Device 4C:65:A8:D7:5C:51 MJ_HT_V1
[CHG] Device 4C:65:A8:D7:5C:51 UUIDs: 0000180f-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
  50 20 aa 01 30 51 5c d7 a8 65 4c 0d 10 04 e6 00  P ..0Q\..eL.....
  d8 01                                            ..              
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000ffff-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
  c0 b9 e7 66 34 78                                ...f4x          
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
  50 20 aa 01 31 51 5c d7 a8 65 4c 0d 10 04 e7 00  P ..1Q\..eL.....
  d9 01                                            ..              
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000ffff-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
  c0 b9 e7 66 34 78                                ...f4x          
[NEW] Device AC:2B:6E:80:86:A7 DESKTOP-2FO2GFU
openhab@odroid64:~/bluez/bluez-5.47$ /usr/libexec/bluetooth/bluetoothd --version
5.47

I also have problems with the official BT binding, as described here.

I think my dongle is the issue, but I have no clue what to do. Does anyone have a suggestion for me?


BlueZ JNI connection cannot be established
(Vlad Kolotov) #598

Hi @stfn82, could you please make sure you can use ‘bluetoothctl’ utility (see your adapter there) from command line? This might be something to do with user permissions in OS.


(Vlad Kolotov) #599

BT is dying tech

This is your very personal (and not very humble) opinion.

You may not use your phone, some ppl use bluetooth beacons that works months and months from a tiny button battery.


(Vlad Kolotov) #600

Hi @curlyel, I’ll try to squeeze this into the current release which I plan to roll out this week. I can’t be 100% sure as I even have not started to look into it yet. Too busy at the moment, sorry.


(Curlyel) #601

Nothing to worry about. I’ll be patient :wink:
Anyway - thanks for all your support.


(Stefan) #602

Hello @vkolotov, bluetoothctl is working from from the cli:

openhab@odroid64:~$ bluetoothctl
[NEW] Controller 00:1A:7D:DA:71:13 BlueZ 5.47 [default]
Agent registered
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:13 Discovering: yes
[NEW] Device 4C:65:A8:D7:5C:51 MJ_HT_V1
[CHG] Device 4C:65:A8:D7:5C:51 UUIDs: 0000180f-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
50 20 aa 01 51 51 5c d7 a8 65 4c 0d 10 04 fa 00 P …QQ…eL…
4c 02 L.
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000ffff-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
c0 b9 e7 66 34 78 …f4x
[NEW] Device F8:F0:63:FC:57:F3 MI Band 2
[CHG] Device F8:F0:63:FC:57:F3 UUIDs: 0000fee0-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
50 20 aa 01 52 51 5c d7 a8 65 4c 0a 10 01 56 P …RQ…eL…V
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000ffff-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
c0 b9 e7 66 34 78 …f4x
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
50 20 aa 01 53 51 5c d7 a8 65 4c 0d 10 04 fa 00 P …SQ…eL…
4d 02 M.
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Key: 0000ffff-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:65:A8:D7:5C:51 ServiceData Value:
c0 b9 e7 66 34 78 …f4x
[NEW] Device AC:2B:6E:80:86:A7 DESKTOP-2FO2GFU

It sees my Xiaomi thermometer, Mi Fit band and the desktop from the neighbors.


(Vlad Kolotov) #603

Hi @stfn82, I suspect TinyB binaries are not registered properly for your odroid. Not sure if anyone here is using odroid…

Do you see any WARN or ERROR messages from that package when you start OH: org.sputnikdev.bluetooth.manager.transport.tinyb?

Could you please enable DEBUG level for it?

openhab> log:info DEBUG org.sputnikdev.bluetooth.manager.transport.tinyb

After that, when it starts, it should print lines like that:

Loading native libraries from the bundle. Environment: {} : {}
OS name: {}; OS arch: {}
isLinux: {}; isARM6: {}; isX86_64: {}; isX86_32: {}

Look for Environment is not supported: {} : {} line as it would indicate that it is not loading properly and we need to fix it.

Cheers