From e244decbed1120a8bd5289d2449d4053498270c2 Mon Sep 17 00:00:00 2001 From: h2zero <32826625+h2zero@users.noreply.github.com> Date: Sun, 11 Jul 2021 19:20:48 -0600 Subject: [PATCH] Set BLE_FILTER_CONNECTABLE default to 0. (#1017) --- docs/integrate/openhab2.md | 4 ++++ main/config_BT.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/integrate/openhab2.md b/docs/integrate/openhab2.md index 3d2317f..04f13c4 100644 --- a/docs/integrate/openhab2.md +++ b/docs/integrate/openhab2.md @@ -10,6 +10,10 @@ So as to use the autodiscovery function you need to have: You need to set `OpenHABAutoDiscovery` to true into `config_mqttDiscovery.h` `#define OpenHABDiscovery true` +::: tip +If you are connecting to BLE devices it is highly recommended to set `BLE_FILTER_CONNECTABLE` to `1` in `config_BT.h`. Otherwise you may encounter incomplete data. +::: + The things will appear in the inbox of the paperUI, add them and links the channels. You should see them into the control panel for further usage. ![](../img/OpenMQTTgateway_OpenHAB_Control.png) diff --git a/main/config_BT.h b/main/config_BT.h index 83dbe5e..8d0dd6d 100644 --- a/main/config_BT.h +++ b/main/config_BT.h @@ -42,9 +42,9 @@ extern int btQueueLengthCount; bool bleConnect = AttemptBLECOnnect; // Sets whether to filter publishing of scanned devices that require a connection. -// Default (1) prevents overwriting the publication of the device connection data with the advertised data. +// Setting this to 1 prevents overwriting the publication of the device connection data with the advertised data (Recommended for use with OpenHAB). # ifndef BLE_FILTER_CONNECTABLE -# define BLE_FILTER_CONNECTABLE 1 +# define BLE_FILTER_CONNECTABLE 0 # endif # include "NimBLEDevice.h" #endif