diff --git a/contrib/etc/ebusd/mqtt-hassio.cfg b/contrib/etc/ebusd/mqtt-hassio.cfg index 4a7baa3c..f9aa0702 100644 --- a/contrib/etc/ebusd/mqtt-hassio.cfg +++ b/contrib/etc/ebusd/mqtt-hassio.cfg @@ -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 = ^$ diff --git a/contrib/etc/ebusd/mqtt-integration.cfg b/contrib/etc/ebusd/mqtt-integration.cfg index 59fdeb50..bc58eeef 100644 --- a/contrib/etc/ebusd/mqtt-integration.cfg +++ b/contrib/etc/ebusd/mqtt-integration.cfg @@ -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 = ^$ diff --git a/src/ebusd/mqtthandler.cpp b/src/ebusd/mqtthandler.cpp index a8fbb855..2b436b77 100755 --- a/src/ebusd/mqtthandler.cpp +++ b/src/ebusd/mqtthandler.cpp @@ -1353,7 +1353,7 @@ void MqttHandler::run() { if (m_connected && m_hasDefinitionTopic) { ostringstream ostr; deque 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) {