HASS.Agent

H

HASS.Agent

Join the community to ask questions about HASS.Agent and get answers from other members.

Join

Is it possible to run Powershell commands with a variable made in Node-Red/Home Assistant?

I have a input_select that has options for filenames. Is it possible to have that filename be sent into a message payload and have HASS agent receive it and launch a powershell process with the matching file on the computer?
Solution:
Ya, commands/custom commands can "accept" parameters sent with the action (if I'm not mistaken configuring an empty one and then sending the absolute path to script as action payload should just launch it) Although I must put it out there: from the security perspective that's not desirable :P...

Trigger Automation from Quick Actions?

Is there a way to trigger an automation from a quick action? I must be missing it. I've tried On, Toggle, and Play. Scripts will trigger with "on", but my automation isn't. I've gone to creating a script for the sole purpose of triggering the automating as a stop gap. 🍻 I apologize if I missed it in docs.
Solution:
have the quick action toggle a boolean helper with that as the trigger for an automation?

Missing notify.PCName Service in HA

I am Missing notify.PCName Service in HA

Specified cast is not valid?

Just updated my hass agent to v2 and while I have start with windows toggled, it starts up and closes immediately. I looked at the logs and found this error below. I don't use Virtual Desktops, so how do I disable that? I'm running Windows 11. 2024-05-05 12:44:04.152 -07:00 [FTL] [PROGRAM] FirstChanceException: Specified cast is not valid. System.InvalidCastException: Specified cast is not valid....
Solution:
Log was too long for message, tried to upload a text file...either way, issue resolved itself when I disabled satellite service

Command to force Windows Update

Is there a trick to making command 'Wuauclt.exe /updatenow' execute a complete Windows Update?
Solution:
the HASS.Agent Satellite service runs with elevated privilages - having this command there will not require elevation, but I don't know it executing it from service's context will actually do anything

Screenshot sensor, fail state?

Is there a way currently where if the PC is asleep for example and the screenshot sensor has no data to either hide the card or display a line of text like "PC is not currently available"?
Solution:
i assume UI. 1. Add a conditional card 2. Add a condition for entity state 3. Set it to check that the screenshot is not unavailable...

media player disappeared

when i uppdated core to 24.5
No description

Microphone sensor showing ON when it's not.

RIght now I'm aseeing that the attribute is Discord, even though i'm not on a call.

Auto Discovery fails at second device

Hi Guys, I Installed hass.agent at my windows PC and AutoDiscovery in HA worked fine. I can use motifications etc. Now I installed HASS:agent on a second device to use it there too. Installation worked fine, I use the same configuration as on the first PC (besides ClientID) but the new device doesn't show up in HA. Is there anything I may have missed in the process? Thanks for your help.

Process name

Hi, what is the precess name of hass agent in windows11? I sometimes notice the process crashing, and all sensors going unavailable. Suffice to say my whole house basically shuts down when HA thinks the PC "turned off" like this. Wanna set a scheduled event on crash to just re-run the process. Also I vaguely know how to do this but am not sure about the event number as trigger. ChatGPT says it's 7024. Is that it?
Solution:
the process is called just "HASS.Agent"

Window not appear using custom command w/out Low Integrity

I have created a custom command that launches a python script (which currently contains only a print and an input to test), however, launching it no window/terminal appears in normal mode (I see that the app runs from the task manager), while with low integrity mode it appears. This would be solved here except that past experiments I realized that low integrity is too restricted for what I need. Am I doing something wrong?
No description

Media Player unavailable

Hey, so after i moved from LAB02-Research app the auto discovered media player is unavailable with the old name of my computer i reinstalled the app rediscovered the hass.agent intergration with no luck....
Solution:
Nevermind, after messing around in the mqtt explorer and deleting old entities of the media player and removing hass.agent intergation from home assistant and rediscovering it worked
No description

Getting wake lock status into HA

Hi! I am so glad to see someone has adopted this, since the project itself has been a life-saver in so many situations. I am trying to get my wake lock state into home assistant to have one more thing to check to make a decision if the system should be suspended or not - and I did see a powershell sensor has been integrated, which is really helpful for that, because now I just could do an "powercfg -requests | Select-String -Pattern "PROCESS"" or something as a quick hack - unfortunately powercf...
Solution:
you can also right click -> properties -> compatibility -> tick run as admin

Autodiscovery Issues with Integration

Thread to keep track of instances where the integration fails to autodiscover hass.agent instances.

Friendly name reverting for 'commands' or 'controls' in HA

Hello, A while back i had asked for a friendly name to be implemented to the agent. I noticed that it was implemented and works well for "sensors", but not so much for controls... It seems the friendly name is being reverted to whatever the 'name' field is in the agent. Notice the underscores and all lowercase letters as opposed to bookcase titling of the sensors.
Solution:
will be part of 2.1.0-beta2
No description

Notifications from HA don't work

Hi, ive recently just migrated from 2022.14.0 to 2.0.1 and everything seems to be working fine, the integration detects my device and MQTT does too. If i click "Show Test Notification", the notification appears. However, if i tell HA to send me a notification, nothing happens. I've tried restarting HA, removing and adding the integration again, restarting my computer, even completely deleting hass.agent and installing it from scratch again. Nothing has worked. There are no errors that show up in the logs when i send the service request. ...

High CPU and memory usage

Hey everyone - I'm having pretty high CPU usage (consistently 10-15%) and slow increase in memory usage on windows (starts at a few hundred MBs and slowly climbs to GBs). I submitted a issue on GitHub (#64) but wanted to see if anyone else is experiencing this. Running 2.1.0-beta1 on Windows 10. I have a few quick actions defined for keyboard shortcuts and a few sensors. Nothing interesting from what I can see in the logs....
No description

Agent using 20GB+ RAM

Unfortunately I had to close it as I was running out of RAM, and I'm not sure what happened. I went to the store, my monitors went to sleep, and when I came back I found discord and other stuff frozen or crashed, + hass agent using 20 somethingGB RAM Where should I look for logs or anything that can help us figure out what went wrong? I haven't re-opened it yet just in case that might overwrite some logs or something...

HACS Add-On no longer available?

Hi! Am I doing something wrong or is the link in the documentation to the HACS add-on no longer valid? TYIA!...
Solution:
Yeah no I know, after downloading it using the wget command etc., clearing browser cache, and going into add integration it wasn't showing up. After updating it again and waiting till this morning it showed up! Something was just delayed.
No description

HASS.Agent Client bugs out if you leave Satellite service open when closing the main window

Holy bug reports 😂 Replication: - Open HASS.Agent - Open Satellite Service config...
No description