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

Bug: MQTT messages are not sent with retain flag although HASS.agent is set to do so #128

Closed
3 of 4 tasks
TarcisioMenezes opened this issue Jul 25, 2022 · 2 comments
Closed
3 of 4 tasks
Assignees
Labels
bug Something isn't working

Comments

@TarcisioMenezes
Copy link

TarcisioMenezes commented Jul 25, 2022

Describe the bug
Although I have marked the option "retain flag" for MQTT, it seems it doesn't work. Checked with some MQTT clients and I don't see the sensor messages being sent as retained.
I can confirm that If I restart my Home Assistant server, all the sensors from Hass.agent will change to "Unknown" until the MQTT broker gets another updated message. (Occurs for both Hass.agent and Satellite Service sensors)

Expected behavior
I was expecting the #/state topic messages to be sent with a retain flag then Home Assistant would show the last sensors states after restart.

For instance, if I inspect the topic "homeassistant/sensor/WINDOWS_10/WINDOWS_10_lastboot/state" there is not retain flag, therefore the state of the entity inside Home Assistant will be "unknown" until I either restart Hass.agent, Windows or the entity changes its state (which can take days for some entities. E.g. Last boot entity).

Screenshots
image

image

image

Misc info (please complete the following information):

  • Windows build (ideally screenshot/info of winver.exe output): Windows 10 Version 21H2 (OS Build 19044.1826)
  • Windows' UI language: English
  • HASS.Agent version: 2022.12.0

Please check what's applicable (multiple answers possible):

  • Installed via installer
  • Installed manually
  • Problem occurs in HASS.Agent
  • Problem occurs in Satellite Service
@LAB02-Admin
Copy link
Member

LAB02-Admin commented Aug 1, 2022

Thanks for the extensive report, I'll look into it!

[hassagent-128]

@LAB02-Admin LAB02-Admin changed the title MQTT messages are not sent with retain flag although HASS.agent is set to do so. Bug: MQTT messages are not sent with retain flag although HASS.agent is set to do so Aug 1, 2022
@LAB02-Admin LAB02-Admin self-assigned this Aug 1, 2022
@LAB02-Admin LAB02-Admin added the bug Something isn't working label Aug 1, 2022
@LAB02-Admin
Copy link
Member

(hopefully) fixed in the latest beta: https://github.com/LAB02-Research/HASS.Agent/releases/tag/2022.13.0-beta2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants