Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added options to retain info and state mqtt messages #11079

Closed
wants to merge 0 commits into from

Conversation

jeroenst
Copy link
Contributor

@jeroenst jeroenst commented Feb 22, 2021

Description:

With this pr it is possible to retain info and state messages, configurable with inforetain and stateretain commands in the console.

#11067

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works on Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works on Tasmota core ESP32 V.1.0.5-rc6
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

tasmota/settings.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@s-hadinger s-hadinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to honor SetOption 104 no_retain and never send a retained message if it's set. Otherwise it will close the Mqtt connection

Copy link
Contributor Author

@jeroenst jeroenst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to honor SetOption 104 no_retain and never send a retained message if it's set. Otherwise it will close the Mqtt connection

This is honoration is already in the current code:

if (Settings.flag4.mqtt_no_retain) {
retained = false; // Some brokers don't support retained, they will disconnect if received
}

tasmota/settings.h Outdated Show resolved Hide resolved
jeroenst pushed a commit to jeroenst/Tasmota that referenced this pull request Feb 22, 2021
@jeroenst jeroenst closed this Feb 22, 2021
jeroenst pushed a commit to jeroenst/Tasmota that referenced this pull request Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants