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

You can! I use it to mute TTS messages when I’m on a teams meeting.

This is an example script, it only proceeds when the mic binary_sensor is off:

tts_test:
  alias: Test TTS
  mode: single
  sequence:
    - condition: state
      entity_id: binary_sensor.test_pc_mic_active
      state: "off"
    - service: notify.mycroft_tts
      data_template:
        message: >-
          {{ message }}
1 Like

This is awesome!
It works great for me.

A few findings / requests to report:

  • When I first setup MQTT i put in wrong connecton info. The application then spams you with a lot of notifications that the config is wrong. This makes is hard to change the config because the notification window is overlapping with the tray icon. Perhaps a single notification is enough, or you could increase the time between notifications.
  • The quick actions shortcut is working for me. It owuld be nice if you could use the keyboard to switch between possible quick actions and press enter to select the one you want. Using a keyboard shortcut and then switching to mouse input is not that nice of a user experience.
  • The shortcuts bound to a specific quick actions are not working for me.
  • Are there any plans to move to .NET 6, and perhaps a Mac version of the app? My issue with the HASS app for Mac is that it cannot run in the ‘background’. I would love to use the mic sensor to use in a MS teams indicator light automation.

But it’s great the amount of features you have already built in this first release, awesome!

1 Like

Hi @freakshock,

Thank you! Good to hear :smiley:

And thanks for the report!

The application then spams you with a lot of notifications that the config is wrong … Perhaps a single notification is enough, or you could increase the time between notifications.

Agreed, excellent point. Will do.

It owuld be nice if you could use the keyboard to switch between possible quick actions and press enter to select the one you want.

Good idea! Noted.

The shortcuts bound to a specific quick actions are not working for me.

Did you try restart HASS.Agent after setting the shortcuts? What shortcuts are you using (so I can try to reproduce).

Are there any plans to move to .NET 6, and perhaps a Mac version of the app?

Yep had it in the back of my mind. .NET 6 wasn’t out yet when I started developing, but since I’m doing everything in 6 now it’d make sense to port.

Making a Mac version would require some extra work, as currently I fetch the mic status from the Windows reg. So I’d have to do some research on how to do the same for Linux and Mac.

As soon as I’ve ported to .NET 6 I’ll bug you (if that’s ok) to do some tests. Might be a few weeks though with the holidays coming up.

1 Like

Thanks for your response !

Did you try restart HASS.Agent after setting the shortcuts? What shortcuts are you using (so I can try to reproduce).

I tried just now, that does not fix it. I tried both CTRL + ALT + L and CTRL + ALT + O.

Making a Mac version would require some extra work, as currently I fetch the mic status from the Windows reg. So I’d have to do some research on how to do the same for Linux and Mac.

I understand it’s not trivial to implement this :wink:

As soon as I’ve ported to .NET 6 I’ll bug you (if that’s ok) to do some tests. Might be a few weeks though with the holidays coming up.

Yeah no problem, I can run some tests for you. Let me know.

Hey @freakshock,

There’s a new release which fixes the MQTT disconnect-spamming and adds keyboard navigation to the Quick Actions. Thanks again for the tips :slight_smile: There are also some new features like multi-value sensors.

I’m unable to replicate the key bindings, they work fine on my machine and test vm’s. Perhaps they’re already taken? Could you try using CTRL + ALT + NumPad1 for example?

Hi. This looks very promising but my company PC’s firewall (not the Windows one) seems to block the incoming traffic. I suppose there is no easy way to implement a websocket connection from the Agent to HA?!

1 Like

Hey @FPro,

Not really, but I’m currently looking into registering HASS.Agent as a ‘native app’, which would make configuring easier and solve connection issues. But that’ll take a while.

In the meantime, if your company’s policy allows it, you could use something like Tailscale or ZeroTier to make a direct connection from HA to your machine. They both have an HA add-on ready and are very easy to setup.

That way, you can just enter your company machine’s Tailscale or ZeroTier IP and bypass all other firewalls.

They are both on the same network, so a VPN won’t help. The PC itself has another firewall. But thanks for the suggestions :slight_smile:
Looking forward to the improvements. I’ll try again then.

Ah right, bummer! You could try using port 80 or 443, but that’s a long shot.

Very nice application thankyou

A thought… Showing the current state of a device (on|off) in quickactions would be neat, especially for a toggle action.

One issue - having setup a hotkey (I mistakenly used an ordinary alpha key) - if you then remove it then when pressing that key the app crashes.

Having a problem with hotkeys not working too. It does intercept the keypress (in that it can no longer be typed) but it doesn’t perform the action.

Hi @xAPPO, thank you :smiley:

Showing the current state is indeed on my wishlist, I’ll add it in one of the upcoming versions!

I’ll look into the crash, it probably doesn’t unbind the hotkey when you remove it. Thanks for letting me know.

Did you restart HASS.Agent, and is it still not working afterwards? What keys do you use for the hotkey?

Thanks, these new features work great :slight_smile:

Must be something on my system indeed, I tried one other combination but it was not working.
I don’t mind because I don’t really need this feature.

Thanks again for the great app!

An Awesome app! Thanks for creating it!

Thanks @freakshock and @brad.trout! Nice to hear :smiley:

Hey! It works out of the box, no issues!!
Nice job and thanks for the effort! Just what I was looking for :slight_smile:

Thanks for the positive feedback @rickvanelk :smiley: Glad you like it. Oh and welcome to the forums!

1 Like

Thank you for sharing your work.
I added the storage sensor but I won’t get any in HA. Other sensors like cpu load or memory usage are working.

Hi @nightfever, you’re very welcome :slight_smile:

Alright, let’s see if we can find out why. In Home Assistant, please go to ConfigurationDevices & ServicesDevices, then type the name of your PC. Click on your device, and there should be a list of entities under Sensors. If nothing drive-related is showing here, they’re not arriving in HA properly.

In that case, could you look through HASS.Agent’s logs to see if there are any errors or exceptions? If you’ve used the installer, they’re located in %appdata%\LAB02 Research\HASS.Agent\Logs.

If there are no exceptions or errors showing in the logs, could you also check Home Assistant’s logs? You can find them by going to ConfigurationSettingsLogs.

1 Like

I do receive MQTT disconnect notifications and failed to connect to MQTT. Surprised by this as my MQTT broker is rock solid and configuration is correct.

What topics does HASS.Agent use and does it create these or does the HA part do that? Is this likely a never able to connect to MQTT or a connect but often disconnect later issue. I get a notification about every hour.

That is weird. HASS.Agent uses homeassistant/sensor/{device_name}, you can use a MQTT client to subscribe and see what gets sent.

What broker do you use? Are the sensors working (did they get added in HA) or not at all? Are there any additional messages in HASS.Agent’s logs? Is your PC on the same network as your broker?

1 Like