HASS.Agent

H

HASS.Agent

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

Join

Adding entity to HA using Node-RED MQTT Broker

Hi all, I am trying to set HassAgent up for the first time on Home Assistant, so I can shut down a NUC via HA. I am using Node-RED and running the Aedes MQTT broker node from here, as I run a whole lot of devices through already. I can see HassAgent is connecting to this broker and sending messages on connection. I've set Hass.Agent up and setup a Command, but I can't get anything into HA itself. Trying to manually add the integration into HA gives the error message "The integration could not be loaded..." and there is no entity showing up under entities for the command. Is this an issue because I'm running a broker from within Node-RED and not a HA addon? If so, is there any around that?...
Solution:
the sensors/commands should appear in the MQTT integration section
No description

I can control things, but I can't get notifications

I've gone through the instructions and forums soooo many times. I'm running the forked version done as a custom repository. I've installed/uninstalled/re-installed. I'm in the Core 2024.10.2 and running the latest update for HA 13.2. I seem to be able to control everything just fine - I can use shortcut keys to control devices etc. But the one function I'm dying to have - a notification on my PC when my doorbell rings - eludes me. I can test the popup from HASS.Agent, and it works fine. But I cannot seem to get the notify action to pop up a notification on my PC. I can send the action notify.PC_Name and it always gives me a green checkmark, but i don't see it anywhere in the logs. My desktop is in HASS.Agent in HA as a device, but the only entity is the media player. I do not see anything in MQTT, for what it's worth - no devices, no entities....
Solution:
Try removing the integration, restarting HA, and then installing integration again

Get process stats into HA

I am trying to work out how to get process statistics into HA. At the moment i use hass agent to send cpu usage stats and i often see that running at 100% and have been trying to work out how to get historical data per process to work out the cause... I have worked out that i can ues the following powershell module to get json of the statistis i am after, but due to character restriction this isn't a viable way to get the data into HA (though i could do a top 10 process). If i were to use the top processes option, is there a better way to format this data so it is somewhat useable in HA to analyse? ```ps...

Repository structure for HASS.Agent 2.1.0-beta1 is not compliant

I am attempting to install the 2.1.0-beta1 from the Github repository. I am doing so because I don't see the media player entity in HA after installing the original HASS.Agent from the HACS repository. However, when I try and install the above custom repository I am getting the above HADS error message. I'm running HACS v2.01 on HA Core 2024.10.2...

My device was found but no entities were created

The integrations page found my device, everything looks configured ok on the windows side, but no entities were created on the device.
Solution:
the devices will be visible in the MQTT integration
No description

Argh! Lost all recent config thanks to migration option in 2.1.0 - any way to fix?

I did a major update of my commands and sensors last month when I upgraded to the new fork of this app. For the 2.1.0 I had the "try migrations" checked and it pulled OLD config/sensors/commands from YEARS ago back into the app, and I lost all my stuff. Do the previous config files still exist somewhere??

Typo in Config Wizard

Reinstalled the new version and did a clean install. Noticed a typo. That's it.
Solution:
Thanks for the catch!
No description

Frigate notification to HASS.Agent

as the title says, I want an automation that sends a notification to my windows pc via HASS.Agent. I've tried changing the notify.device entity in the automation but the Frigate blueprint seems to only work with mobile or any devices with the HA app installed.

Can i use local api to send a keystroke to my hass.agent pc?

I'm trying to use hass.agent for a simple task: i want to be able to send 1 key from HA to my windows pc. I'm not using MQTT, is there a way to use the local api for sending a keystroke or do I need to setup a MQTT server for this single task?

Newbie trying to get mqtt to work

Hey, im trying to get MQTT to work and connect from my home assistant green to MQTT using the hass.agent software but its not working, ive made sure to put in the same information but it never connects
Solution:
hey, thanks for replying, it seems to have worked now, i reinstalled everything, still didnt work but i watched a tutorial, im more of a visual person so yeah, all good now, but now my geolocation with my phone when i leave my house, my pc doesnt turn off or on, dunno if its my mqtt or just my phone being weird

Is there any way to change the shutdown wait period?

I feel like 1 minute is a bit long. RPC shutdown can configure the delay time.
Solution:
you can use the shutdown command configured as a custom command - https://github.com/hass-agent/HASS.Agent/discussions/129

