Home Assistant on a Windows PC
No smart home hub? A Windows PC that stays on can run Home Assistant for free, thanks to WSL (the Windows Subsystem for Linux). Casamote then connects to it like any other Home Assistant.
Is it right for you?
- Great for trying Home Assistant or controlling Wi-Fi devices (plugs, bulbs, devices already in an app).
- The PC must stay on, with sleep disabled: if it turns off, the house can no longer be controlled.
- For a long-term setup, Home Assistant recommends its full version (Home Assistant OS) on a mini PC or in a virtual machine. The WSL version has no add-on store.
Requirements
- Windows 11 (version 22H2 or later), up to date.
- An administrator account on the PC.
- The PC on the same network as the TV, ideally over Ethernet.
Step-by-step installation
1. Install WSL and Ubuntu
In PowerShell as administrator:
wsl --install -d UbuntuRestart the PC if Windows asks, then open Ubuntu from the Start menu and create your Linux user.
2. Make Home Assistant visible on the network
By default WSL is isolated from your local network, so the TV could not see it. Create the file %UserProfile%\.wslconfig with this content (Notepad works):
[wsl2]
networkingMode=mirrored3. Open the WSL firewall
Still in PowerShell as administrator, allow incoming connections to WSL, then restart WSL:
Set-NetFirewallHyperVVMSetting -Name '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}' -DefaultInboundAction Allow
wsl --shutdown4. Install Docker
In the Ubuntu terminal:
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USERClose and reopen the Ubuntu terminal.
5. Start Home Assistant
Still in Ubuntu:
docker run -d --name homeassistant --restart=unless-stopped --privileged \
-e TZ=Europe/Paris -v ~/homeassistant:/config -v /run/dbus:/run/dbus:ro \
--network=host ghcr.io/home-assistant/home-assistant:stableThe first start takes a few minutes.
6. Open Home Assistant
Find the PC's IP address with ipconfig in PowerShell ("IPv4 Address" line), then open in a browser:
http://PC-IP:8123Create your account, add your devices, then create a long-lived access token (profile › Security) for Casamote.
7. Start automatically with Windows
WSL stops when no Ubuntu terminal is open. To keep it running, create a scheduled task that starts at sign-in (PowerShell as administrator):
$a = New-ScheduledTaskAction -Execute 'wsl.exe' -Argument '-d Ubuntu --exec sleep infinity'
$t = New-ScheduledTaskTrigger -AtLogOn
$s = New-ScheduledTaskSettingsSet -ExecutionTimeLimit 0 -AllowStartIfOnBatteries
Register-ScheduledTask -TaskName 'Home Assistant WSL' -Action $a -Trigger $t -Settings $sShortcut: everything in one command
In the Linux terminal (Ubuntu under WSL, or the Raspberry Pi), this command replaces the “Install Docker” and “Start Home Assistant” steps: it installs Docker if needed, starts Home Assistant, waits until it answers and prints the address to open. It is safe to run again. You can read the script at that address before running it.
curl -fsSL https://casamote.app/assets/ha-setup.sh | bashType this command in the Ubuntu terminal, not in PowerShell (where it fails with an Invoke-WebRequest error). From PowerShell, once WSL and Ubuntu are installed (step 1), use this instead:
wsl -d Ubuntu -- bash -c "curl -fsSL https://casamote.app/assets/ha-setup.sh | bash"Connect Casamote
In Casamote: Systems › Add a system › Home Assistant, address http://PC-IP:8123 and the token. See the Home Assistant guide.
Limitations
- Zigbee or Z-Wave USB sticks: WSL cannot see them directly. The free
usbipd-wintool can attach them to WSL, but it must be redone after each restart. - Auto-discovery: some devices found automatically on a dedicated hub have to be added manually.
- Updates: run the step 5 commands again with the new image (
docker pull, then recreate the container). - This guide is not provided by Home Assistant. When in doubt, the official documentation applies: home-assistant.io/installation/windows.