# Building a Reliable Home-Automation Hub

A home-automation hub should keep working when the internet does not. For my setup, I used a small fanless computer running Home Assistant OS, connected by Ethernet to the main router. Zigbee devices communicate through a USB coordinator attached with a short extension cable, which reduces interference from the computer’s USB 3 ports.

## Network and Device Design

Wi-Fi is reserved for devices that need higher bandwidth, such as cameras and speakers, while sensors, switches, and bulbs use Zigbee. Each smart device receives a DHCP reservation, and untrusted IoT equipment lives on a separate VLAN. Firewall rules allow the hub to initiate connections into that VLAN but prevent devices from reaching laptops or storage servers.

## A Practical Automation

Automations run locally so common actions remain fast and private. This Home Assistant rule turns on the hallway light when motion is detected after sunset, then switches it off after two minutes without motion:

```yaml
automation:
  - alias: Hallway motion lighting
    triggers:
      - trigger: state
        entity_id: binary_sensor.hallway_motion
        to: "on"
    conditions:
      - condition: sun
        after: sunset
    actions:
      - action: light.turn_on
        target:
          entity_id: light.hallway
      - wait_for_trigger:
          - trigger: state
            entity_id: binary_sensor.hallway_motion
            to: "off"
            for: "00:02:00"
      - action: light.turn_off
        target:
          entity_id: light.hallway
```

## Reliability and Recovery

The hub writes automatic backups to network storage every night, and a separate job copies them off-site. I also keep a spare Zigbee coordinator with its firmware version documented. After updates, I verify several critical paths—door sensors, heating controls, smoke-alert notifications, and physical light switches—before considering the deployment healthy.

## Lessons from Daily Use

The best automations are quiet and reversible. Physical controls should continue to work, notifications should describe an actionable problem, and failed devices should degrade gracefully. Starting with a few dependable routines made the system easier to maintain than installing dozens of clever automations at once.