HASS.Agent

H

HASS.Agent

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

Join

Running a powershell script via HASS.Agent causes it to run script more than once.

I have a script which outputs text to a text file with including the time that the log happened. When running this via PowerShell by itself, it works perfectly fine. When running via Hass.Agent it repeatedly runs. This is a HASS.Agent sensor which retrieves data for Home Assistant whilst also writing to a log file of the result.
No description

Trouble reconnecting to MQTT after resuming from sleep

Hi! I'm having an issue with Hass.Agent 2.0.1 where everytime the computer resumes from sleep there's a problem reconnecting to the MQTT server. All other connections seem to work fine, but MQTT keeps saying "Connecting.." for about 60 seconds, then fails and subsequently reconnects immediately. Is there anything that can be done about this? Let me know if there are logs or other info I can provide to narrow down the cause.

AutoImport or general Import

Hey there, i love your tool and iam creating e little game dashboard. There was a little tool for the Original hass.agant (https://github.com/LAB02-Research/HASS.Agent.AutoImport) which automatically created Commands from Steam Shortcuts. This tool dont work with your Version (2.0.2b.) Do you think it is possible to rewrite the tool? Or maybe do you think to Creat vom Import features, maybe from an Excel File?
Solution:
From the quick glance at the code, technically perfectly doable, timewise however I cannot give any promise on this

Arithmetic with WMI Command Type?

Anyone know if there is a way to do arithmetic with WMI type command or is it just plain WMI? I could technically use Powershell just trying to avoid adding an extra layer of abstraction. For context, I am trying to solve the issue of Windows not properly reporting CPU usage, from taking a look at the data available in Win32_PerfFormattedData_PerfOS_Processor even though the usage isn't always accurate from my observation the Idle time does seem to be, which means I should be able to abstract the Usage % by using 100 - PercentIdleTIme. Again, I could technically also do this within HA just sending it the straight Idle time, just extra steps for the same goal 🙂...
Solution:
Since I have win10 it'll be hard to peproduce - but I'm going to try to figure out what msi afterburned did with the update

Old Hass.agent system service not being removed

When migrating the old hass.agebt service is not removed.
Credit to @JonnyBergdahl for the report...
Solution:
It did remove the files. Just left the service. I guess I can delete it from the registry.

Sensors not Updating (on change or publish)

New Hass Agent user and am struggling to figure out why my sensors are not being updated. They work fine when I test them out in the Hass Agent app and they get pushed into HA successfully. They are set to auto update every 30 seconds, but do not - even when the value changes (I understand that they must change or it will be ignored if the value is the same). Even using the buttton press to publish all sensors does not work. What DOES work is if I go in and “modify” a sensor and store and activate them - then all values get revalued and pushed to HA perfectly. Same with if I restart the Hass Agent app - it will refresh values just fine, but only one time. ...

Notifications not appearing in Windows 11

Just installed on my Win11 machine, just wanted to have a notification sent to my desktop. I see my desktop in HA as "notify.desktop", but cant get even the test notification to appear in the windows app. I went through the documentation and I believe I am setup correctly. Suggestion to try or need more info? troubleshooting section might need some frequent-problems section, as I feel that might be what I have https://www.hass-agent.io/latest/getting-help/ ...
No description

getting a lot of MQTT errors in HA logs...

eg.
2024-01-25 03:15:29.082 WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT entity name starts with the device name in your config {'icon': 'mdi:window-maximize', 'unique_id': '9437ba0c-a2df-4f1a-9761-76ee4169028b', 'object_id': 'BRYAN-PC_activewindow', 'availability_topic': 'homeassistant/sensor/BRYAN-PC/availability', 'device': {'identifiers': ['hass.agent-BRYAN-PC'], 'manufacturer': 'HASS.Agent Team', 'model': 'Microsoft Windows NT 10.0.22631.0', 'name': 'BRYAN-PC', 'sw_version': '2.0.1', 'connections': []}, 'name': 'BRYAN-PC_activewindow', 'state_topic': 'homeassistant/sensor/BRYAN-PC/BRYAN-PC_activewindow/state', 'force_update': False, 'enabled_by_default': True, 'availability_mode': 'latest', 'payload_not_available': 'offline', 'payload_available': 'online', 'qos': 0, 'encoding': 'utf-8'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes '_activewindow'
2024-01-25 03:15:29.082 WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT entity name starts with the device name in your config {'icon': 'mdi:window-maximize', 'unique_id': '9437ba0c-a2df-4f1a-9761-76ee4169028b', 'object_id': 'BRYAN-PC_activewindow', 'availability_topic': 'homeassistant/sensor/BRYAN-PC/availability', 'device': {'identifiers': ['hass.agent-BRYAN-PC'], 'manufacturer': 'HASS.Agent Team', 'model': 'Microsoft Windows NT 10.0.22631.0', 'name': 'BRYAN-PC', 'sw_version': '2.0.1', 'connections': []}, 'name': 'BRYAN-PC_activewindow', 'state_topic': 'homeassistant/sensor/BRYAN-PC/BRYAN-PC_activewindow/state', 'force_update': False, 'enabled_by_default': True, 'availability_mode': 'latest', 'payload_not_available': 'offline', 'payload_available': 'online', 'qos': 0, 'encoding': 'utf-8'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes '_activewindow'
this is just one of many. literally every sensor or command has this same error message attached to it in the logs. I was able to find a post on the community site that references this. Hopefully this information posted helps, thanks for keeping this going! https://community.home-assistant.io/t/psa-mqtt-name-changes-in-2023-8/598099...
Solution:
Cjheck out the server guide for a help page on this. Also available here: #entity-names...
No description

Sensors become unavailable after a while but all green status in HASS.agent

Hey, running 2.0.1 and this happens where it says its connected to mqtt and HA but sensors are unavailable. Have the last logs if needed. Restart of HASS.Agent, fixes it. ...
No description

Powershell command not running

I have several audio outputs (namely speakers, headphones and home cinema) and used HA to switch between them. This used to work yesterday (old HASS.Agent, switching using index) and is not working today (using ids). I copied the command from HASS.Agent and ran it directly in powershell and the output changed, however nothing happens when I press the button associated with the command in HA (no logs are written to the best of my ability to find them). The command in question is: Set-AudioDevice -id "{0.0.0.00000000}.{9a3730ee-fb93-41c1-bd3b-d255652cf07b}" Is there something I'm missing or is the powershell command really not running at all?...
Solution:
Fixed in latest version

Hass agent not connecting to mqtt

i have tried to install hass agent for the first time and it is refusing to connect with mqtt the most notible things i could find in the log at a glance are please escuse me as im new to all this i belive i have set up mqtt correctly? as i have got it running for frigate i got it running for a bit but after a home assistant restart it refuses to connect again here is my log i am unsure whats what or any specifics so ill throw the whole thing here any help is appreciated...
Solution:
I would restart all network equipment. Had issues with my mesh where it lost connection from tiem to time.

Adding image from Nest Doorbell to Notification

Hey folks, Thanks for running this Discord, help for dummies like me is always appreciated! I've got HASS Agent all setup, and I'm able to send notifications when my doorbell goes to my Windows desktop. All that works beautifully. I like the fancy option of adding an image and I've been trying to get it working without muck luck and I'm wondering if someone can point me in the right direction. ...

Notification with images?

Hi. How do we get images in notifications?
Solution:
Okay so to add an image all you need to do is add an image property to the notification followed by the url. Also, whenever you are posting code, make sure to paste it between 3 backticks at the top and bottom, like this: ```...

Compat names bug

Bug with the compat names not working correctly.

Info on Integration

so, one thing is unclear to me, is it necessary to add the new fork repository to hacs or is it still """"dangerous"""" use the new one and should I keep the old one?

Bug with actionable notifications

These should be working but I'm getting no title showing
Solution:
There should not be a second dash at the title entry
No description

Doesn't open

i download the new version from "https://www.hass-agent.io/latest/getting-started/installation/" but it doesnt open the istaller. i tried it as admin and also closed the old version.
Solution:
can you launch cmd/powershell as administrator and then run
HASS.Agent.Installer.exe /LOG="install.log"...

Can't find "SetAudioOutput" command

As mentioned in this post https://discord.com/channels/1173033284519862392/1173033285845266515/1195371878450216980 you can change your audio output, but I cant find the command. I presume it should be available in the command section. The audio sensor is working. I am running version 2.0.1. Does anyone know what is going on?
Solution:
Fixed in 2.0.2
No description

backing up stable before switching to beta

Hey, If I want to backup in case I want to switch back to stable is it enough to get the folder, or should I backup the registry as well?
Solution:
Just to make sure I'm understanding correctly, so since I just need my commands&sensors the config should be all I need? I have the actual config e.g ha api, mqtt details & client id & etc stored so I don't care about those

2.0.1 crashes when switching virtual desktops

Running 2.0.1, checking the windows event log I'm seeing evt 1000 ```Faulting application name: HASS.Agent.exe, version: 2.0.1.0, time stamp: 0x65310000 Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000 Exception code: 0xc00000fd Fault offset: 0x00007fff868b668c...
Solution:
@luma @Findel please check this version 😄 https://github.com/hass-agent/HASS.Agent/releases/tag/2.0.2-beta2...