Releases: v1k70rk4/HASS.Agent.NET10
v10.5.0
What Changed
10.5.0
- Fixed a freeze that could stop all reporting when the monitor powered off: multiple audio components held separate WASAPI COM instances and deadlocked during an audio device change (e.g. HDMI audio disappearing). Audio access is now a single, serialized endpoint, and the device-change handler no longer does COM work inside the notification callback.
- The system sensor loop now survives a transient read error instead of stopping, and logs the full stack trace if one occurs.
10.4.0 (Yanked)
- Added event-driven (push) sensor updates: monitor power state, session lock/unlock, AC/battery power source, and audio (volume, mute, output device, microphone mute) now report to Home Assistant within ~600 ms of changing instead of waiting for the next poll. Rapid changes (e.g. dragging the volume slider) are debounced.
- Added enum sensor states:
monitor_power_state,power_status, andsession_stateare nowenumsensors, so Home Assistant knows their possible values (selectable in automations;dimmedis a first-class monitor state). - Added device availability: the device publishes an MQTT availability topic with a Last Will, and a heartbeat over the HA API transport. On a clean shutdown — or a crash / network loss — the entities turn unavailable in Home Assistant instead of keeping stale values.
- The Sensors page now shows a Push profile for push-driven sensors.
- Moved the Bluetooth sensor from hourly to normal polling.
v10.3.0
The headline feature: update your PCs straight from Home Assistant, plus a new
diagnostics toolbox. Everything since 10.2.0.
✨ New features
One-click updates from Home Assistant
- The HA update entity now has a working Install button.
- With the Windows service installed, updates apply fully silently — no UAC prompt,
the tray app relaunches itself when done. - Without the service, the update runs with a UAC prompt on the PC.
- Home Assistant gets persistent notifications for progress: started, completed
(old → new version), no installer, or failure. - Opt into the beta channel in-app to follow GitHub pre-releases.
Danger Zone (opt-in tab on the General page)
- MQTT maintenance — list and delete retained HASS.Agent messages on the broker.
- Republish discovery — re-send device discovery without restarting.
- Debug log — live viewer with filtering and a runtime verbose (DEBUG) toggle.
- Live MQTT monitor — watch
hass.agent/#traffic in real time. - Backup / restore — settings to/from a portable JSON file.
- Factory reset — double-confirmed wipe with a fresh serial number and API key.
Other
- MQTT connection test button on the MQTT page.
- SemVer-aware version comparison so pre-releases (
10.3.0-beta.1) sort correctly.
🐛 Fixes
- Custom sensor Test value is now instant for process/service/disk sensors
(it no longer reads the full system metrics, which scanned the event log each time). - The General page service warning now also shows when the service is installed but
stopped, and the HA update notification tells you to start it (instead of silently
falling back to a UAC prompt nobody is there to confirm). - Input fields no longer overflow on small window sizes.
📋 Compatibility
- Pairs with the HASS.Agent integration 10.3.0 for persistent notifications;
older integration versions keep working without that feature.
Full Changelog: v10.2.0...v10.3.0
v10.3.0-beta.4
⚠️ Pre-release. The one-click update fix below only takes effect from the
version that contains it — install this build manually once, then in-app /
HA-button updates work from here on.
Full Changelog: v10.3.0-beta.3...v10.3.0-beta.4
Full Changelog: v10.3.0-beta.3...v10.3.0-beta.4
v10.3.0-beta.3
⚠️ Pre-release. The one-click update fix below only takes effect from the
version that contains it — install this build manually once, then in-app /
HA-button updates work from here on.
✨ New features
Danger Zone — opt-in maintenance & diagnostics tab
Enable it with the checkbox on the General page; a new tab appears with:
- MQTT maintenance — list and delete retained HASS.Agent messages on the broker
(this device's or all devices'), the cure for ghost entities after renames/reinstalls - Republish discovery — re-send device discovery on the active transport, no restart
- Debug log — live log viewer with filtering and a runtime verbose (DEBUG) toggle;
MQTT send/receive is now logged at DEBUG level - Live MQTT monitor — real-time view of
hass.agent/#traffic with payload preview - Backup / restore — settings export/import to portable JSON (machine-bound secrets excluded)
- Factory reset — double-confirmed settings wipe + automatic restart
One-click updates from Home Assistant
- The HA update entity now has an Install button
- With the system service installed: fully silent — the SYSTEM service downloads and
installs the update, no UAC prompt, the tray app relaunches itself afterwards - Without the service: UAC-elevated install, with a persistent notification in HA
suggesting the service for fully silent updates - Progress is reported back to HA as persistent notifications: started, completed
(old → new version), no installer, or failure
Beta update channel
- New toggle in the Danger Zone: update checks include GitHub pre-releases
- SemVer-aware version comparison (
10.3.0 > 10.3.0-beta.2 > 10.3.0-beta.1)
MQTT connection test
- Test connection button on the MQTT page (matches the HA API page), tests the
values currently in the form before saving
🐛 Fixes
- Silent update install now runs via Task Scheduler, detached from the app's
process tree — previously the installer died when it stopped the service, and the
relaunch watchdog was killed with the tray app (beta.3) - Input fields (device name, broker, URL, token, …) no longer overflow on small windows
SoftwareVersionnow keeps pre-release suffixes (-beta.3) instead of truncating them
📋 Requirements
- Pairs with the HASS.Agent integration 10.3.0 (stable) for persistent notifications;
older integration versions keep working, just without that feature
v10.2.0
Summary
- Fixed the app defaulting to Hungarian on non-Hungarian systems by auto-detecting the OS
language viaCultureInfo.CurrentUICultureand falling back to English - Fixed clean install not deleting legacy
HASS.Agent.Companiondirectories, which caused
old settings to migrate back on first launch - Fixed tray icon missing in single-file standalone publish by embedding the icon as an
assembly resource (GetManifestResourceStream) instead of relying on a loose file - Removed the "MQTT not configured" warning from the General page when HA API is enabled —
the error now only appears when neither MQTT nor HA API is active
Full Changelog: v10.1.0...v10.2.0
Full Changelog: v10.1.0...v10.2.0
v10.1.0
Summary
- Add Home Assistant WebSocket API transport as MQTT failover / remote transport
- Add HA API settings, connection test, HTTP warning tooltip, and setup status banners
- Publish Home Assistant update entity state and add About-page update checking
- Add multi-value sensor attributes and one-click custom sensor creation
- Add per-sensor polling profiles: fast, normal, hourly, and startup
- Improve custom sensor testing so returned values can be checked from the UI
- Improve Windows Update pending detection, release lookup, service/MQTT warnings, and tray labels
- Route HA API commands by
serial_numberinstead of device name - Bump app and installer version to 10.1.0
Full Changelog: v10.0.0...v10.1.0
Full Changelog: v10.0.0...v10.1.0
v10.0.0
HASS.Agent .NET10
A modern Windows companion app for Home Assistant.
This fork refreshes the classic HASS.Agent idea into HASS.Agent .NET10, a lightweight .NET 10 client built for current Windows desktops. The original client was a .NET 6-era application; this version focuses on a smaller, cleaner runtime, MQTT-first Home Assistant integration, Windows 11-friendly UX, and a split tray app/system service model.
It is designed for Windows PCs you want to observe and control from Home Assistant: media playback, notifications, sensors, shutdown/restart, command buttons, and rich machine state.
The modern .NET10 line starts at version 10.0.0. The pre-.NET10 client remains available on the legacy branch for users who do not want to migrate yet.
Table of Contents
- What Changed
- Requirements
- Quick Start
- Features
- Sensors
- Home Assistant Integration
- Local API and Security
- Installer
- Build from Source
- Windows Firewall
- Minimal Development Setup
What Changed
- Rebuilt the companion client as a modern
.NET 10Windows app. - Added a Windows tray app for interactive user-session features.
- Added a Windows service for system-level features that should work without a logged-in user.
- Renamed the modern client to HASS.Agent .NET10 so it is clearly separate from the legacy app.
- Moved shared settings/logs to
C:\ProgramData\HASS.Agent.NET10. - Added MQTT discovery and dynamic Home Assistant entities.
- Added a role matrix so features can be handled by
Service,Tray app, or both. - Added a configurable sensor catalog and custom sensors.
- Added service-aware shutdown/restart/restart-cancel support.
- Added a new Windows 11-style icon.
Requirements
- Windows 10 version 2004 / build 19041 or newer
- Windows 11 recommended
- x64 Windows
- Home Assistant with MQTT broker (Mosquitto or similar)
- The companion Home Assistant integration:
v1k70rk4/HASS.Agent-Integration
Windows versions older than Windows 10 2004 are intentionally blocked. The app targets net10.0-windows10.0.19041.0 and uses modern Windows APIs for notifications, media sessions, services, sensors, and desktop state.
If you download a published self-contained build, you do not need to install the .NET runtime separately. If you want to build from source, install the .NET 10 SDK.
Quick Start
- Install the Home Assistant integration:
v1k70rk4/HASS.Agent-Integration - Download a release build or the installer from Releases, or build from source.
- Run the installer or start
HASS.Agent.NET10.exedirectly. - Open the tray icon and go to settings.
- On the MQTT page, enable MQTT and enter your broker address and credentials.
- On the Capabilities page, choose which features are handled by the tray app vs. the service.
- On the Sensors page, enable built-in sensors and add custom sensors.
- Optionally install the Windows service from the Service page.
- The device appears automatically in Home Assistant via MQTT discovery.
Features
Notifications
Receive Home Assistant notifications on Windows as tray balloon tips or actionable popup windows.
Supports actionable notifications: buttons in the popup can publish an action event back to Home Assistant, so automations can react to user choices.
action: hass_agent.send_notification
target:
entity_id: notify.my_pc_notifications
data:
title: Home Assistant
message: "Would you like to turn on the lights?"
data:
actions:
- action: lights_on
title: "Turn on"
- action: lights_off
title: "Turn off"Button presses are published to MQTT and appear as an event entity in Home Assistant.
Media Player
Expose the active Windows media session to Home Assistant as a media_player entity (MQTT only):
- current title, artist, album
- play / pause / stop
- next / previous track
- seek
- volume and mute control
- TTS playback (Home Assistant TTS engine generates audio URL, agent plays it)
The media player uses Windows global media transport sessions for playback control and the default Windows audio endpoint for volume/mute.
System Commands
Control the PC from Home Assistant via button entities or service calls:
| Command | Description | Service capable |
|---|---|---|
lock |
Lock workstation | |
sleep |
Suspend | |
monitor_off |
Turn off monitors | |
volume_up |
Volume +5% | |
volume_down |
Volume -5% | |
toggle_mute |
Toggle mute | |
shutdown |
Shutdown (with delay) | yes |
restart |
Restart (with delay) | yes |
restart_cancel |
Cancel pending shutdown/restart | yes |
Shutdown and restart support configurable delay, force mode, and translated comments:
action: hass_agent.execute_command
data:
device_name: MY-PC
command: restart
force: true
time: 30
comment: "Restarted from Home Assistant"Windows Service
The same executable can run as a tray app or as a Windows service. Use the Service page to install, start, stop, or uninstall the service (UAC elevation is requested automatically).
Service handles features that should work even when nobody is logged in:
- shutdown, restart, restart_cancel
- system sensors (CPU, memory, disk, network, etc.)
- custom sensors (process, service, disk)
Tray app handles interactive user-session features:
- notifications
- media player
- active window/process sensors
- clipboard, audio, monitor state
- user session details
Use the Capabilities page to choose which role handles each feature.
Sensors
Built-in Sensors
The Sensors page has two tabs: Built-in sensors and Custom sensors.
Built-in sensors are predefined system metrics. Each one can be enabled/disabled independently and assigned to the tray app, the service, or both:
| Sensor | Profile | Service | Tray |
|---|---|---|---|
| CPU usage | fast | yes | yes |
| Memory usage | fast | yes | yes |
| Available memory (MB) | fast | yes | yes |
| System drive free % | normal | yes | yes |
| System drive free (GB) | normal | yes | yes |
| Uptime | fast | yes | yes |
| Boot time | startup | yes | yes |
| Battery level | normal | yes | yes |
| Battery time remaining | normal | yes | yes |
| Power status | normal | yes | yes |
| LAN IP | normal | yes | yes |
| Session state | normal | yes | yes |
| Logged in user | normal | yes | yes |
| Logged in users (count) | normal | yes | yes |
| RDP sessions | normal | yes | yes |
| Pending reboot | normal | yes | yes |
| VPN connected | normal | yes | yes |
| Wi-Fi SSID | normal | yes | yes |
| Wi-Fi signal | normal | yes | yes |
| Bluetooth enabled | hourly | yes | yes |
| Windows Update pending | hourly | yes | yes |
| Recent Event Log errors | hourly | yes | yes |
| Last shutdown reason | startup | yes | yes |
| Active window | fast | yes | |
| Active process | fast | yes | |
| Foreground app & window | fast | yes | |
| Volume | fast | yes | |
| Muted | fast | yes | |
| Monitor power state | normal | yes | |
| Active displays | normal | yes | |
| Idle time | fast | yes | |
| Session locked | fast | yes | |
| User present | fast | yes | |
| Clipboard text available | fast | yes | |
| Audio output device | normal | yes | |
| Microphone muted | normal | yes |
Sensor Attributes
Some sensors have a simple primary state but expose richer details as attributes. These attributes can be extracted into separate Home Assistant entities using the built_in_attribute custom sensor type (see Custom Sensors).
Sensors with attributes:
| Sensor | Attributes |
|---|---|
| LAN IP | addresses[N].adapter, addresses[N].description, addresses[N].address |
| Active displays | displays[N].name, displays[N].primary, displays[N].width, displays[N].height, displays[N].x, displays[N].y |
| Recent Event Log errors | window_minutes, events[N].log, events[N].provider, events[N].event_id, events[N].level, events[N].created_at |
| Last shutdown reason | `reaso... |


