HASS.Agent: Windows client to receive notifications, use commands, sensors, quick actions and more!

Hi all, since yesterday HASS agent no longer starts nor can be reinstalled on Windows 11. I get an error message regarding a dotnet DLL
Both sfc /scannow or DISM are completely error free, and Netfx repair have nothing to do.
This is popup error message:
2024-01-10_180256

Any ideas?

try with newer, unofficial version HERE.

No joy, same problem…

i’m using dotnet 7.05 without issues, maybe downgrade?

dotnet downloads

Installed .net 8.0.1… works fine!

hass.agent is simply brilliant. But I have a question, there is the named.window sensor. Is it possible to work with wildcards. Most windows have the name of the open file in the window title and are therefore not really recognizable. Sorry for my bad English …

Is there a sensor to check if the computer is downloading something? I have a sensor for last active, so when I stop using the machine it shuts down, but what if I have a download going through a browser? I want a 2 step system running to check if I have been away for 15 mins and there’s no download going on.

Haven’t tried this myself, but I’m thinking you could set up a PerformanceCounter sensor and use the TCPv4 object, Segments Received/sec counter. If you have a value greater than a threshold (you pick) it indicates you’re still receiving some data.

Ever figure this out as i’m looking to do the same. Was thinking of maybe utilising “DataReceivedMB” somehow…

Hi everyone, how can I get correct state attributes of media player in Hass.Agent in HAOS such as : volume, media_duration, media_position or media_position…

When I play wwith media player Hass.Agent via MQTT, the media player can’t get correct attributes and can’t play/pause . The state of media set to idle immediately after it set to playing
It’s seem it’s one way send data to pc without sync state of it.
Anyone have solutions for this. Thanks

Helo, i would like to know is it possible for HASS.Agent to “read” / “catch” notifications from Windows?

For example i want specific automations to run whenever specific person / group chat me on WhatsApp. Is it really possible to do it with HASS.Agent?

I know there’s notifications sensor on Android devices but i have an iPhone.

has anyone an idea how i can get a “unit_of_measurement” off an wmi-sensor? (CPU Temp?)

I retrieve the data via WmiQuerySensor > \.\ROOT\LibreHardwareMonitor > SELECT value FROM Sensor WHERE Name LIKE “%CPU Core%” AND SensorType = “Temperature”

But in HA, the unit is missing.
temp

thanks!

There may be a better/more efficient way to do it, but my goto solution for things like this, is to create a template sensor based on the state of the sensor provided by HASS.Agent and add the unit_of_mesurement to that.

like this?

- platform: template
  sensors:
    pcmark_temp:
      friendly_name: "CPU TEMP"
      unit_of_measurement: "°C"
      value_template: sensor.pcmark_pcmark_cputemp

i tried, but its not working.

got it.

solution is:

create this in configuration.yaml

homeassistant:
  customize: !include customize.yaml

and this in the customize.yaml

sensor.pcmark_pcmark_cputemp:
  unit_of_measurement: '°C'

woohoo.

1 Like

Yes, that’s definitely a more efficient way than creating a template sensor!

Trying to set up HASS.Agent for the first time, but I’m on a laptop outside my home network. I access HA remotely via a custom domain via a Cloudflare tunnel.
Obv I tried setting up MQTT using the domain and it’s failing to connect.

Is there a way to make the client work remotely? I don’t think I should create a subdomain tunnel to my MQTT port directly exposed to the internet. But then I don’t see how this can work when outside home at all.

You want to focus on getting it to work with home assistant locally, then you can control things through your remote instance.

1 Like

I am on the last ver 2022.14.0 from the original developer install. It seems hass.agent is acting up upon every Ha reboot. I would lose the notify service. A reload would fix, but would be a hassle to do every time. I noticed there is an unofficial installer. When I try to install it, it is prompting to install in a different directory. Would it be an issue if I install it over the existing version? I am hoping I don’t need to re-setup after the install since I don’t remember what I did. It has been awhile.

I manage to set it up locally and I connected the integration in HA. The media player control appeared automatically and works.

I tried adding a few sensors to HASS.Agent. First time there was an error, but then I did fewer at a time saving and it saved, and they seem to have been stored properly, but do not show in HA at all. I’ve tried rebooting both, but nothing. Log here:

2024-03-22 09:36:14.962 +00:00 [INF] [MAIN] HASS.Agent version: 2022.14.0
2024-03-22 09:36:15.006 +00:00 [INF] [SETTINGS] Config storage path: C:\Users\axdr\AppData\Roaming\LAB02 Research\HASS.Agent\config
2024-03-22 09:36:15.869 +00:00 [INF] [SETTINGS] Configuration loaded
2024-03-22 09:36:15.886 +00:00 [INF] [LOCALIZATION] Selected UI culture: [en] English
2024-03-22 09:36:16.570 +00:00 [INF] [SETTINGS_QUICKACTIONS] Config not found, no entities loaded
2024-03-22 09:36:16.573 +00:00 [INF] [SETTINGS_COMMANDS] Config not found, no entities loaded
2024-03-22 09:36:16.575 +00:00 [INF] [SETTINGS_SENSORS] Config not found, no entities loaded
2024-03-22 09:36:16.591 +00:00 [INF] [HOTKEY] Completed bind for global quickaction hotkey
2024-03-22 09:36:16.720 +00:00 [INF] [MQTT] Identifying as device: LegionLaptop
2024-03-22 09:36:16.822 +00:00 [INF] [SERVICE] Local install path: C:\Program Files (x86)\LAB02 Research\HASS.Agent Satellite Service\
2024-03-22 09:36:17.378 +00:00 [INF] [LOCALAPI] Disabled
2024-03-22 09:36:17.506 +00:00 [INF] [MQTT] Connecting ..
2024-03-22 09:36:17.782 +00:00 [INF] [MEDIA] Ready
2024-03-22 09:36:17.798 +00:00 [INF] [NOTIFIER] Ready
2024-03-22 09:36:17.948 +00:00 [INF] [HASS_API] Home Assistant version: 2024.3.1
2024-03-22 09:36:18.563 +00:00 [INF] [HASS_API] System connected with https://ha.axeldelrod.com
2024-03-22 09:37:27.727 +00:00 [WRN] [MQTT] Disconnected: UnspecifiedError
2024-03-22 09:37:27.812 +00:00 [ERR] [MQTT] Error while connecting: Connection timed out
2024-03-22 09:43:55.486 +00:00 [INF] [SETTINGS] Configuration stored
2024-03-22 09:43:57.430 +00:00 [INF] [SYSTEM] Application shutting down
2024-03-22 09:43:57.431 +00:00 [INF] [MQTT] Disconnected
2024-03-22 09:43:57.445 +00:00 [INF] [SYSTEM] Application shutdown complete
2024-03-22 09:43:59.485 +00:00 [INF] [MAIN] HASS.Agent version: 2022.14.0
2024-03-22 09:43:59.490 +00:00 [INF] [SETTINGS] Config storage path: C:\Users\axdr\AppData\Roaming\LAB02 Research\HASS.Agent\config
2024-03-22 09:43:59.613 +00:00 [INF] [SETTINGS] Configuration loaded
2024-03-22 09:43:59.616 +00:00 [INF] [LOCALIZATION] Selected UI culture: [en] English
2024-03-22 09:43:59.774 +00:00 [INF] [SETTINGS_QUICKACTIONS] Config not found, no entities loaded
2024-03-22 09:43:59.775 +00:00 [INF] [SETTINGS_COMMANDS] Config not found, no entities loaded
2024-03-22 09:43:59.776 +00:00 [INF] [SETTINGS_SENSORS] Config not found, no entities loaded
2024-03-22 09:43:59.779 +00:00 [INF] [LOCALAPI] Disabled
2024-03-22 09:43:59.780 +00:00 [INF] [SERVICE] Local install path: C:\Program Files (x86)\LAB02 Research\HASS.Agent Satellite Service\
2024-03-22 09:43:59.781 +00:00 [INF] [MQTT] Identifying as device: LegionLaptop
2024-03-22 09:43:59.784 +00:00 [INF] [HOTKEY] Completed bind for global quickaction hotkey
2024-03-22 09:43:59.785 +00:00 [INF] [MQTT] Connecting ..
2024-03-22 09:43:59.830 +00:00 [INF] [MQTT] Connected
2024-03-22 09:43:59.869 +00:00 [INF] [NOTIFIER] Ready
2024-03-22 09:43:59.892 +00:00 [INF] [MEDIA] Ready
2024-03-22 09:43:59.932 +00:00 [INF] [HASS_API] Home Assistant version: 2024.3.1
2024-03-22 09:44:00.499 +00:00 [INF] [HASS_API] System connected with https://redacted.com
2024-03-22 09:44:01.816 +00:00 [INF] [MQTT] Initial registration completed
2024-03-22 09:44:17.769 +00:00 [INF] [HASS_API] Server recovered from failed state
2024-03-22 09:45:01.425 +00:00 [INF] [SETTINGS_SENSORS] Stored 0 entities
2024-03-22 09:50:35.804 +00:00 [FTL] [SENSORSMANAGER] Error while storing: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.RemoveAt(Int32 index)
   at HASS.Agent.Sensors.SensorsManager.StoreAsync(List`1 sensors, List`1 toBeDeletedSensors)
