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 disconnects before sleep, grace period unreliable #85

Closed
lbandi2 opened this issue Jun 15, 2022 · 5 comments
Closed

Bug: MQTT disconnects before sleep, grace period unreliable #85

lbandi2 opened this issue Jun 15, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@lbandi2
Copy link

lbandi2 commented Jun 15, 2022

The program works perfectly, but whenever I resume my computer from sleep, Hass agent reports 'MQTT failed to connect' which is kind of annoying to dismiss the notification event though it reconnects just fine (after resuming).

To Reproduce
Steps to reproduce the behavior:

  1. Let your windows session go to sleep
  2. Resume
  3. Message should pop up

Expected behavior
Hass agent should detect when the computer goes to sleep so as to not notify that it can't connect to MQTT.

  • Windows 11
  • HASS.Agent version: 2022.12.0-beta4
@LAB02-Admin
Copy link
Member

Have you tried setting this to a higher value:

image

@lbandi2
Copy link
Author

lbandi2 commented Jun 16, 2022

So after testing it yesterday, I set the option you highlited to ~16-17 minutes and the sleep time of my pc to 15 minutes. What I found today is that the message occurs anyway and I had the feeling that it was before going to sleep, but it happens the instant that the pc resumes.

Any ideas?

@LAB02-Admin
Copy link
Member

LAB02-Admin commented Jun 16, 2022

Interesting, thanks for checking that out! Hadn't occured to me that the disconnect can happen before going to sleep, that can mess with the counter.

I'll improve it and let you know

[#hassagent-102]

@LAB02-Admin LAB02-Admin self-assigned this Jun 16, 2022
@LAB02-Admin LAB02-Admin added the bug Something isn't working label Jun 16, 2022
@LAB02-Admin LAB02-Admin changed the title PC reports 'MQTT failed to connect' after resuming Bug: MQTT disconnects before sleep, grace period unreliable Jun 16, 2022
@lbandi2
Copy link
Author

lbandi2 commented Jun 16, 2022

Awesome, let me know if you need logs or anything else.

@LAB02-Admin
Copy link
Member

I've merged all tickets related to this issue into a central pinned one: [#204]

Closing this one to keep it in one place.

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