filter message defs by users levels as well

This commit is contained in:
John
2022-02-05 13:23:26 +01:00
parent 1d232e211f
commit 702ca67368
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -101,6 +101,7 @@ filter-seen = 1
# HA integration: filter to some useful names for monitoring the heating circuit
filter-name = status|temp|yield|count|energy|power|runtime|hours|starts|mode|curve|^load$|^party$
# include only messages having the specified level (partial match, alternatives and wildcard supported).
# Note: This is a filter on top of the messages already filtered implicitly for the ebusd "mqtt" user (if any).
# Note: Since the empty string matches all levels, an explicit check for empty string (with "^$") needs to be used for
# including only messages without a level.
filter-level = ^$
+1
View File
@@ -93,6 +93,7 @@ filter-seen = 1
# include only messages having the specified name (partial match, alternatives and wildcard supported).
#filter-name =
# include only messages having the specified level (partial match, alternatives and wildcard supported).
# Note: This is a filter on top of the messages already filtered implicitly for the ebusd "mqtt" user (if any).
# Note: Since the empty string matches all levels, an explicit check for empty string (with "^$") needs to be used for
# including only messages without a level.
filter-level = ^$
+1 -1
View File
@@ -1353,7 +1353,7 @@ void MqttHandler::run() {
if (m_connected && m_hasDefinitionTopic) {
ostringstream ostr;
deque<Message*> messages;
m_messages->findAll("", "", "", false, true, true, true, true, true, 0, 0, false, &messages);
m_messages->findAll("", "", m_levels, false, true, true, true, true, true, 0, 0, false, &messages);
for (const auto& message : messages) {
if (filterSeen) {
if (message->getLastUpdateTime()==0) {