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

Non-retained LWTT topic incorrect state issues with other clients, including Home Assistant #94

Closed
cmroche opened this issue Jan 22, 2021 · 1 comment · Fixed by #100

Comments

@cmroche
Copy link
Contributor

cmroche commented Jan 22, 2021

What were you doing?

  1. Disable retain
  2. Connect Octoprint with this plugin to MQTT service
  3. Disconnect client (home assistant) from MQTT service, and reconnect
  4. Status of device will be unavailable until Octoprint is restarted

What did you expect to happen?

Status of devices remained available.

What happened instead?

Status of devices are unavailable until octoprint is restarted.

Why did it happen?

The LWTT topic is not retained in this case, but HA (and presumably other clients) are watching this topic to know if valid data is coming in from the device. This topic is stateful by nature as a result.

When LWTT is not retained, and the listening client reconnect, it is unable to determine the state (the will published a retained disconnect on top of that), so disconnected tends to be retained in this context anyway.

Given how this topic is intended to be used, I think it makes sense that it is always retained. Or a separate option to control retain on this topic from the rest.

This bug is related to: cmroche/OctoPrint-HomeAssistant#55

@jasonalsing
Copy link

@cmroche is there any update to this? I see the #100 has been approved but not committed for 1 year now...Would love this fix...

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 a pull request may close this issue.

2 participants