[SSD1306] BLE devices display - Take 2 (#1492)
* BLE Display - THB, THBX, PLANT, AIR, BATT, BODY * SCALE * BBQ * Filter MS-CDP, GAEN and IBEACON * Mopeka & Smart Dry * ACEL ACEL sensor, as most also have temp and hum, but no acceleration info display included so far. * Only display when properties are present Only display when properties are present, to avoid model only display for devices which require active scanning at a larger interval, e.g. Mi Band and similar. * LilyGo-BLE environment * BLE display relocated BLE display relocated to have pubadvdata "type" in message, required for the different type display functions.
This commit is contained in:
1 parent
a6e0f6094c
commit
c77a16867d
5 files changed
+362
-51
No files matched your search
+4
-3
@@ -257,9 +257,6 @@ void pubBTMainCore(JsonObject& data, bool haPresenceEnabled = true) {
|
||||
topic = BTConfig.extDecoderTopic; // If external decoder, use this topic to send data
|
||||
topic = subjectBTtoMQTT + String("/") + topic;
|
||||
pub((char*)topic.c_str(), data);
|
||||
if (data.containsKey("model") || data.containsKey("distance")) { // Only display sensor data
|
||||
pubOled((char*)topic.c_str(), data);
|
||||
}
|
||||
}
|
||||
if (haPresenceEnabled && data.containsKey("distance")) {
|
||||
if (data.containsKey("servicedatauuid"))
|
||||
@@ -982,6 +979,10 @@ void launchBTDiscovery(bool overrideDiscovery) {
|
||||
void PublishDeviceData(JsonObject& BLEdata, bool processBLEData) {
|
||||
if (abs((int)BLEdata["rssi"] | 0) < abs(BTConfig.minRssi)) { // process only the devices close enough
|
||||
if (processBLEData) process_bledata(BLEdata);
|
||||
String topic = subjectBTtoMQTT;
|
||||
if (BLEdata.containsKey("model") || BLEdata.containsKey("distance")) { // Only display sensor data
|
||||
pubOled((char*)topic.c_str(), BLEdata);
|
||||
}
|
||||
if (!BTConfig.pubAdvData) {
|
||||
BLEdata.remove("servicedatauuid");
|
||||
BLEdata.remove("servicedata");
|
||||
|
||||
Reference in new issue
Block a user