From 52bd27190fefe723c176c06211363b30d205a99d Mon Sep 17 00:00:00 2001 From: agessaman Date: Mon, 27 Jul 2026 22:29:11 -0700 Subject: [PATCH] feat(mqtt): enhance packet filter functionality with named types Add support for named packet types in per-slot filters, allowing users to specify packet types using descriptive names alongside numeric values. This improves usability and clarity in configuring MQTT slot filters. Updates include modifications to the parsing logic, WebConfig interface, and related documentation to reflect the new naming conventions. --- MQTT_IMPLEMENTATION.md | 56 ++++-- MQTT_INTERNALS.md | 25 ++- examples/simple_repeater/MyMesh.cpp | 12 +- examples/simple_room_server/MyMesh.cpp | 12 +- scripts/webconfig_mock_server.py | 64 ++++++- src/helpers/CommonCLI.cpp | 9 +- src/helpers/CommonCLI_Observer.cpp | 14 +- src/helpers/MQTTPacketFilter.h | 146 +++++++++++++--- src/helpers/MQTTPrefsCodec.h | 33 +++- src/helpers/MQTTPrefsStorage.h | 5 + src/helpers/bridges/MQTTBridge.cpp | 127 ++++++++++++-- src/helpers/bridges/MQTTBridge.h | 8 + src/helpers/esp32/WebConfigServer.cpp | 23 ++- test/README.md | 4 +- .../test_mqtt_packet_filter.cpp | 160 ++++++++++++++++++ .../test_mqtt_prefs_codec.cpp | 77 +++++++++ webui/index.html | 142 +++++++++++++++- 17 files changed, 830 insertions(+), 87 deletions(-) diff --git a/MQTT_IMPLEMENTATION.md b/MQTT_IMPLEMENTATION.md index 33dd877cc..ded092c6e 100644 --- a/MQTT_IMPLEMENTATION.md +++ b/MQTT_IMPLEMENTATION.md @@ -289,41 +289,67 @@ Each slot (1-6) supports the following commands: - `set mqttN.topic