# Building a Reliable Home-Automation Hub

A home-automation hub should keep working when the internet does not. My setup uses a small fanless computer running Home Assistant, with Zigbee and Z-Wave USB radios connected through short extension cables to reduce interference. Devices communicate locally, while remote access is limited to a secured tunnel rather than exposing the hub directly to the internet.

## Network and Device Design

I placed smart-home devices on a dedicated VLAN with access restricted to DNS, NTP, and the hub itself. This prevents an inexpensive Wi-Fi plug from reaching laptops or network storage. Zigbee sensors form a separate mesh, with mains-powered outlets acting as routers for battery-powered door, temperature, and motion sensors.

## Automations That Fail Safely

Reliable automations need explicit fallback behavior. Lights triggered by motion should still respond to physical switches, and heating rules should preserve safe limits if a sensor stops reporting. I also avoid cloud-only dependencies in essential routines such as leak detection, smoke alerts, and nighttime lighting.

```yaml
automation:
  - alias: Hall light after dark
    trigger:
      - platform: state
        entity_id: binary_sensor.hall_motion
        to: "on"
    condition:
      - condition: sun
        after: sunset
    action:
      - service: light.turn_on
        target:
          entity_id: light.hall
        data:
          brightness_pct: 35
```

## Monitoring and Maintenance

The hub records device availability, battery levels, and automation failures, but retains detailed history for only a few weeks to limit disk writes. A nightly backup is copied to another machine, and updates are installed after reviewing release notes rather than automatically. Spare radio adapters and a documented restore procedure make hardware failures less disruptive.

## Lessons from Daily Use

The best automations are quiet, predictable, and easy to override. Starting with a few high-value routines made troubleshooting manageable and exposed weak wireless coverage before the system grew. Local control, network isolation, and conservative failure handling have mattered far more than adding another dashboard or voice assistant.