I wanted my PC in Home Assistant without an MQTT broker, so I wrote my own integration
I have a Snapdragon laptop, a desktop PC and a Home Assistant box on a Raspberry Pi. I wanted the computers in Home Assistant like any other device: sensors, power buttons, notifications, media. The usual answer is HASS.Agent plus an MQTT broker. HASS.Agent had no native ARM64 build, and I didn't want a broker just so two machines in the same house could talk. So I built Deskmate. It's a desktop…
A man with multiple computing devices sought a way to integrate his PCs into his Home Assistant system without using an MQTT broker. He developed Deskmate, a desktop app and Home Assistant integration, to accomplish this task. Deskmate is an open-source solution built on Tauri 2, Rust, and React, and it is licensed under the MIT license.
The integration establishes an encrypted WebSocket connection within Home Assistant, with a fresh X25519 key exchange for each session. Frames are protected with AES-256-GCM and replay protection, and a secondary cipher layer can be enabled. Keys are stored in the Windows Credential Manager or the keyring on Linux. Home Assistant does not send commands; instead, the PC looks up commands in its own configuration.
Deskmate also enables file sharing between the phone and PC without the need for a cloud, cable, or extra app. The protocol prevents file overwriting and disallows traversal, UNC, device paths, alternate data streams, and reparse points. A shared clipboard feature allows copying and pasting between the PC and phone.
As a media player, the PC is represented as an entity in Home Assistant, enabling the use of various media cards for control, playback, and volume adjustments. The integration also offers screen time management for children through a daily limit, allowed hours, and a block list for games and applications. This feature works locally, without an internet connection, and requires one administrator password to prevent children from easily closing it.
Other features include sensor monitoring for CPU, memory, disks, network, battery, GPU, temperatures, idle time, and lock state. Power management options cover sleep, hibernate, restart, shut down, lock, brightness, and custom scripts as buttons, switches, and sliders. Notifications with pictures and buttons can trigger automations. An optional Windows service maintains the PC's presence in Home Assistant during sign-in and reboot, with a Connection sensor indicating asleep, off, or lost states.
Deskmate is available for both x86_64 and ARM64 platforms and includes hotkeys, an always-on-top widget panel, a Stream Deck plugin, and signed automatic updates. The software does not collect telemetry, and users can choose to enable specific sensors as desired. For more information, visit the GitHub repository: https://github.com/JakubWawrzola/deskmate.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.