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

I’ve just noticed there has been a LOT of data usage from HASS.Agent (2.1.1 of the amadeo-alex fork).

Does anyone have an idea what could have caused this?

I have it installed and configured but am not really using it much yet, haven’t yet installed the HACS integration, so this seems pretty weird. This is a PC that has not been used for a little while (with the agent installed a couple of months ago), and then used a fair amount over the last couple of days, but that doesn’t really explain it.

Screenshot 2025-02-14 002352

Does your system run 24/7? What sensors do you have?

Hi, I have my PC connected to a TV, I want to manage through homeassistant the type of projection

DUPLICATE , EXTENDED OR ONLY SECOND SCREEN with HASS AGENT

How to achieve that

Write powershell command (or something else) you can execute that does the thing.

Expose said command through Hass agent.

https://hassagent.readthedocs.io/en/latest/commands/command-basics/

I’m trying to install Hass.Agent on a laptop and I’ve got two issues.

  1. When I on-boarded the agent on the laptop I entered the credentials for the MQTT and pressed the check connection button and it confirmed all was ok. But I keep getting 2 pop up notifications shortly after I try to start Hass.Agent saying

Hass.Agent. MQTT: Disconected. and
HASS.Agent. MQTT: Failed to connect.

How can I check/re-enter anything without an app window appearing?

  1. On the Home assistant side, I downloaded the Integration but when I try to add it I get a dialogue box asking for the HASS.Agent Local API Host. What Host? I tried the laptops current IP but that didn’t work. And it’s not a fixed IP anyway!

You might ask over on the Discord as it’s more active then this thread.

I’d be checking a few things… Make sure the topic from HASS.agent is being published with MQTT explorer. If not, there’s some problem between the application and MQTT server. Could be firewall, etc.

Have you already carefully read through and followed the setup docs a second time after you ran into issues?

Yes, I have checked with MQTT Explorer and nothing is showing up.

I found a json format config file in the program’s directory and modified the host with all sorts of variants

192.168.x.y
my_url.duckdns.org
http://my_url.duckdns.org
https://my url.duckdns.org
etc

Nothing got it connected to the MQTT server.

I previously tried iot_link and that connected fine, straight away.

Until I get it the mqtt bit working there’s not much to be gained pursuing the HA issue.

Can you let me have a link to the Discord thing; I’m not familiar with it.

Thanks

And no chance of a firewall app? I run one and have made that mistake a couple times when I have notifications turned off.

There’s a Discord link here.

https://hass-agent.io/latest/getting-help/#documentation

It’s been a while since I set mine up, but I don’t remember anything fancy about getting it going. Have you checked logs in the app? Might have to turn them on in the settings.

I just came here because of the data usage. 45GB for 30 days and 11GB for 7 days. I have version 2022.14.0 so it does not seem like the forked version is the problem. This is a crazy amount of data.

Anyone know if this method is still working? i can’t seem to get any result even when its only 1 process in the list. my tested wmi query “Select * from Win32_Process Where Name = ‘bf2042.exe’” tested results in “the query failed to execute: invalid query Do you want to open the logs folder?”

I see this in the logs… I don’t know if it’s important to report… In any case, it’s still working :grinning:

Logger: homeassistant.util.logging
Source: util/logging.py:167
First occurred: 18:14:42 (3 occurrences)
Last logged: 18:15:24

