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

Bug: sensors become unavailable, and log errors

Open Anto79-ops opened this issue 2 years ago • 12 comments

Hello Running HASS agent 2022.14.0 in HA and Windows 10 computer

from time-to-time, I see that all my sensors are unavailable in Home Assistant (2023.2.4 and previous versions), but everything is green on HASS_agent system status:

image

I checked the HASS Agent logs, and there are some errors but not sure what they mean:

2023-02-15 12:53:06.594 -07:00 [INF] [MAIN] HASS.Agent version: 2022.14.0
2023-02-15 12:53:06.606 -07:00 [INF] [SETTINGS] Config storage path: C:\Users\atoms\AppData\Roaming\LAB02 Research\HASS.Agent\config
2023-02-15 12:53:07.084 -07:00 [INF] [SETTINGS] Configuration loaded
2023-02-15 12:53:07.092 -07:00 [INF] [LOCALIZATION] Selected UI culture: [en] English
2023-02-15 12:53:07.652 -07:00 [INF] [SETTINGS_QUICKACTIONS] Loaded 1 entities
2023-02-15 12:53:07.717 -07:00 [INF] [SETTINGS_COMMANDS] Loaded 2 entities
2023-02-15 12:53:16.671 -07:00 [INF] [SETTINGS_SENSORS] Loaded 10 entities
2023-02-15 12:53:16.680 -07:00 [INF] [HOTKEY] Completed bind for global quickaction hotkey
2023-02-15 12:53:16.681 -07:00 [INF] [HOTKEY] Completed bind for 1 individual quickaction hotkeys
2023-02-15 12:53:16.770 -07:00 [INF] [LOCALAPI] Initializing ..
2023-02-15 12:53:16.771 -07:00 [INF] [MQTT] Identifying as device: [redacted]_HP
2023-02-15 12:53:16.778 -07:00 [INF] [SERVICE] Local install path: C:\Program Files (x86)\LAB02 Research\HASS.Agent Satellite Service\
2023-02-15 12:53:16.787 -07:00 [INF] [MQTT] Connecting ..
2023-02-15 12:53:17.713 -07:00 [INF] [MQTT] Connected
2023-02-15 12:53:17.721 -07:00 [INF] [MEDIA] Ready
2023-02-15 12:53:17.824 -07:00 [WRN] [NOTIFIER] Showing notifications might fail, reason: DisabledForApplication
2023-02-15 12:53:17.824 -07:00 [INF] [NOTIFIER] Ready
2023-02-15 12:53:17.996 -07:00 [INF] [HASS_API] Home Assistant version: 2023.2.4
2023-02-15 12:53:18.151 -07:00 [INF] [LOCALAPI] listening on port 5115
2023-02-15 12:53:18.940 -07:00 [INF] [MQTT] Initial registration completed
2023-02-15 12:53:21.715 -07:00 [INF] [HASS_API] System connected with http://homeassistant.local:8123
2023-02-15 07:30:51.264 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 07:31:23.353 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 07:58:19.518 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 08:19:43.671 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 08:20:01.626 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 08:30:42.827 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 08:34:16.963 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 08:34:37.590 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 08:44:08.849 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 08:44:29.358 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 08:55:48.818 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 10:05:20.180 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 11:00:58.364 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)
2023-02-15 11:01:53.728 -07:00 [ERR] [NOTIFIER] Notification failed to show: Settings prevent the notification from being delivered. (0x803E0111)

Any idea what this means? thanks

Anto79-ops avatar Feb 15 '23 18:02 Anto79-ops

Im also getting this but the difference being that only my clock speed, Last Boot and Current user go 'unavailable' All others, disk use etc, all work as id expect but Hass agent needs to be restarted in order for the above sensors to be giving expected readings again

jouster1974 avatar Feb 15 '23 21:02 jouster1974

Im also getting this but the difference being that only my clock speed, Last Boot and Current user go 'unavailable' All others, disk use etc, all work as id expect but Hass agent needs to be restarted in order for the above sensors to be giving expected readings again

yes, good point. I should mention that once I restart HASS agent, the sensors comes back.

Anto79-ops avatar Feb 16 '23 19:02 Anto79-ops

I have similar problem, i've also ried to restart homeassistant and hass agent but nothing helps

NickyMB avatar Feb 16 '23 21:02 NickyMB

Same problem.

Luupw3d avatar Mar 28 '23 16:03 Luupw3d

Hello, I had the same issue, I enabled notification from apps and other senders in system settings: https://github.com/LAB02-Research/HASS.Agent-Notifier/issues/2#issuecomment-998913754 Now it works!

Chucky2401 avatar Mar 31 '23 19:03 Chucky2401

Maybe irrelevant to this issue, but at least related in the first place (I decided to not blindly create a new issue for now):

Is it normal for all Home Assistant entities (buttons and sensors) provided by HASS.Agent through MQTT to render unavailable once the client/Windows machine running HASS.Agent is switched off?

I expected all entities to keep the latest state, as all integrations do... not sure if this "works as expected" or it's an issue...


Update: let's find this out @ https://github.com/LAB02-Research/HASS.Agent/issues/301.

bcutter avatar Mar 31 '23 21:03 bcutter

I have a similar issue as well. I tried using a Publish All Sensors button but there's a WMIQuery that runs to see if any games are running and that sensor does not publish properly using that method and continues to show unavailable.

projektdotnet avatar Apr 27 '23 18:04 projektdotnet

guess this is abandoned project then now :-(

thefunkygibbon avatar Mar 17 '24 20:03 thefunkygibbon

No, it's alive and well in another fork.

https://discord.com/invite/wzzEjBJG

Anto79-ops avatar Mar 17 '24 20:03 Anto79-ops

No, it's alive and well in another fork.

https://discord.com/invite/wzzEjBJG

So the fork has fixed this issue (#272)?

bcutter avatar Mar 17 '24 22:03 bcutter

For me, running Hass.agent 2.1.0-beta1, so far 2 weeks this has not happened

Anto79-ops avatar Mar 17 '24 23:03 Anto79-ops

No, it's alive and well in another fork.

https://discord.com/invite/wzzEjBJG

awesome...mamy thanks for the heads-up. working fine 👍 😁

thefunkygibbon avatar Mar 18 '24 07:03 thefunkygibbon