Skip to content

MQTT retain setting #2263

Closed
Closed

Description

@Aircoookie

Is your feature request related to a problem? Please describe.
WLED MQTT messages are mostly retained, this could lead to broker storage issues and/or annoying residual messages.

Describe the solution you'd like
A checkbox for setting whether publishes from WLED should retain or not.

Describe alternatives you've considered
Editing mqtt.cpp

Additional context
By Karl_S via Discord #learning

Activity

  1. blazoncek commented on Oct 11, 2021

    @blazoncek
    Contributor

    I would assert that retained messages are a bad habit, especially since there is no user friendly way to remove obsolete retained messages.
    There are some justifications for them (i.e. quicker last known state retrieval, etc) but potential problems out-weight them.
    Perhaps adding periodic state messages (1/min) could be used instead.
    It has to be noted that many (and/or large) MQTT messages may yield dropped frames.

  2. AK5nowman commented on Oct 17, 2021

    @AK5nowman

    I could see this being useful for short-lived or temporary displays. For anything other than that I think retained is the way to go. Why add the extra overhead of periodically refreshing the MQTT data on an already constrained device. It is pretty easy to clean up your topic tree with utilities like MQTT Explorer.

  3. blazoncek commented on Oct 17, 2021

    @blazoncek
    Contributor

    Ordinary people don't use MQTT Explorer.
    They should have no need to as well.

  4. added this to the 0.13.0 milestone on Nov 3, 2021
  5. blazoncek commented on May 26, 2023

    @blazoncek
    Contributor

    There are 3 topics that are retained: /g, /c and /status.
    As status is also LWT it should not be non-retained.

    My proposal is to remove retain options from /g and /c topics altogether.

  6. blazoncek commented on Jun 7, 2023

    @blazoncek
    Contributor

    Fixed in #3220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions