# Building a Reliable Home-Automation Hub

A home-automation hub should keep working when the internet does not. My setup runs Home Assistant on a small fanless PC with an SSD, connected to the network over Ethernet. Zigbee and Z-Wave USB radios handle low-power devices locally, while Wi-Fi is reserved for higher-bandwidth equipment such as cameras and speakers.

## Network and Device Design

The hub lives on a dedicated IoT VLAN with firewall rules that block devices from initiating connections to trusted computers. Home Assistant can reach both networks, but only through explicitly allowed ports. This arrangement limits the damage from an insecure smart plug without making dashboards or mobile notifications difficult to use.

## A Practical Automation

Automations are most reliable when they depend on local state rather than cloud APIs. The following Home Assistant configuration turns on a hallway light after sunset when motion is detected, then switches it off after two minutes:

```yaml
alias: Hallway motion lighting
trigger:
  - platform: state
    entity_id: binary_sensor.hallway_motion
    to: "on"
condition:
  - condition: sun
    after: sunset
action:
  - service: light.turn_on
    target:
      entity_id: light.hallway
  - delay: "00:02:00"
  - service: light.turn_off
    target:
      entity_id: light.hallway
```

## Reliability and Maintenance

Every device should have a stable name, a documented location, and a known recovery procedure. I back up the hub nightly to network storage, retain several previous snapshots, and test restoration after major upgrades. A small UPS keeps the hub, switch, and radio adapters online during brief outages.

## Lessons from Daily Use

The most useful automations are quiet and predictable: lighting, leak detection, temperature control, and reminders for open doors. Voice assistants and elaborate dashboards are convenient, but they should remain optional interfaces. If the hub can operate essential routines locally, recover from failure, and explain why an automation ran, it has become infrastructure rather than a collection of gadgets.