Posts

Home Assistant Entity & Device Naming Best Practice

Proper naming conventions in Home Assistant transform a chaotic smart home into an organized, maintainable system. Without consistent naming, you’ll struggle to find devices, create automations, and troubleshoot issues as your setup grows. Good naming conventions make your smart home scalable and intuitive for everyone in your household.

This guide provides a structured approach to naming that grows with your system, inspired by the Home Assistant Naming Convention repository maintained by the community.

Migrating Pi 5 from microSD to USB3 Samsung 870 EVO SSD, and Pitfalls

Since I use Raspberry Pi 5 as a virtual machine (VM) host for Home Assistant OS (HAOS) in KVM, I want a system that is simple, stable, and reliable.
After repeated microSD drawbacks, I selected the Samsung 870 EVO SSD 500GB via USB3 over my previous Raspberry Pi 128GB microSD U2 for system storage.

Performance Comparison: microSD vs USB3 SSD

To quantify the improvement, I used:

curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash

Results

Test microSD Card Samsung 870 EVO SSD Improvement
HDParm Disk Read 87.11 MB/sec 362.74 MB/sec 4.2x faster
HDParm Cached Disk Read 83.74 MB/sec 352.69 MB/sec 4.2x faster
DD Disk Write 71.0 MB/sec 306 MB/sec 4.3x faster
FIO 4k Random Read 7,322 IOPS 40,156 IOPS 5.5x faster
FIO 4k Random Write 4,070 IOPS 35,679 IOPS 8.8x faster
IOZone 4k Read 22,064 KB/sec 45,015 KB/sec 2x faster
IOZone 4k Write 10,453 KB/sec 44,799 KB/sec 4.3x faster
IOZone 4k Rand Read 22,012 KB/sec 23,832 KB/sec 1.1x faster
IOZone 4k Rand Write 14,664 KB/sec 44,969 KB/sec 3.1x faster
Overall PiBenchmarks Score 4098 14655 +3.6x higher

Summary:
The USB3 SSD is consistently at least 4x faster for sequential reads/writes, and up to 9x faster for random IO operations. This means faster boot times, quicker VM performance, and far more reliability for Home Assistant and other hosted services.

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

LED Strips for WLED – My Personal Comparison

Enhancing your smart home with dynamic lighting has never been easier, thanks to the seamless integration of LED strips powered by WLED and Home Assistant.

WLED is an open-source firmware that transforms affordable microcontrollers into feature-rich LED controllers, perfect for Internet of Things (IoT) applications. By using LED strips with WLED, you gain precise control over your lighting, enabling stunning effects, animations, and automations tailored to your lifestyle.

Home Assistant is a popular home automation platform that effortlessly integrates with WLED, allowing you to manage your LED strips alongside other smart devices from a single interface. This powerful combination elevates your space’s ambiance and enhances smart home functionality. Whether you’re a DIY enthusiast or new to IoT, integrating LED strips with WLED and Home Assistant is an accessible way to bring your lighting ideas to life.

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.

WiFi Access Point Bridge with Raspberry Pi 3 – ETH to WLAN

A Raspberry Pi WiFi Extender is a cheap and power efficient way of increasing the total range of your WiFi Network. In my case I needed to extend a WiFi coverage within the same LAN (bridge mode from Ethernet to WiFi).

I have found a working shortcut 😎 to create an access point following a GitHub project so I didn’t need to follow instructions from raspberrypi.org page – Using the Raspberry Pi as an access point to share an internet connection (bridge).

Fish Tank WIFI HTTP Server

Idea for this project came with my new small fish tank. Since the fish tank is in a living room I did not want to have aquarium air pump on during the TV time due to its noise. Also the main light should be automatically turned off during the night. I wanted to add also night LED.

WiFi Energy Monitor

My new project consists of HW with cost under 20€. It is able to accurately measure electric power consumption and sends data via WiFi. Great source of knowledge is openenergymonitor.org which includes also Arduino library.