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 StatusRetain command #11109

Closed
wants to merge 3 commits into from
Closed

Conversation

jeroenst
Copy link
Contributor

Description:

Added statusretain #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

@jeroenst jeroenst changed the title Added StatusRetain command https://github.com/arendst/Tasmota/discuss… Added StatusRetain command Feb 23, 2021
@ascillato
Copy link
Contributor

Hi, your change to the release notes is conflicting with the actual codebase. Please, delete it.

@jeroenst
Copy link
Contributor Author

I changed the conflicting release notes instead, is that ok?

@arendst
Copy link
Owner

arendst commented Feb 24, 2021

On hold for now as these "retain" changes are just marginal requests while I was able to keep Tasmota away of the HASS policy for many years. It adds code not used by any decent user except the famous MQTT retain afficionados...

I also wonder if the retain stop code works for all status messages.

@arendst arendst added the on hold by dev team Result - Feature request put on hold by member of development team label Feb 24, 2021
@jeroenst
Copy link
Contributor Author

jeroenst commented Feb 24, 2021

Retain stop works for all messages, retain stop is applied juist before sending to mqtt broker.

@jeroenst
Copy link
Contributor Author

jeroenst commented Feb 24, 2021

I would like to see this option to be merged so I can display status info on my dashboard.

There is no way at this moment to send status 0 retrained.

@Jason2866
Copy link
Collaborator

Jason2866 commented Feb 24, 2021

Why using "retain" in general? Just query the devices and you get the actual real state.
I do not see any need for retain functions for Tasmota. Any status can be "asked"
A example https://tasmota.github.io/docs/Home-Assistant/#useful-automations
IMHO retain does generate more problems than it maybe solves

@jeroenst
Copy link
Contributor Author

jeroenst commented Feb 24, 2021

  1. Because it generates less traffic. When there are many clients (my dashboard in javascript i.e.) connecting and leaving the mqtt server it generates a huge amount of traffic which is prevented by retaining the messages
  2. Because just subscribing to the topic is enough to get the data, otherwise every client who is interested has first to send an additional request to get the data. In nodered this means additional nodes to be configured.

@jziolkowski
Copy link
Contributor

And what's wrong with having a lot of MQTT traffic? It was designed exactly for that.

@Jason2866
Copy link
Collaborator

@jeroenst The beauty of open source. You have made the changes you want/like.
As the project owner already wrote he does not like adding code for this.

@jeroenst
Copy link
Contributor Author

jeroenst commented Feb 24, 2021

@jeroenst The beauty of open source. You have made the changes you want/like.
As the project owner already wrote he does not like adding code for this.

I can do that but than I need to merge it over and over with upstream development branch. And I think this would be a good thing if it's added.

At this moment I use my own firmware, but if Tasmota is a good alternative for me I'm willing to make effort in developing Tasmota instead of my own project.

@github-actions
Copy link

This PR has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Action - Issue left behind - Used by the BOT to call for attention label Mar 21, 2021
@github-actions
Copy link

This PR was automatically closed because of being stale.

@github-actions github-actions bot closed this Mar 26, 2021
@jeroenst
Copy link
Contributor Author

@arendst any chance this can be implemented?

Again I try to make a status page, but again I bump into non retained messages of the tasmota, forcing me to create a kind of retain bridge which is not very nice and clean...

@jeroenst
Copy link
Contributor Author

jeroenst commented Nov 15, 2021

@arendst the status was changed to on-hold a while ago. What can I do to get this change into the main branch?

@ascillato ascillato mentioned this pull request Nov 15, 2021
2 tasks
arendst added a commit that referenced this pull request Aug 19, 2022
Add command ``StatusRetain`` (#11109)
@jeroenst
Copy link
Contributor Author

jeroenst commented Sep 26, 2022

Statusretain is working correctly in 12.1.1.2 development branch commit e3c7733

I tested with shelly 1, shelly dimmer 2, shelly 2.5, sonoff zbridge, athom power plug and Athom RGBWW bulb.

Everything seems to work fine. Thank you @arendst

image

This status page is created by: https://github.com/jeroenst/espweb/

@jeroenst jeroenst deleted the statusretain branch September 26, 2022 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold by dev team Result - Feature request put on hold by member of development team stale Action - Issue left behind - Used by the BOT to call for attention
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants