Skip to main content

Multi-vendor desktop telemetry agent for Home Assistant

Project description

Desk2HA Agent

GitHub Release PyPI Python 3.11+ License CI

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

  1. Create a config file (desk2ha-agent.toml):
[http]
enabled = true
bind = "0.0.0.0"
port = 9693
auth_token = "YOUR_RANDOM_TOKEN"
  1. Run the agent:
desk2ha-agent --config desk2ha-agent.toml
  1. 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: /metrics in 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

desk2ha_agent-0.8.3.tar.gz (103.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

desk2ha_agent-0.8.3-py3-none-any.whl (119.1 kB view details)

Uploaded Python 3

File details

Details for the file desk2ha_agent-0.8.3.tar.gz.

File metadata

  • Download URL: desk2ha_agent-0.8.3.tar.gz
  • Upload date:
  • Size: 103.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for desk2ha_agent-0.8.3.tar.gz
Algorithm Hash digest
SHA256 cb535e7c1cbfcd0d96d615882b55b210eb2f173e68b5a9989c30df2552b4100d
MD5 21024666885f52e4345d521dde5aee92
BLAKE2b-256 c776eaa229b378560d2c47c93c915ab6f90c1e3ffda4f69a9eb95111a81cc20e

See more details on using hashes here.

Provenance

The following attestation bundles were made for desk2ha_agent-0.8.3.tar.gz:

Publisher: release.yml on maximusIIxII/desk2ha-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file desk2ha_agent-0.8.3-py3-none-any.whl.

File metadata

  • Download URL: desk2ha_agent-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 119.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for desk2ha_agent-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f7bad67712d094aa2486e9536cefa6968f75233721fcf21d7701bf2c6547b851
MD5 8f3ecb667d58dd96b9a6d58d0500a912
BLAKE2b-256 f448925128dd5d501d471c8d35761fe2fce5b298efe5ff46267d29b97f30b22e

See more details on using hashes here.

Provenance

The following attestation bundles were made for desk2ha_agent-0.8.3-py3-none-any.whl:

Publisher: release.yml on maximusIIxII/desk2ha-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page