LAB02-Research / HASS.Agent

Windows-based client for Home Assistant. Provides notifications, quick actions, commands, sensors and more.
https://hassagent.lab02-research.org
MIT License
1.59k stars 73 forks source link

Bug: sensors become unavailable, and log errors #272

Open Anto79-ops opened 1 year ago

Anto79-ops commented 1 year ago

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

jouster1974 commented 1 year ago

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

Anto79-ops commented 1 year ago

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.

NickyMB commented 1 year ago

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

Luupw3d commented 1 year ago

Same problem.

Chucky2401 commented 1 year ago

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!

bcutter commented 1 year ago

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.

projektdotnet commented 1 year ago

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.

thefunkygibbon commented 8 months ago

guess this is abandoned project then now :-(

Anto79-ops commented 8 months ago

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

https://discord.com/invite/wzzEjBJG

bcutter commented 8 months ago

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

https://discord.com/invite/wzzEjBJG

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

Anto79-ops commented 8 months ago

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

thefunkygibbon commented 8 months ago

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

https://discord.com/invite/wzzEjBJG

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