DeepSeek Harness Peripheral Battery Level Display Plugin

Introduction

When writing code or handling tasks with DeepSeek Harness (DSH), a sudden loss of power in peripherals like keyboards, mice, or headsets can easily break your flow. Manually checking battery levels requires navigating into system settings, which is neither seamless nor programmable for an agent. DSH’s design philosophy is “everything is a plugin” — plugins expose system capabilities to the agent. What follows is an introduction to one such plugin: it lets you check the battery levels of local 2.4 GHz wireless peripherals within DSH, supports querying directly in conversation, viewing in the status bar, and popping up a Windows notification when battery is running low.

What It Is

dsh-peripheral-battery is a DSH plugin maintained by wbx1217. It enumerates and reads the battery levels of local 2.4 GHz HID devices, Bluetooth devices, and Xbox-compatible controllers via Windows HID interfaces, BLE channels, and XInput, and exposes battery status to DSH through a settings page and agent tools. The plugin loads only on Windows.

Core Features

Status Bar: The bottom bar displays custom names, sleep/unplugged placeholders; when there are many devices, it collapses to the first 3 + +N; when no devices are found, it shows “No wireless peripherals detected · Go to Settings”.

Device Management Page: Settings → Peripheral Battery, including service status, first-time onboarding, periodic refresh / interval / threshold / notification settings, device show/hide, renaming, drag / ↑↓ reordering, removal of unplugged devices, and new device scanning.

Hot-plug Refresh: The daemon listens for WM_DEVICECHANGE; it refreshes immediately upon HID device arrival or removal. The status bar receives snapshot changes via long polling.

Adapter Marketplace: The settings page has a built-in search / preview / install panel. When the default index on GitHub Pages is unreachable, it falls back to Gitee / jsDelivr / raw in sequence. After scanning for “New Devices”, entries in the marketplace are auto-matched by VID/PID.

System Notifications: When battery drops below the threshold and the device is discharging, a Windows Toast is sent (using the AUMID already registered by DSH).

Device State Distinction: online (battery read successfully) / asleep (power-saving sleep) / unplugged (removed, last reading retained) / error (present but read failed).

Installation & Enablement

The plugin supports two installation forms: directory and .tgz.

Directory Installation:
1. Obtain the release package (the plugin marketplace directory or the directory after unzipping a zip file);
2. In DSH’s Plugins → Add plugin, select that directory;
3. After installation, restart / refresh the page and you’re good to go.

.tgz Installation:

tar -xzf dsh-peripheral-battery-0.1.0.tgz

After extraction, go into package/ and install that directory as the plugin directory. You should be able to see package.json, index.js, client.js, and bin/ inside.

On startup, the plugin checks: it loads only on Windows; if bin/*.exe files are missing, it immediately reports “Please reinstall the complete release package”.

Typical Usage

Ask directly in a conversation:
- “How much battery is left on my keyboard?”
- “Are my headsets about to run out of battery?”
- “Why isn’t my new mouse supported?”

Settings can also be modified by the agent: battery_config, or open Settings → Peripheral Battery.

Use Cases & Caveats

Best suited for users who frequently use 2.4 GHz HID keyboards and mice, BLE headsets, and Xbox controllers. The plugin runs with the current DSH process permissions. Review the source code and license before installation.

Closing

This plugin turns peripheral battery levels into programmable state within DSH, allowing the agent to query in conversation, display in the status bar, and alert when a threshold is triggered. The first time you open it after installation, you’ll enter a “First Use” onboarding flow where you can choose whether to enable low-battery alerts. See GitHub for more details.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye