A Linux daemon that turns a Microsoft Surface Dial into a volume knob for Home Assistant media players.
- Rotation adjusts volume of a configurable
media_playerentity - Button press toggles mute
- Auto-reconnects when the dial disconnects/reconnects over Bluetooth
- Debounces rapid rotation into single API calls for responsiveness
- Runs as a systemd service
- Linux with Bluetooth LE support
- Microsoft Surface Dial paired via
bluetoothctl - A Home Assistant instance with a long-lived access token
- User must be in the
inputgroup:sudo gpasswd -a $(whoami) input
cargo build --releaseThe binary will be at target/release/surface-dial-hass.
Copy the example config and edit it:
cp config.toml.example config.toml[homeassistant]
url = "http://homeassistant.local:8123"
token = "your_long_lived_access_token_here"
[media_player]
entity_id = "media_player.living_room"
volume_step = 0.02 # 2% per click
[dial]
device_name = "Surface Dial System Multi Axis"
debounce_ms = 50| Setting | Description | Default |
|---|---|---|
homeassistant.url |
Home Assistant base URL | — |
homeassistant.token |
Long-lived access token | — |
media_player.entity_id |
Entity to control | — |
media_player.volume_step |
Volume change per click (0.0–1.0) | 0.02 |
dial.device_name |
evdev device name to match | Surface Dial System Multi Axis |
dial.debounce_ms |
Debounce window for batching rotations | 50 |
./target/release/surface-dial-hass --config config.tomlSet RUST_LOG=debug for verbose output.
sudo cp target/release/surface-dial-hass /usr/local/bin/
sudo mkdir -p /etc/surface-dial-hass
sudo cp config.toml /etc/surface-dial-hass/config.toml
sudo cp surface-dial-hass.service /etc/systemd/system/
sudo systemctl enable --now surface-dial-hass