I’ve installed this on 3 computers in the house, but on one of them, the media player entity in Ha has not been created, and the device is not detected by the agent. The MQTT device and sensor entities have been created, its only the media player that is not detected/created. Anyone else had this? I’ve obviously removed and reinstalled the app on the computer. The computer that isn’t working is windows 10 pro, and the working ones are win 11 and win 10 pro.
Update: I’ve installed the agent on a 4th computer in the house, another Win 10 Pro, and the media player has not been set up in HA, and the Agent integration is not detecting the new device. The MQTT device and sensors have been set up in HA as expected, and the media player option has been enabled on the computer.
Update 2: I added another Win 11 computer, which also did not appear as a media player. I removed the integration from HA and HACS, then restarted HA, and readded the integration. when I restarted HA, all the computers were discovered and added as media players.
Thanks for the great work, this is super helpful around the house.
Hi. I just installed HASS.Agent and I have a couple of questions, please.
I am trying to grab some information about VMs on my PC running Microsoft Hyper-V. To start, I’d just like to see the results of a get-vm command in Home Assistant. I am trying to set up a powershell sensor in HASS.Agent for this.
This command requires elevation. Only administrators can run it. But even if my user is administrator, I get an error. I’m sure others have solved this problem before: how to run the powershell sensor command as admin?
When I set up the sensor with a powershell command, my PC goes crazy with a blue window popping up and disappearing every second! How do I make this run without any sort of window? It should be a background command…
In the past I was looking to run a powershell command and I don’t think they will be run using elevated admin permissions, even if the account used has them. I think it might also actually say that in the box where you configure the command to be run (if I remember correctly).
@SamKr I’m starting to think this is not a bug, just a feature that has not been developed yet. So allow me to make a feature request - one that I hope will relatively easy to implement but that might have an excellent return in terms of value delivered.
Basically, allow any WMI query to return complex data, just iterate through it recursively and return a JSON response. Home assistant is good enough to evaluate JSON responses, so it’s easy to make use of that data on HA side.
There’s so much stuff that can be obtained from WMI that this would make HASS.Agent really powerful. I think I could build my whole Hyper-V monitoring system just from that.
For anyone who is having the same issue, expose the webcamprocess sensor to see what is hogging the webcam. In my case, it was an old instance of Microsoft Teams. Once I opened that and closed it again, it released the camera.
I use this mainly to watch for my PC session state, and when HA is running, it properly reacts to session lock and unlock. However, if I reboot HA during an unlocked session, the session in HA is reported as ‘Unknown’. This status is new.
A) I notice HASS.Agent still properly reports the session as ‘Unlocked’.
B) I have the below script set as a Dashboard action. It properly changes the session to ‘Unlocked’. However, the session gets changed back to ‘Unknown’ a minute later w/o any interaction. I don’t understand.
Has anyone else come across this issue.
When enabling notifications in the HASS agent UI, the following error pops up in the logs:
2023-05-22 11:37:19.101 +01:00 [FTL] [NOTIFIER] Error while initializing: Failed initializing notifications
System.InvalidOperationException: Failed initializing notifications
---> System.IO.IOException: Cannot create a stable subkey under a volatile parent key.
at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.CreateSubKeyInternalCore(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey)
at Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat.Initialize()
at Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat..cctor()
--- End of inner exception stack trace ---
at Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat.CreateToastNotifier()
at HASS.Agent.Managers.NotificationManager.Initialize()
I get values in MB with 3 digits after point, but i want GB and TB (for a Media drive). | round(0) did not work. I mean, this digits should look like 311.1 GB for System, etc.
Also, please help with power status (want it yellow if system powered, so far unable to get that)
I am curious if I don’t see CPU temperatures, power consumption, and fan speed sensors builtin into HASS.Agent (see screenshot below), I would have to also install LibreHardwareMonitor and access this data via its WMI classes?
When the media_player.computer is idle, the volume level is displayed incorrectly. It always displays as 0%. But after starting the media, the volume is displayed correctly. After turning off the media becomes 0% again.
At the same time, audio_default_device_volume sensor always shows the correct value.
Thanks @flyinglow . Was going crazy figuring out why the last_active sensor sometimes work as expected and sometimes not. For me it was the ps4 controller.
Hello everybody! I would really like to thank the author about this wonderful piece of software, that makes me integrate perfectly my pc into my HA setup I am so happy for that!
In the picture you can see the resulting MQTT from HASS.Agent: it publishes a lot of stuff under the topic “sensor”; “mexdell” il the name I gave to my pc, but what I notice is that duplicated topics are published, as “battery/battery_charge_status” and “battery_charge_status”.
I realized that the latter is the discovery topic (maybe) for HA, but since I am very very focused on the tidiness of my setup, I would like to know if is it possible to personalize how topic are structured!
Is anyone here using the hass.agent media player to play tts? If so, I need help.
My volume on my computer is set to 90%, that is where I like it. Of course, I don’t want the tts notifications blaring at me at 90%!! but the media_player volume is directly tied to the computer volume so when I set the media_player to a reasonable 20% for notifications, the computer volume gets set there too. I have made some work arounds by setting volume, delay 5 sec, play notifications, delay 5 sec, reset volume.
Would be so much better to have separate volumes for the hass.agent media_player…
In case anyone comes roaming through here in the future, function keys (e.g. F1, F2) don’t work above F12 for quick action hotkeys, even though they register when setting them up. All the regular ones work fine though!
I have not fully integrated HASS.Agent yet in my instance (and this error is for some of my other entities) but wanted to check if any changes are needed for the integration.