Multi-vendor desktop telemetry agent for Home Assistant
Project description
Desk2HA Agent
Multi-vendor desktop telemetry agent for Home Assistant.
Collects hardware metrics, peripheral status, and display settings from Windows, Linux, and macOS — and exposes them via HTTP and MQTT for the Desk2HA HA integration.
Features
- Cross-platform: Windows, Linux, macOS
- 3-tier collector model: Platform (OS) → Generic (DDC/CI, HID, BLE, Bluetooth, UVC) → Vendor (Dell, HP, Lenovo, Logitech, Corsair, SteelSeries, Razer)
- Display control: Brightness, contrast, volume, input source, KVM switch, PBP mode via DDC/CI
- Webcam control: Brightness, contrast, saturation, white balance, focus, zoom, pan/tilt via UVC
- Litra control: Power, brightness, color temperature for Logitech Litra Glow/Beam
- Wireless receivers: Dell Universal, Logitech Bolt/Unifying/Lightspeed, Jabra Link, Corsair Slipstream, Razer HyperSpeed
- Dual transport: HTTP API (OpenAPI v2.0.0) + MQTT with HA Discovery
- Auto-discovery: Zeroconf/mDNS (
_desk2ha._tcp.local.) - Self-update: Version check via GitHub Releases + pip upgrade
- Elevated helper: Separate process for admin-only metrics (Dell DCM WMI)
- Vendor images: Tier 1 generic + Tier 2 vendor-specific SVG device silhouettes
- System tray: Windows tray icon with status menu
Collectors
| Tier | Collector | Metrics |
|---|---|---|
| Platform | Windows (WMI + psutil) | CPU, RAM, disk, battery, network, GPU, OS info |
| Platform | Linux (sysfs + psutil) | Same as above |
| Platform | macOS (IOKit + psutil) | Same as above |
| Generic | DDC/CI | Monitor brightness, contrast, volume, input, power, KVM, PBP |
| Generic | UVC Webcam | Brightness, contrast, saturation, white balance, focus, zoom, pan/tilt, resolution |
| Generic | USB PD | Charger connected, voltage, charging state |
| Generic | HeadsetControl | Headset battery, sidetone, LED, chatmix |
| Generic | HID Battery | USB peripheral battery levels |
| Generic | Bluetooth Peripheral | Paired BLE + Classic devices, GATT battery levels, device type classification |
| Generic | Network | WiFi RSSI/signal/SSID, Ethernet speed |
| Generic | USB Devices | Connected peripherals with VID/PID and friendly names |
| Generic | Wireless Receiver | Dell Universal, Logitech Bolt/Unifying, Jabra Link, paired device count |
| Vendor | Dell Command Monitor | CPU/GPU/SSD/skin thermals, fan speeds, AC adapter wattage (via elevated helper) |
| Vendor | HP WMI | BIOS settings, thermal profile (Windows) |
| Vendor | Lenovo WMI | Thermal mode, battery thresholds (Windows + Linux sysfs) |
| Vendor | Logitech Litra | Power, brightness (20-250 lm), color temp (2700-6500K) |
| Vendor | Corsair iCUE | HS80, Void, K70, K100, Dark Core detection + battery via cuesdk |
| Vendor | SteelSeries | Arctis Nova 7/Pro, Rival, Aerox, Apex detection |
| Vendor | SteelSeries Sonar | Per-channel volume/mute, chat-mix via GG Sonar REST API (Windows) |
| Vendor | Razer | DeathAdder, Viper, Huntsman, BlackWidow, Kraken detection |
Installation
pip install desk2ha-agent
# Windows extras (WMI, tray icon):
pip install desk2ha-agent[windows]
Quick Start
- Create a config file (
desk2ha-agent.toml):
[http]
enabled = true
bind = "0.0.0.0"
port = 9693
auth_token = "YOUR_RANDOM_TOKEN"
- Run the agent:
desk2ha-agent --config desk2ha-agent.toml
- In Home Assistant, add the Desk2HA integration and point it to
http://<agent-ip>:9693.
Elevated Helper
Some metrics (e.g. Dell Command Monitor WMI) require admin privileges. The elevated helper runs as a separate process with admin rights and serves metrics via localhost HTTP:
# Start manually:
desk2ha-helper --port 9694
# Or install as Windows service (run as Administrator):
powershell -File scripts/install-helper-service.ps1
The agent automatically queries the helper at http://127.0.0.1:9694 if it's running. If not, DCM metrics are simply skipped.
Configuration
See examples/full-config.toml for all options.
| Section | Key Options |
|---|---|
[http] |
bind, port, auth_token |
[mqtt] |
broker, port, username, password_env, base_topic |
[collectors] |
disabled, intervals (per-collector poll rate) |
[logging] |
level (DEBUG/INFO/WARNING) |
API Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /v1/health |
No | Health check |
| GET | /v1/info |
Yes | Device identity + collector status |
| GET | /v1/metrics |
Yes | All collected metrics |
| GET | /v1/image/{device_key} |
Yes | Device product image (SVG) |
| GET | /v1/commands |
Yes | List available commands |
| POST | /v1/commands |
Yes | Execute a command (e.g. set brightness) |
| GET | /v1/update/check |
Yes | Check for new agent release |
| POST | /v1/update/install |
Yes | Install agent update |
Recommended Vendor Software
The agent works out of the box with basic metrics via standard OS APIs. For full telemetry (detailed thermals, fan speeds, battery health, thermal profile control), install the vendor-specific software for your hardware:
Dell
| Software | What it unlocks | Download |
|---|---|---|
| Dell Command | Monitor | CPU/GPU/SSD/skin thermals, fan RPM, AC adapter wattage, thermal profile control. Requires the elevated helper for WMI access. | Dell Support |
| Dell Peripheral Manager | Webcam settings, keyboard backlight, mouse DPI for Dell peripherals | Dell Support |
HP
| Software | What it unlocks | Download |
|---|---|---|
| HP System Event Utility | BIOS settings, thermal profile, fan control | HP Support (search your model) |
| HP Notifications | Battery health, power delivery info | Included with HP Support Assistant |
Lenovo
| Software | What it unlocks | Download |
|---|---|---|
| Lenovo Vantage | Thermal mode, battery thresholds, keyboard backlight | Microsoft Store |
| Lenovo System Interface Foundation | WMI access for BIOS settings, fan speed | Lenovo Support |
Logitech
| Software | What it unlocks | Notes |
|---|---|---|
| Logitech Litra Glow/Beam | Power, brightness, color temperature control via HID | No extra software needed — agent communicates directly via USB HID. Close G HUB if it blocks the HID interface. |
Linux (ThinkPad)
| Module | What it unlocks | How to enable |
|---|---|---|
thinkpad_acpi |
Fan speed, thermal mode | Usually auto-loaded. Check: lsmod | grep thinkpad |
ideapad_acpi |
Performance mode (IdeaPad/Legion) | Usually auto-loaded. Check: lsmod | grep ideapad |
Cross-Platform
| Software | What it unlocks | Download |
|---|---|---|
| HeadsetControl | Headset battery, sidetone, LED, chatmix (SteelSeries, Corsair, Logitech, HyperX) | GitHub |
| OpenCV (opencv-python) | UVC webcam controls (brightness, contrast, white balance, focus, zoom) | pip install opencv-python |
Note: All vendor software is optional. The agent gracefully skips collectors when the required software is not installed. You can check which collectors are active via
GET /v1/info.
Windows Autostart
The agent needs an interactive desktop session for DDC/CI monitor control. Use the Startup folder (not a Windows Service):
%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\Desk2HA Agent.vbs
The elevated helper can run as a Windows Service (Session 0 is fine for WMI):
# Run as Administrator:
powershell -File scripts/install-helper-service.ps1
Known Issues
| Issue | Workaround | Status |
|---|---|---|
| DDC/CI not working as Windows Service | DDC/CI requires an interactive desktop session (Session 1+). Use Startup folder autostart, not NSSM/Windows Service. | By design (Windows limitation) |
| Dell Command Monitor needs admin | DCM WMI namespace requires elevated privileges. Use the elevated helper service. | Solved (v0.3.0+) |
| Logitech Litra G HUB conflict | If Logitech G HUB is running, it may hold the HID interface and prevent the agent from reading Litra status. | Close G HUB or disable Litra in G HUB |
Upcoming Features
- Prometheus endpoint:
/metricsin Prometheus scrape format - SteelSeries/Razer battery: Battery levels via HID for wireless peripherals
- macOS Bluetooth: CoreBluetooth support for paired device enumeration
- Logitech HID++: Wireless peripheral metrics via HID++ protocol
- USB PD Dock Monitoring: Thunderbolt/USB4 dock-specific metrics
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file desk2ha_agent-0.7.0.tar.gz.
File metadata
- Download URL: desk2ha_agent-0.7.0.tar.gz
- Upload date:
- Size: 100.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
764f371487c233a380a977d7ee62f8f0a5c60a8fbd0a3ef3b68ae8497de43aec
|
|
| MD5 |
a5d55b1f36790e787af9ee28b420eec2
|
|
| BLAKE2b-256 |
d264618fd5c78ba1225413ac7f85bcb29e52e18a1217b7f443fd1c33817e4648
|
Provenance
The following attestation bundles were made for desk2ha_agent-0.7.0.tar.gz:
Publisher:
release.yml on maximusIIxII/desk2ha-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
desk2ha_agent-0.7.0.tar.gz -
Subject digest:
764f371487c233a380a977d7ee62f8f0a5c60a8fbd0a3ef3b68ae8497de43aec - Sigstore transparency entry: 1264817914
- Sigstore integration time:
-
Permalink:
maximusIIxII/desk2ha-agent@a617a5cb6101f2c4a20a22eed03ee83cd7848543 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/maximusIIxII
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a617a5cb6101f2c4a20a22eed03ee83cd7848543 -
Trigger Event:
push
-
Statement type:
File details
Details for the file desk2ha_agent-0.7.0-py3-none-any.whl.
File metadata
- Download URL: desk2ha_agent-0.7.0-py3-none-any.whl
- Upload date:
- Size: 115.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1e43fc4da23d7346ef41db23d06cd82fbb1e9a7596a9c965643d91acd865fc4
|
|
| MD5 |
eb1eaed652ecfc2b27bf601f2e7cc053
|
|
| BLAKE2b-256 |
1587c37137ecbc98b9c8211907a394dcb5915698c2c816b6e354602eea02f595
|
Provenance
The following attestation bundles were made for desk2ha_agent-0.7.0-py3-none-any.whl:
Publisher:
release.yml on maximusIIxII/desk2ha-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
desk2ha_agent-0.7.0-py3-none-any.whl -
Subject digest:
e1e43fc4da23d7346ef41db23d06cd82fbb1e9a7596a9c965643d91acd865fc4 - Sigstore transparency entry: 1264818027
- Sigstore integration time:
-
Permalink:
maximusIIxII/desk2ha-agent@a617a5cb6101f2c4a20a22eed03ee83cd7848543 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/maximusIIxII
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a617a5cb6101f2c4a20a22eed03ee83cd7848543 -
Trigger Event:
push
-
Statement type: