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

Thank you James,

Yes MQTT works fine for Zigbee2mqtt
logs from addon:

[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] mosquitto.sh: executing... 
[01:35:01] INFO: Certificates found: SSL is available
[cont-init.d] mosquitto.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[01:35:02] INFO: Starting NGINX for authentication handling...
[01:35:02] INFO: Starting mosquitto MQTT broker...
1637454902: mosquitto version 1.6.12 starting
1637454902: |-- *** auth-plug: startup
1637454902: Config loaded from /etc/mosquitto/mosquitto.conf.
1637454902: Loading plugin: /usr/share/mosquitto/auth-plug.so
1637454902:  ├── Username/password checking enabled.
1637454902:  ├── TLS-PSK checking enabled.
1637454902:  └── Extended authentication not enabled.
1637454902: Opening ipv4 listen socket on port 1883.
1637454902: Opening ipv6 listen socket on port 1883.
1637454902: Opening websockets listen socket on port 1884.
1637454902: Opening ipv4 listen socket on port 8883.
1637454902: Opening ipv6 listen socket on port 8883.
1637454902: Opening websockets listen socket on port 8884.
1637454902: Warning: Mosquitto should not be run as root/administrator.
1637454902: mosquitto version 1.6.12 running
1637454902: New connection from 127.0.0.1 on port 1883.
1637454902: New connection from 172.30.32.1 on port 1883.
1637454902: Socket error on client <unknown>, disconnecting.
1637454902: New client connected from 172.30.32.1 as 6NML7UUex77jxR6jHMX8mR (p2, c1, k60, u'homeassistant').
[01:35:03] INFO: Successfully send discovery information to Home Assistant.
[01:35:03] INFO: Successfully send service information to the Supervisor.

Addon config:

customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

Integration
image

Hi, i have the same issue
image

problem is mqttbroker.json is 0kb even i click save, it doesn t save the config

have you an idea?

I’m having the same issue. I’ve been using the MQTT Broker for quite some time now, and other devices are able to use it currently.

I’ve created a dedicated login user for the MQTT Broker, as well as the HA Account, but still no luck

1 Like

not sure if anybody could help us with that, yet i did not find any solution searching through the internet

Hey Guys, I had the same problem here, and for lucky I found a hidden button…
Select the ‘password’ field and press tab, it will select a hidden button that connect into the MQTT.

that’s it! It worked for me, thanks.

FWIW, I do see a lot of window resizing issue with the current window layout. some areas hidden, can’t scroll, etc.

Also, FWIW, hopefully it helps others. I’ve installed this on two different machines. I got MQTT setup, my resolution was large enough to see the save button for the MQTT server information. Once I did that and enable the service any of the sensors I added weren’t showing up in the UI, but did in Home Assistant.

To resolve this you could kill the Windows service manually or just restart your machine and it should be good to go after that.

Hi. The Powershell command below allow me to see if a specific bluetooth device is connected to my PC.

Get-PnPDeviceProperty -InstanceID 'BTHENUM\DEV_300ED593BCA7\8&152049BE&0&BLUETOOTHDEVICE_300ED593BCA7' -KeyName '{83DA6326-97A6-4088-9453-A1923F573B29} 15'

I want to create a sensor using the WMI Query sensor but i dont know how to transcript this command. Is it possible ?

Got a notification to my work laptop using this application and powershell!


Ring powershell script (You will need to install the BurntToast module):

Import-Module BurntToast

New-BurntToastNotification -AppLogo "https://<homeassistant_url>/local/snapshots/front_door_bell.jpg" -Text "Front Doorbell", "Ding Dong" -Button (New-BTButton -Dismiss) -UniqueIdentifier "Doorbell"

Example of the notification:
image

I managed to get it working by creating a WMIsensor with the following code :

SELECT Present FROM Win32_PnPEntity WHERE Name='HID-compliant game controller'

The Device with the Name 'HID-compliant game controller' only appear when my controller is connected via bluetooth. The sensor turn to True when the controller is connected to my PC which trigger an automation to launch Steam in Big Picture Mode.

The custom command to launch Steam in Big Picture Mode :

"C:\Program Files (x86)\Steam\Steam.exe" -start steam://open/bigpicture

I currently have a sensor set up for ‘mic active’ that pauses my music, and turns a specific light red. works great!

but… is there a way to trigger my automation when teams/voip phone rings, ahead of the mic becoming active?

Hi all… this project is great! I have it up and running with just a few sensors (to test), and it works great. However, when I run UserInterface.exe to add some more sensors, it opens up as if I have nothing configured (no MQTT setting, no connection, no sensors etc.). My configuration .json files all look fine, and the background service is running fine, but the user interface doesn’t seem to be reading these at all. Any ideas?

Hello!
everything seems to be working, but my home assistant log is plagued/spammed with these error messages, how can I solve this?

2022-01-21 14:30:46 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID b5dee15b-e450-494f-b001-42bac673666e already exists - ignoring sensor.mypcname_lastactive

Thank you for this project ! It’s so powerfull… and resource efficient !
Just one question: is there please a way to get the CPU temperature as it already is for the GPU ?

Hi, When I open the HASS Workstation Service I see Unspecified Error and I can’t figure out why. I’ve tried killing the HASSWS service and restarting it on the Windows PC but that doesn’t help.

image

As far as I can tell I’ve configured the MQTT broker on my HomeAssistant and it is running ok.

@fak316 try removing the http://

image

OMG! thank you @phreaq! that was it.

Probably a dumb question that has been asked elsewhere or is an issue with MQTT or Mosquito broker but…

Where it is possible to make my PC do something - like run a custom command - could we have a button appear in the HA UI rather than a switch?

I’m struggling to get this to work with my instance’s External IP. In short, I have an external IP and access my instance through Clodufared (HTTPS - only). What is the proper way to send messages to my MQTT broker on this external IP (https://www.home-example.com)?

You would need to check the Use TLS button and have the certs loaded into the PC. I havent used external accessible MQTT for ages, but from memory you just used the external hostname or IP address. I dont believe I used https: in the connection URL.

I assume you have your MQTT server already accessible through TLS?