Hello,
I have submitted a PR ( [SYS] Feature/global filter and tests by Odyno · Pull Request #2252 · 1technophile/OpenMQTTGateway · GitHub ) for OMG that introduces a new feature, along with unit tests and some refactoring required to finalize the functionality. I hope I have followed the right path as described in the community discussion here: Maintainer Preferred Path: PR or Discussion First? + Long-Term Plan Inquiry .
The main feature is a filtering system that allows managing output messages from the broker. It works at both the message and topic levels, and it is possible to create rules for explicit allow or deny. (Full documentation here: OpenMQTTGateway/docs/use/gateway.md at feature/global-filter-and-tests · Odyno/OpenMQTTGateway · GitHub )
To support this feature, I also added unit test capabilities. It is now possible to create unit tests for both embedded and native environments (other documentation for test: OpenMQTTGateway/test at feature/global-filter-and-tests · Odyno/OpenMQTTGateway · GitHub ). Currently, there are already more than 150 unit tests available for this functionality.
This system is on top of the development branch but not based on the HEAD of the development branch; it builds on the PR we have been discussing for over a year regarding configuration management. ( The full story here [RF] Refactor RF Configuration Management ( first part of PR Introduced WhiteList and BlackList of RF Signal ) by Odyno · Pull Request #2181 · 1technophile/OpenMQTTGateway · GitHub and then [RF] Introduced WhiteList and BlackList of RF Signal ( code from #2181 PR) by Odyno · Pull Request #2237 · 1technophile/OpenMQTTGateway · GitHub and finally [RF] Refactor RF Configuration Management by Odyno · Pull Request #2245 · 1technophile/OpenMQTTGateway · GitHub )
Consequently, this branch includes necessary refactoring in the following areas:
-
(only) RF Config Management: the start of the story (checkout the base structure on OpenMQTTGateway/main/rf at feature/global-filter-and-tests · Odyno/OpenMQTTGateway · GitHub )
-
Isolation of Log Management: in a way that includes only the essential data required for managing Logging actions and makes it compatible with both ESP and native environments. (Check out the new file OpenMQTTGateway/main/TheengsLogs.h at feature/global-filter-and-tests · Odyno/OpenMQTTGateway · GitHub , the problem of ESP8266 on OpenMQTTGateway/main/TheengsLogs.h at feature/global-filter-and-tests · Odyno/OpenMQTTGateway · GitHub and the confirmation of retrocompatibility required Is the ESP8266 still supported, is there still a need to maintain backward compatibility? )
-
JSON Message configuration Isolation: The concept refers to structuring and handling JSON messages in a way that includes only the essential data required for managing static JSON content, while excluding any additional native or platform-specific attributes. ( checkout OpenMQTTGateway/main/config_JSONMessages.h at feature/global-filter-and-tests · Odyno/OpenMQTTGateway · GitHub )
-
Storage System Abstraction: Activated only for ESP32, disabled in other cases, with the option to implement any storage mechanism. (Check out the abstraction here OpenMQTTGateway/main/storage at feature/global-filter-and-tests · Odyno/OpenMQTTGateway · GitHub )
-
Review the Github workflow: to perform also unit test (Checkout [SYS] Feature/global filter and tests · 1technophile/OpenMQTTGateway@21dbbce · GitHub)
-
An overall abstraction in order to test it on native env
Given the amount of work involved and the discussion, I would appreciate it if you could evaluate whether this approach is of interest.
If so, we could consider merging back into the developement branch and then proceed with further improvements (e.g., additional configurations or removing filters currently limited to Bluetooth, etc.) to avoid making this merge overly complex.
If this direction is not aligned with the project’s priorities, I will continue developing this version independently without further requests for integration. I simply need clarity so we can either move forward