Home Assistant

Add Zigbee Dongle to Home Assistant VM (Raspberry Pi 5)

Introduction

This guide shows how to pass through the SONOFF Zigbee 3.0 USB Dongle Plus to a Home Assistant OS (HAOS) virtual machine running on Raspberry Pi 5 using KVM/libvirt. This allows you to use Zigbee devices directly within your virtualized Home Assistant setup.

Why Pass Through USB Devices to Virtual Machines?

When running Home Assistant OS (HAOS) in a virtualized environment on Raspberry Pi 5, smart home automation requires direct hardware access for wireless communication protocols like Zigbee that depend on dedicated USB dongles.

Our technology stack includes the Raspberry Pi 5 hardware layer, Raspberry Pi OS host, QEMU/KVM hypervisor, libvirt management daemon, and HAOS guest OS. By default, the guest VM cannot directly access USB devices connected to the host system due to hypervisor isolation.

USB passthrough solves this by “passing” a physical USB device from the host directly to the virtual machine, essential for Zigbee coordinators like the SONOFF Zigbee 3.0 USB Dongle Plus.

If setting up a new HAOS VM with the dongle already connected, you can include passthrough during virt-install using --hostdev 003.002. However, when adding hardware to an existing setup, you’ll need to modify the running VM configuration using libvirt’s XML system.

Installing Home Assistant OS (HAOS) in KVM on Raspberry Pi 5

Running Home Assistant OS (HAOS) natively on a Raspberry Pi is common, but virtualizing it in KVM unlocks flexibility for home lab setups or multi-purpose Pi 5 systems. This guide shows you, step-by-step, how to set up HAOS in a KVM virtual machine on your Raspberry Pi 5 (64-bit).

Technology Stack Components:

  • Hardware Layer: Raspberry Pi 5 with ARM64 architecture and hardware virtualization extensions
  • Host OS: Raspberry Pi OS (Debian-based) providing the foundation
  • Hypervisor: QEMU/KVM for hardware-accelerated virtualization
  • Management Layer:
    • libvirt daemon for VM lifecycle management and networking
    • Cockpit web UI (with cockpit-machines) for graphical VM administration
  • Guest OS: Home Assistant Operating System running as an isolated virtual machine
  • Network Bridge: Direct ethernet connection allowing VM to appear as a native network device

Prerequisites

  • Raspberry Pi 5 running Raspberry Pi OS 64-bit (Bookworm or newer recommended)
  • Sufficient RAM (at least 4GB, 8GB strongly recommended)
  • Hardware virtualization support enabled (available by default on RPi5)
  • Basic Linux terminal skills

Convert an Nvidia Shield Tablet into a Wall Display: Battery Removal Guide

As a Home Assistant enthusiast, I wanted a dedicated, always-on display to monitor and control my smart home. Repurposing my old Nvidia Shield Tablet seemed like the perfect solution. However, the aging battery was generating unnecessary heat and wasn’t needed for a wall-mounted setup that’s constantly plugged in. In this guide, I’ll walk you through how I removed the battery from my Nvidia Shield Tablet and set it up as a sleek wall-mounted dashboard using the Fully Kiosk Browser app.