Home Automation

Relevant source files

The home automation stack provides the central intelligence and security monitoring for the physical premises. It leverages a multi-VLAN network topology to isolate IoT devices while maintaining high availability through persistent storage backups and hardware-accelerated computer vision.

Home Assistant

home-assistant serves as the primary automation engine. It is deployed as a multi-container pod featuring the core application and a code-server sidecar for live configuration management kubernetes/apps/home-automation/home-assistant/app/helmrelease.yaml33-115

Multi-VLAN Networking (Multus)

To interact with devices across isolated network segments, Home Assistant utilizes Multus CNI to attach multiple network interfaces directly to the pod. This allows the pod to reside in the cluster network while having a footprint in specific physical VLANs kubernetes/apps/home-automation/home-assistant/app/helmrelease.yaml37-54

Network NameVLAN DescriptionCIDRAssigned Pod IP
multus-trustTrusted devices (e.g., PCs, Servers)10.10.10.0/2410.10.10.250
multus-notNo-Internet devices (e.g., Local-only IoT)10.10.32.0/2410.10.32.250
multus-iotIoT devices with restricted access10.10.33.0/2410.10.33.250

These interfaces are defined via NetworkAttachmentDefinition resources using the macvlan CNI plugin with sbr (Source Based Routing) to ensure traffic returns through the correct interface kubernetes/apps/network/multus/config/net-attach-iot.yaml2-36kubernetes/apps/network/multus/config/net-attach-not.yaml2-36kubernetes/apps/network/multus/config/net-attach-trust.yaml2-37

Configuration and Sidecars

Sources:kubernetes/apps/home-automation/home-assistant/app/helmrelease.yamlkubernetes/apps/network/multus/config/net-attach-iot.yamlkubernetes/apps/network/multus/config/net-attach-trust.yaml

Frigate NVR

Frigate provides AI-powered video surveillance. It integrates with the cluster’s hardware acceleration and uses MQTT for event bus communication.

Camera Configuration and go2rtc

Frigate utilizes go2rtc to manage high-performance RTSP restreaming from Reolink cameras kubernetes/apps/home-automation/frigate/app/resources/config.yml55-70

Entity Integration Diagram

The following diagram illustrates the relationship between Frigate’s configuration entities and the underlying infrastructure.

Title: Frigate Logic to Infrastructure Mapping

[Flowchart Diagram]

Sources:kubernetes/apps/home-automation/frigate/app/resources/config.ymlkubernetes/apps/home-automation/frigate/app/helmrelease.yaml

Mosquitto MQTT Broker

Mosquitto acts as the central message bus for the home automation ecosystem, facilitating communication between Frigate, Home Assistant, and various IoT sensors.

Data Flow Architecture

The diagram below shows how data flows through the automation stack using the code-defined endpoints.

Title: Automation Data Flow

[Flowchart Diagram]

Sources:kubernetes/apps/home-automation/home-assistant/app/helmrelease.yaml39-54kubernetes/apps/home-automation/frigate/app/resources/config.yml8-12kubernetes/apps/database/kustomization.yaml4-12

Database Layer

While Home Assistant uses a local SQLite database by default, other automation-adjacent services rely on the cloudnative-pg (PostgreSQL) cluster.

Sources:kubernetes/apps/database/cloudnative-pg/cluster/cluster.yamlkubernetes/apps/database/cloudnative-pg/backup/helmrelease.yaml