No media player entity

I have installed the latest update (both satellite service and client), it's connected to HA instance and works well, except I don't get any media_player entity in my HASS.Agent device. This was broken for me before the update was installed and the update hasn't fixed it, I tried restarting PC, restarting HA (running on rPI), disabling and enabling media player functionality and nothing works. Additionally, when trying to consult media player documentation, I get 404 error. Can I do something about this? Do you need more info?...

sensor and command from hass intégration?

Hi, in the original version I used to see all the sensors and command directly inside the HASS Agent intégration page, now I can see them only inside the MQTT integration. Is there any way to get them back on the HASS Agent integration near the media player? Thank you...
Solution:
The commands/sensors only show in the integration if you use local api

PC On/Off status as sensor?

I have a button on my dashboard to turn the pc on/off remotely using WakeOnLan and Remote Shutdown, but if I turn the PC off or on manually it doesn't update the state of the button. Is there a sensor on HASS.Agent to just purely detect if it's on or off? I have this so far, but it won't change the state of the button when the PC is switched off because HASS.Agent's sensors just become unavailable, they don't report 0. Anyone got any ideas? ```alias: PC ON/OFF description: ""...
Solution:
have you considered using the Ping (ICMP) integration to detect whether the PC is on or off? https://www.home-assistant.io/integrations/ping/

No audio when playing media player

Hi all, i have all of the normal install setup and everything is working fine - commands, notifications etc etc.. But i cant get any audio to play. I can see media player entity in HA, and it says its playing, but no sound on the target pc (windows 11). I would appreciate any tips on how to trouble shoot this....

GPU load/temp not showing

Hi, ive a weird issue : new pc and fresh Windows install, everything was working great. For some reasons related to EXPO ive réinstalled a fresh Windows. So now, GPU Tweak see data of the GPU, ADIA64 also, but not Hass.Agent (every of the mentionned programs are closed when i try). I’m not sure where to look for .. ...

New win 11 install crashes constantly

It keeps closing itself after less then a minute even during the onboarding. As well as with everything turned off. No sensors added fresh install.
Solution:
Well Updating to the latest beta seemed to fix the issue

device_registryasync_update_device

I couldn't find any reports of this in the channel - sorry if it has been reported before. HA keeps reporting the following in logs: Exception in updated when handling msg on 'hass.agent/devices/xxx': '{"serial_number":"xxx","device":{"identifiers":"hass.agent-xxx","manufacturer":"HASS.Agent Team","model":"Microsoft Windows NT 10.0.19045.0","name":"xxx","sw_version":"2.0.1"},"apis":{"notifications":true,"media_player":true}}' Traceback (most recent call last): File "/config/custom_components/hass_agent/init.py", line 144, in updated update_device_info(hass, entry, payload) File "/config/custom_components/hass_agent/init.py", line 29, in update_device_info device_registry.async_get_or_create( File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 834, in async_get_or_create device = self.async_update_device( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 1066, in async_update_device self.hass.verify_event_loop_thread("device_registry.async_update_device") File "/usr/src/homeassistant/homeassistant/core.py", line 462, in verify_event_loop_thread frame.report_non_thread_safe_operation(what) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 225, in report_non_thread_safe_operation report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 159, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 197, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'hass_agent' calls device_registry.async_update_device from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#device_registryasync_update_device at custom_components/hass_agent/init.py, line 29: device_registry.async_get_or_create...
Solution:
It was this version that was producing the errors. I switched to the forked version as suggested here: https://github.com/LAB02-Research/HASS.Agent/issues/411...

Can't connect through local API (not MQTT)

Client is installed and configured. I'm still getting "can't connect" even if everything seems fine (i did a netstat -a and the api seems exposed)....

Extremely high CPU/RAM (~100% CPU, 16GB+ RAM) usage from Device Association Service?

heya, i just found this and installed it. i'm very sorry if this is already in the wiki or somewhere, i couldn't find it. whenever i have HASS.Agent running, the "Service Host: Device Association Service" very quickly goes up in CPU/RAM usage until it's using close to 100% CPU and like 16GB of RAM for reference, i have the following specs (can ask for more detail if needed):...
Solution:
Solved in 2.1.0
No description