HASS.Agent icon indicating copy to clipboard operation
HASS.Agent copied to clipboard

Bug: MQTT disconnects before sleep, grace period unreliable

Open lbandi2 opened this issue 3 years ago • 4 comments

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

lbandi2 avatar Jun 15 '22 16:06 lbandi2

Have you tried setting this to a higher value:

image

LAB02-Admin avatar Jun 15 '22 18:06 LAB02-Admin

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?

lbandi2 avatar Jun 16 '22 13:06 lbandi2

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 avatar Jun 16 '22 14:06 LAB02-Admin

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

lbandi2 avatar Jun 16 '22 15:06 lbandi2

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

Closing this one to keep it in one place.

LAB02-Admin avatar Nov 01 '22 12:11 LAB02-Admin