<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: JakubWawrzola</title>
    <description>The latest articles on DEV Community by JakubWawrzola (@jakubwawrzola).</description>
    <link>https://dev.to/jakubwawrzola</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4248400%2Fe550ef79-f279-43c2-87c0-12f469533422.png</url>
      <title>DEV Community: JakubWawrzola</title>
      <link>https://dev.to/jakubwawrzola</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jakubwawrzola"/>
    <language>en</language>
    <item>
      <title>I wanted my PC in Home Assistant without an MQTT broker, so I wrote my own integration</title>
      <dc:creator>JakubWawrzola</dc:creator>
      <pubDate>Mon, 16 Nov 2026 19:34:25 +0000</pubDate>
      <link>https://dev.to/jakubwawrzola/i-wanted-my-pc-in-home-assistant-without-an-mqtt-broker-so-i-wrote-my-own-integration-4p1a</link>
      <guid>https://dev.to/jakubwawrzola/i-wanted-my-pc-in-home-assistant-without-an-mqtt-broker-so-i-wrote-my-own-integration-4p1a</guid>
      <description>&lt;p&gt;I have a Snapdragon laptop, a desktop PC and a Home Assistant box on a&lt;br&gt;
Raspberry Pi. I wanted the computers in Home Assistant like any other device:&lt;br&gt;
sensors, power buttons, notifications, media. The usual answer is HASS.Agent&lt;br&gt;
plus an MQTT broker. HASS.Agent had no native ARM64 build, and I didn't want&lt;br&gt;
a broker just so two machines in the same house could talk.&lt;/p&gt;

&lt;p&gt;So I built Deskmate. It's a desktop app (Tauri 2, Rust, React) and its own&lt;br&gt;
Home Assistant integration (Python, in the default HACS catalog). It's MIT&lt;br&gt;
licensed. This post is about the three parts I use every day and a few&lt;br&gt;
design decisions behind them.&lt;/p&gt;

&lt;h2&gt;
  
  
  One encrypted connection instead of a broker
&lt;/h2&gt;

&lt;p&gt;The integration opens a WebSocket endpoint inside Home Assistant. The PC&lt;br&gt;
connects to it with a pairing code you copy from the integration's setup&lt;br&gt;
screen. Every session starts with a fresh X25519 key exchange, frames are&lt;br&gt;
AES-256-GCM with replay protection, and a second cipher layer can be turned&lt;br&gt;
on. Keys live in Windows Credential Manager, or in the keyring on Linux.&lt;/p&gt;

&lt;p&gt;Home Assistant never sends code to run. A command is an ID that the PC looks&lt;br&gt;
up in its own configuration, so a compromised Home Assistant can press the&lt;br&gt;
buttons you created, and nothing else. The protocol also refuses to&lt;br&gt;
downgrade: a version or cipher mismatch is rejected with a reason instead of&lt;br&gt;
falling back quietly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Files between the phone and the PC
&lt;/h2&gt;

&lt;p&gt;This is the feature I didn't expect to use so much. A panel in the Home&lt;br&gt;
Assistant sidebar lets you send files from your phone to the PC and download&lt;br&gt;
from folders you chose to share. No cloud, no cable, no extra app on the&lt;br&gt;
phone: the Home Assistant app is already there.&lt;/p&gt;

&lt;p&gt;Paths go through an allowlist with canonicalized paths. Traversal, UNC and&lt;br&gt;
device paths, alternate data streams and reparse points are refused, and a&lt;br&gt;
received file never overwrites an existing one. There's a shared clipboard&lt;br&gt;
too: copy on the PC, paste on the phone, and the other way round.&lt;/p&gt;

&lt;h2&gt;
  
  
  Music
&lt;/h2&gt;

&lt;p&gt;The PC shows up as a &lt;code&gt;media_player&lt;/code&gt; entity, so any media card works: what's&lt;br&gt;
playing, play and pause, next and previous, volume and mute. From Home&lt;br&gt;
Assistant you can also switch Windows between speakers and headphones or mute&lt;br&gt;
the microphone, which is handy before a call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Screen time for kids, without a Microsoft account
&lt;/h2&gt;

&lt;p&gt;Windows' own family features need a Microsoft account for the child and work&lt;br&gt;
through the cloud. Deskmate does it locally: a daily limit per Windows&lt;br&gt;
account, allowed hours, and a block list for games and apps. The child gets&lt;br&gt;
an "Ask for more time" button; the request reaches your phone as a Home&lt;br&gt;
Assistant notification and you add minutes with one tap. Time is counted on&lt;br&gt;
the PC, so it works without internet, and with one administrator password a&lt;br&gt;
child can't just close it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Everything else
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Sensors: CPU, memory, disks, network, battery, GPU and temperatures, idle
time (game controllers count), lock state, screen on.&lt;/li&gt;
&lt;li&gt;Power: sleep, hibernate, restart, shut down, lock, brightness, and your own
scripts as buttons, switches and sliders.&lt;/li&gt;
&lt;li&gt;Notifications with a picture and buttons that trigger automations.&lt;/li&gt;
&lt;li&gt;An optional Windows service that keeps the PC in Home Assistant at the
sign-in screen and after a reboot, with a Connection sensor that tells
"asleep" from "off" from "lost".&lt;/li&gt;
&lt;li&gt;A Linux daemon and desktop app (preview), x86_64 and ARM64.&lt;/li&gt;
&lt;li&gt;Hotkeys, an always-on-top widget panel, and a Stream Deck plugin.&lt;/li&gt;
&lt;li&gt;Signed automatic updates, no telemetry, and every sensor that reveals what
you're doing is off until you turn it on.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A few things I learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Opt-in by default costs nothing.&lt;/strong&gt; The active window, Wi-Fi name and&lt;br&gt;
camera-in-use sensors are useful, but they also describe your day. Making them&lt;br&gt;
off by default meant one extra click for people who want them and no awkward&lt;br&gt;
surprises for anyone else.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write the threat model down.&lt;/strong&gt; &lt;code&gt;docs/SECURITY.md&lt;/code&gt; lists what Deskmate&lt;br&gt;
protects against and what it doesn't. Writing it forced decisions that would&lt;br&gt;
otherwise have stayed vague, for example that Home Assistant can never trigger&lt;br&gt;
an update, only the app can.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ARM64 needs care with dependencies.&lt;/strong&gt; Some popular Rust crypto and TLS crates&lt;br&gt;
pull in a C toolchain that breaks the Windows ARM64 build. CI checks the&lt;br&gt;
dependency tree for both Windows targets so this can't creep back in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;In HACS, search for &lt;strong&gt;Deskmate&lt;/strong&gt;, download it and restart Home Assistant.&lt;/li&gt;
&lt;li&gt;Add the Deskmate integration and copy the pairing code.&lt;/li&gt;
&lt;li&gt;Install the app from the releases page, paste the code, connect.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/JakubWawrzola/deskmate" rel="noopener noreferrer"&gt;https://github.com/JakubWawrzola/deskmate&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Issues and ideas are welcome. The next version is planned in the open, in&lt;br&gt;
&lt;a href="https://github.com/JakubWawrzola/deskmate/blob/main/docs/dev/ROADMAP.md" rel="noopener noreferrer"&gt;docs/dev/ROADMAP.md&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>homeassistant</category>
      <category>opensource</category>
      <category>rust</category>
      <category>python</category>
    </item>
  </channel>
</rss>