Exception in updated when handling msg on 'hass.agent/devices/Laptop_Christian': '{"serial_number":"6c36a083-412d-4256-8be5-e26412abfe89","device":{"identifiers":"hass.agent-Laptop_Christian","manufacturer":"LAB02 Research","model":"Microsoft Windows NT 10.0.26100.0","name":"Laptop_Christian","sw_version":"2022.14.0"},"apis":{"notifications":true,"media_player":true}}' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 239, in _report_usage integration_frame = get_integration_frame( exclude_integrations=exclude_integrations ) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 130, in get_integration_frame raise MissingIntegrationFrame homeassistant.helpers.frame.MissingIntegrationFrame The above exception was the direct cause of the following exception: 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( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ config_entry_id=entry.entry_id, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<4 lines>... sw_version=new_device_info["device"]["sw_version"], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 885, in async_get_or_create device = self.async_update_device( device.id, ...<17 lines>... via_device_id=via_device_id, ) File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 1168, in async_update_device self.hass.verify_event_loop_thread("device_registry.async_update_device") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 465, in verify_event_loop_thread frame.report_non_thread_safe_operation(what) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 402, in report_non_thread_safe_operation report_usage( ~~~~~~~~~~~~^ f"calls {what} from a thread other than the event loop, " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<6 lines>... custom_integration_behavior=ReportBehavior.ERROR, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 202, in report_usage future.result() ~~~~~~~~~~~~~^^ File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 456, in result return self.__get_result() ~~~~~~~~~~~~~~~~~^^ File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/usr/src/homeassistant/homeassistant/util/async_.py", line 68, in run_callback future.set_result(callback(*args)) ~~~~~~~~^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 243, in _report_usage _report_usage_no_integration(what, core_behavior, breaks_in_ha_version, err) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 373, in _report_usage_no_integration raise RuntimeError(msg) from err RuntimeError: Detected code that 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. Please report this issue
Exception in updated when handling msg on 'hass.agent/devices/Laptop_Christian': '{"serial_number":"6c36a083-412d-4256-8be5-e26412abfe89","device":{"identifiers":"hass.agent-Laptop_Christian","manufacturer":"LAB02 Research","model":"Microsoft Windows NT 10.0.26100.0","name":"Laptop_Christian","sw_version":"2022.14.0"},"apis":{"notifications":true,"media_player":true}}' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 239, in _report_usage integration_frame = get_integration_frame( exclude_integrations=exclude_integrations ) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 130, in get_integration_frame raise MissingIntegrationFrame homeassistant.helpers.frame.MissingIntegrationFrame The above exception was the direct cause of the following exception: 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( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ config_entry_id=entry.entry_id, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<4 lines>... sw_version=new_device_info["device"]["sw_version"], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 885, in async_get_or_create device = self.async_update_device( device.id, ...<17 lines>... via_device_id=via_device_id, ) File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 1168, in async_update_device self.hass.verify_event_loop_thread("device_registry.async_update_device") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 465, in verify_event_loop_thread frame.report_non_thread_safe_operation(what) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 402, in report_non_thread_safe_operation report_usage( ~~~~~~~~~~~~^ f"calls {what} from a thread other than the event loop, " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<6 lines>... custom_integration_behavior=ReportBehavior.ERROR, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 202, in report_usage future.result() ~~~~~~~~~~~~~^^ File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 449, in result return self.__get_result() ~~~~~~~~~~~~~~~~~^^ File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/usr/src/homeassistant/homeassistant/util/async_.py", line 68, in run_callback future.set_result(callback(*args)) ~~~~~~~~^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 243, in _report_usage _report_usage_no_integration(what, core_behavior, breaks_in_ha_version, err) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 373, in _report_usage_no_integration raise RuntimeError(msg) from err RuntimeError: Detected code that 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. Please report this issue

ISO MQTT connection help… I have installed this on a few PCs, none of them connect to HA’s native/default MQTT… but I know MQTT is working since its brokers Z2M. I’m using the default install, default user/pw

thx for the help!

Does this app no longer work with HA MQTT?

The app works with MQTT for me.

However, I don’t believe the screenshot you posted is from HASSAgent, perhaps the HA MQTT integration?

In any case you’ll need to troubleshoot MQTT. Yo could try to connect to your MQTT server with MQTT Explorer. You would see any service you’ve configured making it’s updates to the topics. If you can’t login you’ll have to figure out your authentication.

Can’t help much more than that without more info like logs, config, etc.

that screenshot is HA’s MQTT… I was showing that its setup, and working. The HASS Agent is not connecting to it.

What version of HASS.Agent are you using?

MQTT still works fine.

It may be helpful to share your HASS.Agent config. Something like this…

thx, I didnt realize until after I posted for help that the broker is what it needed to connect to, not the HA server’s MQTT client… the default is in the UI has homeassistant.local and my brain did’t register that it needed the Broker.

its connected now, again thank you

Note that “homeassistant.local” can sometimes be “out of reach” for no reason… It happened to me a few times, so now i rather enter real local ip address.

3 Likes

Guys,

Just got a notice from HACS that the add-on is no longer mainained and therefore should be removed.

Is that really the case?

It works so well for me, i use it to turn on the exhaust for my PC when the graphics card becomes too hot.

Any chance to recover from this status?

You’re using the old repository that’s not maintained. Swap to the new fork that is maintained