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

@alphabeta279 thanks!

You can disable it in the config screen:

You could also increase the Disconnected Grace Period value to see if that helps.

About the feature, interesting idea. Already have an open ticket to export/import config, but being able to control that from HA could be useful. I’ve added your idea to the ticket.

Should be fixed in the latest beta if you want to test:

2 Likes

Should also be fixed in the latest beta

Thank you :+1:

Hi,
What a wonderful creation !

I use also it to control my son pc but he have acces to all !

1/ is it possible to add password protection to the hass agent on parameters ?
2/ is it possible to add an option to have fast action with right/left click in the icon ?

Tanks you and congratulations for your great creation

1 Like

Hi,
I am having trouble with the sleep command. I have installed HASS.Agent on a laptop. I have enabled satellite service and created MQTT configuration. I have also created some commands using the satellite service. Everything is working fine except for the sleep button.

In Home Assistant, I have created a script to put the laptop to sleep. I am pressing the sleep button 5 times at 30 seconds interval to make sure that the laptop positively goes to sleep. It works fine, but the next time I wake the laptop by sending a WoL signal from HA, it wakes up and goes right back to sleep. It is almost like the last sleep command is being stored somewhere and being sent to the laptop when it wakes up.

On the laptop, in HASS.Agent, I have turned off the retain flag in satellite MQTT and main MQTT configuration but the problem still persists. How to fix the issue?

Thanks

Hi @stef2011, thanks!

  1. You can already do that with the satellite service: click Satellite Service in the main window, and then go to the General tab. You can there set an auth ID, which will be required the next time you open this window:

However, adding it to HASS.Agent as well is a good idea, I’ve created a ticket for it: [hassagent-181]

  1. Also a good idea: [hassagent-182]
1 Like

Why do you click the button 5 times? Once should be enough.

Changing the MQTT settings in HASS.Agent isn’t relevant here, because that only applies to stuff sent from there (like sensors), and this is being sent from Home Assistant. So you need to check the QoS settings of your broker, could be that your QoS is on 1 or 2.

However, again, it should really work after triggering once, so if that doesn’t work, that’s the issue we should be fixing :slight_smile: Let me know

I have changed it to once and so far no issues.

Thanks…

1 Like

Is there anyway with the hass agent to use a Powershell script as a sensor so that I could perhaps send the script output as MQTT to HA?

A little background to what I’m trying to achieve:

I have a Windows PC with the hass agent installed and I’m already using a bunch of sensors from it. I have some data that I want send to HA that I can’t seem to achieve through hass. Examples are simple things such as hostname, but also things a little more complex like getting certain event log IDs or pulling data out of application log files.

To achieve this currently I have a bunch of scheduled tasks that call PowerShell scripts to collect the data and output it to text files. The Windows directory containing the text files is mounted in HA and I use various command line sensors to pull out what I need.

The problem with this is that I now have many command line sensors being updated frequently, which is having a performance impact on HA. I’d like to remove as many command line sensors as possible ideally.

Hey @benjani85,

If I understand correctly, the send the script output as MQTT to HA part is not something you’d want to be able to do through the sensor, as long as HASS.Agent sends it by MQTT?

In that case, yes that’s possible. The latest version contains a Powershell sensor:

And HASS.Agent sends all sensor values through MQTT. Let me know if that works for you (or not).

Hello, thanks for the Awesome Hass Agent, i just start using Home Assistant, and when stumble on your work make something that i thougth i’ll never be able to do possible.

I’m posting since i stumble upon a strange behaviour regarding putting my computer to sleep. While i had no problem with the previous Hass.agent windows app, since the updat a few days ago, my computer seems to wake up really fast after being order to go to sleep.
Did you tweak something regarding these in the last release “2022.14.0” (i didn’t have this issue with the previous version)?

Thanks

That’s weird, I haven’t changed that command. What it basically does, is execute this:

Rundll32.exe powrprof.dll,SetSuspendState 0,1,0

You could try running that in a cmd prompt and see if you get the same effect, so we can determine whether it’s something caused by hass.agent or not.

Thanks, that is just what I was after. Not sure how I managed to miss that option!

1 Like

It’s possible to turn on the PC whit HASS agent?, I know that is possible to turn off (for example sleep), but how I can turn on?.

Thanks,

This is how I configured my desktop to turn on. You will need to have the wake on lan .

script

  desktop_wol_on:
    alias: "Desktop WOL On"
    sequence:
      - service: wake_on_lan.send_magic_packet
        data:
          mac: "B4:4Z:D6:27:10:33"
1 Like

I’ve just downloaded and installed the latest HASS.Agent on my Windows 10 Pro machine. The install seemed to go fine, but the HASS.Agent console shows the Local API as “stopped”. Any idea how I can diagnose this?

Sorry I just realised that I don’t need the local API as I’m using MQTT

1 Like

So I recently setup a new computer and setup HASS Agent and for the life of me I can not get notification or media player to work. HASS API and MQTT are both setup and working fine. Sensors and Commands all work great. But my machine does not “autodiscover” for the media player or MQTT. It all worked great on my old machine and as far as I can tell nothing has changed.

That’s really weird @JeffreyHA. Can you please enable debug logging for the integration, then restart HA and see if anything useful comes up? I’d recommend using the LogViewer addon.