Hass Workstation Service - Turn your PC or laptop into a bunch of sensors

Hi y’all! I have been working on an application that lets you use your PC or laptop as a bunch of sensors for Home Assistant. This will, for example, let you dim your lights when playing games or trigger something when opening a specific window.


I’m looking for some interested people to beta test.

You can find the project here.

Edit: Second beta is released!

8 Likes

I will have a look at it :slight_smile: Thanks a lot… sounds interesting!

1 Like

Very interesting.

One for me important question. Is it possible to have a portable installation executable? Lightwight? To be able to run it without installing on a pc which does not allow to be installed on?

You can! Check the Github Release page. The autostart won’t work if you do it like this. Also no automatic updates.

I used ClickOnce as the installer platform so this might be allowed by your policy. No elevated access is needed.

Very interesting.
I see this project as an extension to Open Hardware Monitor (https://www.home-assistant.io/integrations/openhardwaremonitor/) which you can only monitor hardware status but not the operating system. Keep the project going! :wink:

Thanks for the kind words! Open Hardware Monitor is great for providing internal system sensors whereas I would like to focus more on user and desktop interaction.

I’ll keep it going for sure as I’m using it myself

Not sure what I need then…

Downloaded the zip and starting hass-workstation-service.exe gives me:
image

There’s not really anything else to start?

Ah I forgot, that is something the installer takes care of. There are two options:

  1. Install the .NET Core 3.1 runtime.
  2. Use the standalone package I just added to the release. This includes the needed runtime but is a bit bigger to download.

You can then start hass-workstation-service.exe. You can then open UserInterface.exe to configure the service.

And then? i downloaded that, started the hass-workstation-service.exe and nothing happens…
When I try to run UserInterface.exe I get:

image

That’s progress! I added a UserInterface standalone to the release. Could you try that?

hass-workstation-service.exe runs silently so you should be able to see it running in Task Manager.

I like the project - I’m glad you wrote in .NET core as that does seem to be the direction that Microsoft is going. I have a couple of (hopefully) constructive thoughts.

1.) It’d be great to see GPU load + CPU/GPU temperatures. For me, those things can help drive certain automatons like cooling the room when the server/computer is under load or monitoring the amount of time spent gaming. I currently get these values by using the following project (OpenHardwareMonitor) to get those values ( PCInfoToMQTT v0.1.3 ). The big downside of any sort of OpenHardware Monitor integration is that it is written on .NET Framework 4.5 which would be problematic for any Windows installations that don’t support legacy .NET.

2.) Disk space utilization monitor would be cool too.

3.) A basic ‘run’ command ability would be great. I see this as an app that should be run with root privileges that can run any command needed under the sun. If you can also return the run output, that’d be even better.

3.) From a roadmap perspective, what Home Assistant on Windows really needs is a companion app similar to the one available for Mac OS ( https://www.home-assistant.io/blog/2020/09/18/mac-companion/#:~:text=Introducing%20Home%20Assistant%20Companion%20for%20macOS%20Home%20Assistant,app,%20we%20have%[email protected]%20to%20thank%20for%20this. ). The first step (in my opinion) is to build a suite of sensors to monitor the operating system. The 2nd step is the ability to run commands as needed. The 3rd step would be to integrate an optional option of a web UI. The last step would be a mechanism for that UI to display better/operating system level notifications.

Just my 2 cents. Would be great if this could be the first building block towards a cohesive Windows Home Assistant experience. Thanks for putting the time and effort into this!

Yes, that seems to send something to hass.

I however am now a little dazzled. The " Userinterface-standalone.zip" does that now include the service and the UI?

And what happens if I run the standalone, configure anything and set like:

What happens when I logoff? Reboot?

(I know I can test myself but am asking in the light of how it was intended to work)

It does indeed include both. I’ll work on the naming for the next release.

As stated in the readme, autostart won’t work for the standalone. You could probably start it through Windows Task Scheduler although this was not tested.

1 Like

Thanks for your feedback! I appreciate it a lot.

About you first two points: I think this project should focus on the user/desktop side of things first because there are alternatives like Open Hardware Monitor to use for system sensors. I don’t oppose it, and think it would be pretty cool, but it will not be my point of focus for now.

3.) This has been requested a lot today and is certainly on the roadmap! Currently there is no infrastructure for commands yet but I will work on that soon. The app doesn’t run elevated by design so it can also be used by users with a more restricted policy but this could, of course, be prompted for.

1 Like

Just FYI there is already IOT Link - Windows Management using MQTT

IOT Link’s author has indicated he wants to step away from the project - I believe it’s basically in maintenance mode only at this point. Architecturally, IOT Link is built on .NET 4.X which is a dead end. While it is theoretically ‘easy’ to migrate to .NET 5, I have a feeling that an application like this is best served starting from scratch with .NET core/.NET 5.

There’s a high likelihood based on Apple’s success with Apple silicon that ARM has a real future on Windows. IOT Link will probably not be able to be cross-CPU compatible based on the framework it was built on. Written “right”, HASS Workstation Service might just be able to bridge that gap. I’d really like to see this work.

good to know thanks, no critic on the new project :slight_smile:

This is great. I’d like to make a suggestion: report whether the microphone and camera are being used, to trigger lights to show that a zoom-call etc is in progress…

Can You Track Processes Accessing the Camera and Microphone on Windows 10? · DFIR Review (pubpub.org)

Lots of success, Johan

Hey @sleevezipper,

I installed the setup.exe but i get the following error. I then downloaded and installed windowsdesktop-runtime-3.1.10-win-x64.exe but the error and pop up still persists even after a reboot.

Thanks

Hi Johan,

Thanks for the kind words! Your suggestion is already being worked on. You can track progress here.

1 Like