2024-03-22 09:51:29.468 +00:00 [INF] [SENSORS] Added single-value sensor: LegionLaptop_activewindow
2024-03-22 09:51:29.479 +00:00 [INF] [SETTINGS_SENSORS] Stored 1 entities
2024-03-22 09:51:53.719 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_activewindow
2024-03-22 09:51:53.734 +00:00 [INF] [SENSORS] Added multi-value sensor: LegionLaptop_battery
2024-03-22 09:51:53.735 +00:00 [INF] [SENSORS] Added single-value sensor: LegionLaptop_cpuload
2024-03-22 09:51:53.737 +00:00 [INF] [SETTINGS_SENSORS] Stored 3 entities
2024-03-22 09:52:25.181 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_activewindow
2024-03-22 09:52:25.182 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_cpuload
2024-03-22 09:52:25.183 +00:00 [INF] [SENSORS] Modified multi-value sensor: LegionLaptop_battery
2024-03-22 09:52:26.354 +00:00 [INF] [SENSORS] Added single-value sensor: LegionLaptop_currentclockspeed
2024-03-22 09:52:26.360 +00:00 [INF] [SENSORS] Added multi-value sensor: LegionLaptop_display
2024-03-22 09:52:26.388 +00:00 [INF] [SENSORS] Added single-value sensor: LegionLaptop_geolocation
2024-03-22 09:52:28.830 +00:00 [INF] [SENSORS] Added single-value sensor: LegionLaptop_gpuload
2024-03-22 09:52:30.989 +00:00 [INF] [SENSORS] Added single-value sensor: LegionLaptop_gputemperature
2024-03-22 09:52:30.991 +00:00 [INF] [SENSORS] Added single-value sensor: LegionLaptop_lastactive
2024-03-22 09:52:30.991 +00:00 [INF] [SETTINGS_SENSORS] Stored 9 entities
2024-03-22 09:53:16.758 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_activewindow
2024-03-22 09:53:16.759 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_cpuload
2024-03-22 09:53:17.786 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_currentclockspeed
2024-03-22 09:53:17.805 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_geolocation
2024-03-22 09:53:19.951 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_gpuload
2024-03-22 09:53:22.100 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_gputemperature
2024-03-22 09:53:22.100 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_lastactive
2024-03-22 09:53:22.100 +00:00 [INF] [SENSORS] Modified multi-value sensor: LegionLaptop_battery
2024-03-22 09:53:22.100 +00:00 [INF] [SENSORS] Modified multi-value sensor: LegionLaptop_display
2024-03-22 09:53:22.100 +00:00 [INF] [SENSORS] Added single-value sensor: LegionLaptop_lastboot
2024-03-22 09:53:22.103 +00:00 [INF] [SENSORS] Added single-value sensor: LegionLaptop_microphoneactive
2024-03-22 09:53:22.106 +00:00 [INF] [SENSORS] Added single-value sensor: LegionLaptop_microphoneprocess
2024-03-22 09:53:23.241 +00:00 [INF] [SENSORS] Added multi-value sensor: LegionLaptop_network
2024-03-22 09:53:23.243 +00:00 [INF] [SENSORS] Added single-value sensor: LegionLaptop_webcamactive
2024-03-22 09:53:23.245 +00:00 [INF] [SENSORS] Added single-value sensor: LegionLaptop_webcamprocess
2024-03-22 09:53:23.245 +00:00 [INF] [SETTINGS_SENSORS] Stored 15 entities
2024-03-22 09:55:01.350 +00:00 [INF] [SENSORS] Removed single-value sensor: LegionLaptop_geolocation
2024-03-22 09:55:01.350 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_activewindow
2024-03-22 09:55:01.351 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_cpuload
2024-03-22 09:55:02.383 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_currentclockspeed
2024-03-22 09:55:04.534 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_gpuload
2024-03-22 09:55:06.681 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_gputemperature
2024-03-22 09:55:06.681 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_lastactive
2024-03-22 09:55:06.681 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_lastboot
2024-03-22 09:55:06.682 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_microphoneactive
2024-03-22 09:55:06.682 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_microphoneprocess
2024-03-22 09:55:06.683 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_webcamactive
2024-03-22 09:55:06.683 +00:00 [INF] [SENSORS] Modified single-value sensor: LegionLaptop_webcamprocess
2024-03-22 09:55:06.683 +00:00 [INF] [SENSORS] Modified multi-value sensor: LegionLaptop_battery
2024-03-22 09:55:06.683 +00:00 [INF] [SENSORS] Modified multi-value sensor: LegionLaptop_display
2024-03-22 09:55:06.733 +00:00 [INF] [SENSORS] Modified multi-value sensor: LegionLaptop_network
2024-03-22 09:55:06.734 +00:00 [INF] [SETTINGS_SENSORS] Stored 14 entities
2024-03-22 10:08:35.147 +00:00 [INF] [HASS_API] Server recovered from failed state
2024-03-22 10:10:29.838 +00:00 [INF] [HASS_API] Server recovered from failed state
2024-03-22 10:25:16.663 +00:00 [INF] [COMMANDS] Added command: LegionLaptop_publishallsensors
2024-03-22 10:25:16.667 +00:00 [INF] [SETTINGS_COMMANDS] Stored 1 entities
2024-03-22 10:26:48.049 +00:00 [INF] [NOTIFIER] Attempting to show test notification ..
2024-03-22 10:26:48.103 +00:00 [INF] [NOTIFIER] Test notification attempt completed
2024-03-22 10:27:07.190 +00:00 [INF] [SETTINGS] Configuration stored
2024-03-22 10:27:09.388 +00:00 [INF] [SYSTEM] Application shutting down
2024-03-22 10:27:09.392 +00:00 [INF] [MQTT] Disconnected
2024-03-22 10:27:09.402 +00:00 [INF] [SYSTEM] Application shutdown complete
2024-03-22 10:27:11.793 +00:00 [INF] [MAIN] HASS.Agent version: 2022.14.0
2024-03-22 10:27:11.798 +00:00 [INF] [SETTINGS] Config storage path: C:\Users\axdr\AppData\Roaming\LAB02 Research\HASS.Agent\config
2024-03-22 10:27:11.912 +00:00 [INF] [SETTINGS] Configuration loaded
2024-03-22 10:27:11.915 +00:00 [INF] [LOCALIZATION] Selected UI culture: [en] English
2024-03-22 10:27:12.068 +00:00 [INF] [SETTINGS_QUICKACTIONS] Config not found, no entities loaded
2024-03-22 10:27:12.089 +00:00 [INF] [SETTINGS_COMMANDS] Loaded 1 entities
2024-03-22 10:27:17.471 +00:00 [INF] [SETTINGS_SENSORS] Loaded 14 entities
2024-03-22 10:27:17.480 +00:00 [INF] [MQTT] Identifying as device: LegionLaptop
2024-03-22 10:27:17.482 +00:00 [INF] [LOCALAPI] Disabled
2024-03-22 10:27:17.483 +00:00 [INF] [SERVICE] Local install path: C:\Program Files (x86)\LAB02 Research\HASS.Agent Satellite Service\
2024-03-22 10:27:17.492 +00:00 [INF] [HOTKEY] Completed bind for global quickaction hotkey
2024-03-22 10:27:17.498 +00:00 [INF] [MQTT] Connecting ..
2024-03-22 10:27:17.781 +00:00 [INF] [HASS_API] Home Assistant version: 2024.3.1
2024-03-22 10:27:17.790 +00:00 [INF] [MEDIA] Ready
2024-03-22 10:27:17.809 +00:00 [INF] [MQTT] Connected
2024-03-22 10:27:18.417 +00:00 [INF] [HASS_API] System connected with https://redacted.com
2024-03-22 10:27:19.516 +00:00 [INF] [MQTT] Initial registration completed
2024-03-22 10:27:21.115 +00:00 [INF] [NOTIFIER] Ready

Edit: Oh wait, I’m stupid. The sensors are all within MQTT ofc, not under the HASS.Agent integration. It’s all good now.