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

I haven’t find an easy way to do it with powershell/cmd, but it seems failry easy with C#, so I’ll add it as a sensor:

https://lab02research.youtrack.cloud/issue/hassagent-204

2 Likes

Hello guys,

I try many things but cant connect to mqtt. I use mosquitto without password for more than 1 year. All works good in my HA. I install hass.agent and cant get connection with mqq.
Someone have a tip ?


Thanks

Hey @LinkX, maybe your mqtt only allows anonymous when for HA, not external applications. The best (and also safest) way would just add a user for hass.agent.

You could also try connecting using mqtt explorer from your pc, see if that works.

1 Like

Hello,

Thanks for reply
I created a user account on HA but its same. I try login with mqtt explorer and cant connect. I use a duckdns with nginx, i dont know if its a problem

Yep that’s a (possible) problem, since with the default configuration, HA will stop listening to its internal IP. You can test this by browsing to https://192.168.1.108:8123 and see if you can access HA.

If not, you’ll either need to make sure your mqtt is accessible through the internet (which isn’t recommended), or you can follow this guide I wrote (it says it’s for the notifications, but ignore that):

https://hassagent.readthedocs.io/en/latest/notifications/notification-debugging-ssl/

I only access by http://192.168.1.108:8123 without “S” in HTTP in my house. When i go out i use a duckdns link.
I already have a NGINX configurated with same config in this tutorial and nothing :frowning:

Did you ever find a solution to this problem ? I’m having the same issue.
The command works fine when I execute it in command line, but inside HassAgent nothing happens.

Since I have hibernate on, “sleep” doesn’t work as the description says “Note: due to a limitation in Windows, this only works if hibernation is disabled, otherwise it will just hibernate.You can use something like NirCmd (NirCmd - Windows command line tool) to circumvent this.”

The predefined command sleep “works” as it puts my computer in hibernate but the NirCmd circumvention doesn’t work. Any help ?

Yes @Deltapixel , i installed the beta, there is a command for MonitorSleep and MonitorWakeup. So no need to use nircmdc.

i’ve just set this up and its awesome. i have one question. im using a flic button to press certain key combinations on my screen (works perfectly) however i want to use the active window option so it only works when im in one specific window which always has the same name.

when i use active window in the automation it wants unknown or unavailable in the state, what is the right option, it feels like neither is the right answer

Thanks

Is anyone having an issue with the Storage sensors? it use to be these were multivalue sensors that would report available and total disk space but now they seem to only single entities in HA where the just report the name of the drive.

Yeah MonitorSleep and MonitorWakeup both work fine for the monitor. I meant a command to put the computer to sleep.

It’s just that sleep/standby for the computer puts my computer in hibernate mode instead of standby, which is why I’m using nircm but it’s not working

Hello!
Is there any way to see a screenshot of the Windows screen?
Thank you!

Has anyone found a way to use this integration to pull S.M.A.R.T. HD status over to Home Assistant? Would love the ability to create a sensor that monitors the health of my Hard Drives.

Is there any way to capture a screen shot of the PC and send it to HA somehow?

@SamKr
Thank you for creating this.

I’m using HASS.Agent to check when my web cam turns on (and off) to:

  • pause my whole house music (and then resume it)
  • close the curtain behind me (and then reopen it)
  • set the lights in my room for video chat (and then restore them)

I can also see when a sensor goes offline, which lets me know that my computer restarted or went off, or otherwise had a problem that needs to be addressed, so overall, super helpful.

Thank you again!

1 Like

I have a small request (don’t think its possible with the current version of this).

I use the satellite service storage sensors to view available space in home assistant for volumes on a Windows server. It works pretty well, but only displays the space in MB - GB doesn’t seem to be an option. When you have 10TB+ volumes, viewing in MB really isn’t that friendly. Would it be possible to add a native option within the sensors to list space in GB?

Thanks.

I don’t have the storage sensors enabled in HASS, but you should be able to change the Unit of Measurement in the settings of the entity. This is a built in feature of Home Assistant. I have done this with storage sensors I use with other integrations so I assume you can do so with these sensors as well.

Can I ask about actionable notifications, are these supposed to be working already or are they future functionality?

I have a notification being sent to my Android phones and to the HASS.Agent, with 2 actions. HASS.Agent shows me the boxes with the actions, but clicking on them dismisses the notification without executing the action.

If I do it on the Android, the action gets executed properly.

I am not even sure if this supposedly supported yet, just wanted to see if this is known before I open a issue.

Would be very good to have working actionable notifications in HASS.Agent!

Is there a way to let hass.agent trust a self signed certificate created with openssl

Is anyone else here using the SetVolume command? I’ve created two commands button.laptop_set_volume_20 and button.laptop_set_volume_60 using it, as when entering a Teams meeting (using the Microphone and Microphone Process sensors to detect that), I want to increase my speakers volume to 60% and when I leave the meeting drop back down to 20%.

However, I’m not sure if I have found a bug, or it’s just something with my setup. It only seems to recognise and action the last command created. So if I created the 20% one last, I can set the volume to 20%, but not to 60% and vice versa if I create them in the opposite order.

Is anyone else experiencing this?