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

Support LWT messages when using TASMESH #20392

Merged
merged 9 commits into from
Feb 18, 2024
Merged

Conversation

pipe01
Copy link
Contributor

@pipe01 pipe01 commented Jan 4, 2024

Description:

This PR enables the TASMESH broker to detect when nodes come online and offline through the use of heartbeat packets. When a change is detected, the corresponding LWT Online or Offline message is sent through MQTT.

Related issue (if applicable): fixes #20369 and #20375

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 with Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works with Tasmota core ESP32 V.2.0.14
  • I accept the CLA.

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

@pipe01 pipe01 changed the title Mesh lwt Support LWT messages when using TASMESH Jan 4, 2024
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.

Please change the defines

tasmota/my_user_config.h Outdated Show resolved Hide resolved
tasmota/my_user_config.h Outdated Show resolved Hide resolved
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 Jan 29, 2024
@Jason2866 Jason2866 removed the stale Action - Issue left behind - Used by the BOT to call for attention label Jan 30, 2024
@Jason2866
Copy link
Collaborator

@Staars fine for you?

@Staars
Copy link
Contributor

Staars commented Feb 5, 2024

No complaints from my side.
We had the topic of LWT on our radar relatively early on, but have not yet started any concrete implementations. These are always best created based on concrete problems and solutions. I assume the PR works as intended and has been tested for some time.

I remember thinking relatively early on about the concept of different nodes, which could be "always on" or "uncertainly accessible". The former should send a guaranteed heartbeat, where the absence would indicate an error.
The latter would only report when they wake up from a deep sleep, for example, and would not take part in forwarding data packets. In order to control this remotely, a functioning LWT would be necessary. However, due to a lack of concrete applications, I didn't pursue the concept any further.

@arendst arendst merged commit d77cf7d into arendst:development Feb 18, 2024
64 checks passed
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.

Fire trigger on Tasmesh broker when a node disconnects
6 participants