Remove auto discovery for Ibeacon, GAEN and MS CDP (#1183)
to avoid creating hundred of entities and devices in the controller due to their changing MAC addresses
This commit is contained in:
1 parent
a1846faee9
commit
3d2b15bd6c
1 file changed
+6
-2
+6
-2
@@ -844,7 +844,11 @@ void launchBTDiscovery() {
|
||||
# endif
|
||||
BLEdevice* p = *it;
|
||||
Log.trace(F("Device mac %s" CR), p->macAdr);
|
||||
if (!isDiscovered(p)) {
|
||||
// Do not launch discovery for the devices already discovered or that are not unique by their MAC Address (Ibeacon, GAEN and Microsoft Cdp)
|
||||
if (!isDiscovered(p) &&
|
||||
p->sensorModel_id != TheengsDecoder::BLE_ID_NUM::IBEACON &&
|
||||
p->sensorModel_id != TheengsDecoder::BLE_ID_NUM::MS_CDP &&
|
||||
p->sensorModel_id != TheengsDecoder::BLE_ID_NUM::GAEN) {
|
||||
String macWOdots = String(p->macAdr);
|
||||
macWOdots.replace(":", "");
|
||||
if (p->sensorModel_id > TheengsDecoder::BLE_ID_NUM::UNKNOWN_MODEL &&
|
||||
@@ -899,7 +903,7 @@ void launchBTDiscovery() {
|
||||
}
|
||||
p->isDisc = true; // we don't need the semaphore and all the search magic via createOrUpdateDevice
|
||||
} else {
|
||||
Log.trace(F("Device already discovered %s" CR), p->macAdr);
|
||||
Log.trace(F("Device already discovered or that doesn't require discovery %s" CR), p->macAdr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user