From fb1929565f45a66df43f5120278232c60c5f5e3f Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 19 Oct 2026 14:09:08 +0200 Subject: [PATCH] BTHome clarify binary state GUI display --- CHANGELOG.md | 1 + RELEASENOTES.md | 1 + .../xsns_62_esp32_mi_ble.ino | 23 ++++++++----------- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a13b3754f..f480c772e 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file. ### Changed ### Fixed +- Several buffer overflows - MiEL HVAC Modbus no response timeouts now serves the RS485 slave from its own task (#25157) ### Removed diff --git a/RELEASENOTES.md b/RELEASENOTES.md index ef248c065..aeead75cf 100755 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -126,6 +126,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm ### Changed ### Fixed +- Several buffer overflows - MiEL HVAC Modbus no response timeouts now serves the RS485 slave from its own task [#25157](https://github.com/arendst/Tasmota/issues/25157) ### Removed \ No newline at end of file diff --git a/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi_ble.ino b/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi_ble.ino index b5e75d2d7..3f36bc06d 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi_ble.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi_ble.ino @@ -35,7 +35,7 @@ #ifdef USE_MI_ESP32 -#define MI32_VERSION "v26.10.17" +#define MI32_VERSION "v26.10.19" /*********************************************************************************************\ BLE Xiaomi/Mijia (MI) sensor decoding @@ -47,8 +47,10 @@ -------------------------------------------------------------------------------------------- Version yyyymmdd Action Description -------------------------------------------------------------------------------------------- + 26.10.19 changed - BTHome clarify binary state GUI display + -------- 26.10.17 breaking - BTHome un-reverse MAC address usage for command MI32Keys to make it consistent - added - Support OUI wildcard for command MI32Keys in case multiple devices use same bindkey (IoTorero) + added - Support MAC OUI wildcard for command MI32Keys in case multiple devices use same bindkey (IoTorero) -------- 26.10.15 added - BTHome binary events to GUI -------- @@ -4547,21 +4549,14 @@ void MI32Show(bool json) WSContentSend_P(SI_WEB_LINE_START); if (p->feature.events){ if (p->type == MI_BTHOME) { - uint32_t count = 0; - for (uint32_t i = 0; i < sizeof(p->bthome_binary); i++) { - if (p->bthome_binary[i] > 0) { - count++; - } - } + // Binary sensors are shown as 0 or 1 with sub index from table BTHOME_OBJECTS for (uint32_t i = 0; i < sizeof(p->bthome_binary); i++) { if (p->bthome_binary[i] > 0) { + uint32_t obj_idx = p->bthome_binary[i] & 0x7F; uint32_t state = p->bthome_binary[i] >> 7; - if (1 == count) { - WSContentSend_PD(PSTR(" 🏁 %d"), state); // 🏁 - } else { - uint32_t obj_idx = p->bthome_binary[i] & 0x7F; - WSContentSend_PD(PSTR(" 🏁%d %d"), obj_idx, state); // 🏁 - } +// WSContentSend_PD(PSTR(" 🏁%d %d"), obj_idx, state); // 🏁 +// WSContentSend_PD(PSTR(" ʰ%d;%d"), (state) ? 6 : 7, obj_idx); // ⬇ or ⬆ + WSContentSend_PD(PSTR(" %d%d"), state, obj_idx); // 0 or 1 } } } else {